Skip to content

improve ASM module

improve ASM module #68

Workflow file for this run

on:
push:
branches: [ main ]
pull_request:
name: Build
jobs:
# Build the workspace for a target architecture
build:
runs-on: ubuntu-24.04
strategy:
matrix:
rust: [stable, 1.82]
target:
- 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
run: |
cargo build --target ${{ matrix.target }}
cargo build --target ${{ matrix.target }} --no-default-features
cargo build --target ${{ matrix.target }} --all-features
# Build the host tools
build-host:
runs-on: ubuntu-24.04
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
build-tier3:
runs-on: ubuntu-24.04
strategy:
matrix:
target:
- armebv7r-none-eabi
- armebv7r-none-eabihf
- armv7r-none-eabi
- 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
cargo build --target ${{ matrix.target }} -Zbuild-std=core --all-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]
steps:
- run: /bin/true
# Build the docs for the workspace
docs:
runs-on: ubuntu-24.04
strategy:
matrix:
rust: [stable, 1.82]
target:
- 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
strategy:
matrix:
rust: [stable, 1.82]
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
strategy:
matrix:
rust: [stable, 1.82]
target:
- 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 }}
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
strategy:
matrix:
rust: [stable, 1.82]
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
qemu-test:
runs-on: ubuntu-24.04
needs: [build-all]
steps:
- run: sudo apt-get -y update && sudo apt-get -y install qemu-system-arm
- name: Checkout
uses: actions/checkout@v4
- run: ./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