Skip to content

Commit

Permalink
Deploy c730020 to gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Deploy from CI committed Oct 22, 2024
0 parents commit 76a099a
Show file tree
Hide file tree
Showing 152 changed files with 18,264 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[alias]
xtask = "run --package xtask --"
16 changes: 16 additions & 0 deletions .editorconfig
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
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)
7 changes: 7 additions & 0 deletions .github/dependabot.yml
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
43 changes: 43 additions & 0 deletions .github/workflows/book.yml
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
4 changes: 4 additions & 0 deletions .github/workflows/msrv_toolchain.toml
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"]
177 changes: 177 additions & 0 deletions .github/workflows/rust.yml
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
8 changes: 8 additions & 0 deletions .gitignore
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/
1 change: 1 addition & 0 deletions .nojekyll
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.
Loading

0 comments on commit 76a099a

Please sign in to comment.