Fix the exception handlers. #124
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
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
name: Build | |
jobs: | |
# Define Rust versions dynamically | |
setup: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.rust_versions }} | |
steps: | |
- id: set-matrix | |
run: | | |
echo 'rust_versions={"rust": ["stable", "1.82"]}' >> "$GITHUB_OUTPUT" | |
# Build the workspace for a target architecture | |
build: | |
runs-on: ubuntu-24.04 | |
needs: setup | |
strategy: | |
matrix: | |
rust: ${{ fromJSON(needs.setup.outputs.matrix).rust }} | |
target: | |
- armebv7r-none-eabi | |
- armebv7r-none-eabihf | |
- armv7r-none-eabi | |
- armv7r-none-eabihf | |
- armv7a-none-eabi | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust | |
run: | | |
rustup install ${{ matrix.rust }} | |
rustup default ${{ matrix.rust }} | |
rustup target add ${{ matrix.target }} | |
- name: Build | |
run: | | |
cargo build --target ${{ matrix.target }} | |
cargo build --target ${{ matrix.target }} --no-default-features | |
build-versatileab: | |
runs-on: ubuntu-24.04 | |
needs: setup | |
strategy: | |
matrix: | |
rust: ${{ fromJSON(needs.setup.outputs.matrix).rust }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust | |
run: | | |
rustup install ${{ matrix.rust }} | |
rustup default ${{ matrix.rust }} | |
rustup target add armv7a-none-eabi | |
rustup target add armv7r-none-eabi | |
rustup target add armv7r-none-eabihf | |
- name: Build | |
run: | | |
cargo build --manifest-path ./examples/versatileab/Cargo.toml --target armv7a-none-eabi | |
cargo build --manifest-path ./examples/versatileab/Cargo.toml --target armv7r-none-eabi | |
cargo build --manifest-path ./examples/versatileab/Cargo.toml --target armv7r-none-eabihf | |
build-mps3-an536: | |
runs-on: ubuntu-24.04 | |
needs: setup | |
strategy: | |
matrix: | |
rust: ${{ fromJSON(needs.setup.outputs.matrix).rust }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust | |
run: | | |
rustup install nightly | |
rustup default nightly | |
rustup component add rust-src --toolchain nightly | |
- name: Build | |
run: | | |
cargo build --manifest-path ./examples/mps3-an536/Cargo.toml --target armv8r-none-eabihf -Zbuild-std=core | |
# Build the host tools | |
build-host: | |
runs-on: ubuntu-24.04 | |
needs: setup | |
strategy: | |
matrix: | |
rust: [stable, 1.59] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust | |
run: | | |
rustup install ${{ matrix.rust }} | |
rustup default ${{ matrix.rust }} | |
- name: Build | |
run: | | |
cd arm-targets | |
cargo build | |
# Build the workspace for the target architecture but using nightly to compile libcore | |
# Technically it doens't need 'setup' but it makes the graph look nicer | |
build-tier3: | |
runs-on: ubuntu-24.04 | |
needs: setup | |
strategy: | |
matrix: | |
target: | |
- armebv7r-none-eabi | |
- armebv7r-none-eabihf | |
- armv7r-none-eabi | |
- armv7a-none-eabi | |
- armv7a-none-eabihf | |
- armv7r-none-eabihf | |
- armv8r-none-eabihf | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust | |
run: | | |
rustup install nightly | |
rustup default nightly | |
rustup component add rust-src --toolchain nightly | |
- name: Build | |
run: | | |
cargo build --target ${{ matrix.target }} -Zbuild-std=core | |
cargo build --target ${{ matrix.target }} -Zbuild-std=core --no-default-features | |
# Gather all the above build jobs together for the purposes of getting an overall pass-fail | |
build-all: | |
runs-on: ubuntu-24.04 | |
needs: [build, build-tier3, build-host, build-versatileab, build-mps3-an536] | |
steps: | |
- run: /bin/true | |
# Build the docs for the workspace | |
docs: | |
runs-on: ubuntu-24.04 | |
needs: setup | |
strategy: | |
matrix: | |
rust: ${{ fromJSON(needs.setup.outputs.matrix).rust }} | |
target: | |
- armv7a-none-eabi | |
- armebv7r-none-eabi | |
- armebv7r-none-eabihf | |
- armv7r-none-eabi | |
- armv7r-none-eabihf | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust | |
run: | | |
rustup install ${{ matrix.rust }} | |
rustup default ${{ matrix.rust }} | |
rustup target add ${{ matrix.target }} | |
- name: Build docs | |
run: | | |
cargo doc --target ${{ matrix.target }} | |
cargo doc --target ${{ matrix.target }} --no-default-features | |
cargo doc --target ${{ matrix.target }} --all-features | |
# Build the docs for the host tools | |
docs-host: | |
runs-on: ubuntu-24.04 | |
needs: setup | |
strategy: | |
matrix: | |
rust: ${{ fromJSON(needs.setup.outputs.matrix).rust }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust | |
run: | | |
rustup install ${{ matrix.rust }} | |
rustup default ${{ matrix.rust }} | |
- name: Build docs | |
run: | | |
cd arm-targets | |
cargo doc | |
# Gather all the above doc jobs together for the purposes of getting an overall pass-fail | |
docs-all: | |
runs-on: ubuntu-24.04 | |
needs: [docs, docs-host] | |
steps: | |
- run: /bin/true | |
# Format the workspace | |
fmt: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust | |
run: | | |
rustup install stable | |
rustup default stable | |
- name: Format | |
run: | | |
cargo fmt --check | |
# Format the host tools | |
fmt-host: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust | |
run: | | |
rustup install stable | |
rustup default stable | |
- name: Format | |
run: | | |
cd arm-targets | |
cargo fmt --check | |
# Gather all the above fmt jobs together for the purposes of getting an overall pass-fail | |
fmt-all: | |
runs-on: ubuntu-24.04 | |
needs: [fmt, fmt-host] | |
steps: | |
- run: /bin/true | |
# Run clippy on the workpace | |
clippy: | |
runs-on: ubuntu-24.04 | |
needs: setup | |
strategy: | |
matrix: | |
rust: ${{ fromJSON(needs.setup.outputs.matrix).rust }} | |
target: | |
- armebv7r-none-eabi | |
- armebv7r-none-eabihf | |
- armv7r-none-eabi | |
- armv7r-none-eabihf | |
- armv7a-none-eabi | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust | |
run: | | |
rustup install ${{ matrix.rust }} | |
rustup default ${{ matrix.rust }} | |
rustup target add ${{ matrix.target }} | |
rustup component add clippy | |
- name: Clippy | |
run: | | |
cargo clippy --target ${{ matrix.target }} | |
cargo clippy --target ${{ matrix.target }} --no-default-features | |
cargo clippy --target ${{ matrix.target }} --all-features | |
# Run clippy on the host tools | |
clippy-host: | |
runs-on: ubuntu-24.04 | |
needs: setup | |
strategy: | |
matrix: | |
rust: ${{ fromJSON(needs.setup.outputs.matrix).rust }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust | |
run: | | |
rustup install ${{ matrix.rust }} | |
rustup default ${{ matrix.rust }} | |
rustup component add clippy | |
- name: Clippy | |
run: | | |
cd arm-targets | |
cargo clippy | |
# Gather all the above clippy jobs together for the purposes of getting an overall pass-fail | |
clippy-all: | |
runs-on: ubuntu-24.04 | |
needs: [clippy, clippy-host] | |
steps: | |
- run: /bin/true | |
# Run the unit tests | |
unit-test: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rust | |
run: | | |
rustup install stable | |
rustup default stable | |
- name: Run cargo test | |
run: | | |
cargo test --manifest-path cortex-ar/Cargo.toml | |
# Run some programs in QEMU 9 | |
qemu-test: | |
runs-on: ubuntu-24.04 | |
needs: [build-all] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: | | |
sudo apt-get -y update | |
sudo apt-get -y install libpixman-1-0 libfdt1 libglib2.0-0t64 | |
- name: Install custom QEMU into /opt | |
run: | | |
curl -sSL https://github.com/jonathanpallant/qemu9-for-ubuntu-2404/releases/download/qemu-9.2.3%2Bbuild0/qemu-9.2.3-ubuntu-24.04.tar.gz | sudo tar xvzf - -C / | |
- name: Run tests in QEMU | |
run: | | |
export PATH=/opt/qemu/bin:$PATH | |
./tests.sh | |
# Gather all the above xxx-all jobs together for the purposes of getting an overall pass-fail | |
all: | |
runs-on: ubuntu-24.04 | |
needs: [docs-all, build-all, fmt-all, unit-test, qemu-test] # not gating on clippy-all | |
steps: | |
- run: /bin/true |