-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Deploy from CI
committed
Dec 18, 2024
0 parents
commit 85d3c5b
Showing
152 changed files
with
18,252 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[alias] | ||
xtask = "run --package xtask --" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
|
||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.{rs,py}] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.{md,json}] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text=auto eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
*Descriptive summary of your bugfix, feature, or refactoring.* | ||
|
||
## Checklist | ||
- [ ] Sensible git history (for example, squash "typo" or "fix" commits): See the | ||
[Rewriting History](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History) guide for | ||
help. | ||
- [ ] Update the changelog (if necessary) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: cargo | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
open-pull-requests-limit: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Book | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
# Adapted from: | ||
# https://github.com/rust-lang/mdBook/wiki/Automated-Deployment%3A-GitHub-Actions#github-pages-deploy | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install mdbook | ||
run: | | ||
mkdir mdbook | ||
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.21/mdbook-v0.4.21-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook | ||
echo `pwd`/mdbook >> $GITHUB_PATH | ||
- name: Deploy GitHub Pages | ||
run: | | ||
cd book | ||
mdbook build | ||
git worktree add gh-pages gh-pages | ||
git config user.name "Deploy from CI" | ||
git config user.email "" | ||
cd gh-pages | ||
# Delete the ref to avoid keeping history. | ||
git update-ref -d refs/heads/gh-pages | ||
# Place the book under a "HEAD" directory so that we can later | ||
# add other versions (e.g. "stable" or "v0.17") without breaking | ||
# URLs. | ||
rm -rf HEAD | ||
mv ../book HEAD | ||
git add HEAD | ||
# Add an index in the root to redirect to HEAD. If we eventually | ||
# serve multiple versions, this can be changed to a real index. | ||
cp ../head_redirect.html index.html | ||
git add index.html | ||
# Commit and push. | ||
git commit -m "Deploy $GITHUB_SHA to gh-pages" | ||
git push --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[toolchain] | ||
# Oldest nightly that currently works with `cargo xtask build`. | ||
channel = "nightly-2022-04-18" | ||
components = ["rust-src"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
name: Rust | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- version-* | ||
pull_request: | ||
branches: | ||
- main | ||
- version-* | ||
schedule: | ||
- cron: '0 0 * * 0-6' | ||
|
||
jobs: | ||
test_aarch64: | ||
name: Build and run tests on AArch64 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install qemu and OVMF | ||
run: | | ||
# Ubuntu 20.04 provides qemu 4.2, which crashes on exit in this | ||
# test. Add a PPA to provide a more recent version of qemu. | ||
sudo add-apt-repository ppa:canonical-server/server-backports | ||
sudo apt-get update | ||
sudo apt-get install qemu-system-arm qemu-efi-aarch64 -y | ||
- name: Build | ||
run: cargo xtask build --target aarch64 | ||
|
||
- name: Run VM tests | ||
run: cargo xtask run --target aarch64 --headless --ci | ||
timeout-minutes: 2 | ||
|
||
test_x86_64: | ||
name: Build and run tests on x86_64 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install qemu and OVMF | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install qemu-system-x86 ovmf -y | ||
- name: Build | ||
run: cargo xtask build --target x86_64 | ||
|
||
- name: Run VM tests | ||
run: cargo xtask run --target x86_64 --headless --ci | ||
timeout-minutes: 2 | ||
|
||
test_ia32: | ||
name: Build and run tests on IA32 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install qemu | ||
run: | | ||
# Ubuntu 20.04 provides qemu 4.2, which crashes on exit in this | ||
# test. Add a PPA to provide a more recent version of qemu. | ||
sudo add-apt-repository ppa:canonical-server/server-backports | ||
sudo apt-get update | ||
sudo apt-get install qemu-system-x86 -y | ||
# Starting in ubuntu 21.04 there's an `ovmf-ia32` package, but the | ||
# github runners are on ubuntu 20.04. For now, install the OVMF | ||
# files from a repo that provides unofficial nightly builds: | ||
# https://github.com/retrage/edk2-nightly | ||
- name: Install OVMF | ||
env: | ||
# Pin to a specific commit in the retrage/edk2-nightly repo to | ||
# guard against external changes breaking the CI. | ||
EDK2_NIGHTLY_COMMIT: 'ebb83e5475d49418afc32857f66111949928bcdc' | ||
run: | | ||
curl -o OVMF32_CODE.fd https://raw.githubusercontent.com/retrage/edk2-nightly/${EDK2_NIGHTLY_COMMIT}/bin/RELEASEIa32_OVMF_CODE.fd | ||
curl -o OVMF32_VARS.fd https://raw.githubusercontent.com/retrage/edk2-nightly/${EDK2_NIGHTLY_COMMIT}/bin/RELEASEIa32_OVMF_VARS.fd | ||
- name: Build | ||
run: cargo xtask build --target ia32 | ||
|
||
- name: Run VM tests | ||
run: cargo xtask run --target ia32 --headless --ci --ovmf-code OVMF32_CODE.fd --ovmf-vars OVMF32_VARS.fd | ||
timeout-minutes: 2 | ||
|
||
test: | ||
name: Run tests and documentation tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run cargo test | ||
run: cargo xtask test | ||
|
||
lints: | ||
name: Lints | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run cargo fmt | ||
run: | | ||
rustup component add rustfmt | ||
cargo fmt --all -- --check | ||
- name: Run clippy | ||
run: | | ||
rustup component add clippy | ||
cargo xtask clippy --warnings-as-errors | ||
- name: Run cargo doc | ||
run: cargo xtask doc --warnings-as-errors | ||
|
||
miri: | ||
name: Run unit tests and doctests under Miri | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run miri | ||
run: | | ||
rustup component add miri | ||
cargo xtask miri | ||
# This job tests that the template app builds successfully with the | ||
# released versions of the libraries on crates.io. | ||
# | ||
# Since a nightly toolchain is currently required to build uefi-rs, | ||
# the released versions can suddenly stop building when a new nightly | ||
# compiler with a breaking change is released. This job provides an | ||
# alert when this situation occurs. | ||
test_latest_release: | ||
name: Build the template against the released version of uefi-rs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build | ||
run: cargo xtask test-latest-release | ||
|
||
windows: | ||
name: Check that the build works on a Windows target | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Build | ||
run: cargo xtask build | ||
|
||
# Run the build with our current nightly MSRV (specified in | ||
# ./msrv_toolchain.toml). This serves to check that we don't | ||
# accidentally start relying on a new feature without intending | ||
# to. Having a test for this makes it easier for us to be intentional | ||
# about making changes that require a newer version. | ||
build_msrv: | ||
name: Check that the build works on our nightly MSRV | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set toolchain | ||
run: cp .github/workflows/msrv_toolchain.toml rust-toolchain.toml | ||
|
||
- name: Build | ||
run: cargo xtask build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Cargo places all built files here. | ||
/target/ | ||
|
||
# Libraries should not commit their .lock files. | ||
Cargo.lock | ||
|
||
# Files generated by mdBook. | ||
/book/book/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This file makes sure that Github Pages doesn't process mdBook's output. |
Oops, something went wrong.