Skip to content

Fix release script #2877

Fix release script

Fix release script #2877

Workflow file for this run

name: Build
on:
push:
branches:
- "master"
tags:
- "*"
schedule:
- cron: "40 4 * * *" # every day at 4:40
pull_request:
permissions:
contents: read
jobs:
stable:
name: "Test MSRV and Stable Features"
strategy:
matrix:
rust:
- nightly
- 1.59
- 1.57
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Run cargo build for stable
if: matrix.rust != 1.57
uses: actions-rs/cargo@v1
with:
command: build
args: --no-default-features --features instructions
- name: Run cargo build for stable without instructions
uses: actions-rs/cargo@v1
with:
command: build
args: --no-default-features
- name: Run cargo doc for stable
if: matrix.rust != 1.57
uses: actions-rs/cargo@v1
with:
command: doc
args: --no-default-features --features instructions
- name: Run cargo doc for stable without instructions
uses: actions-rs/cargo@v1
with:
command: doc
args: --no-default-features
- name: Run cargo test for stable
if: matrix.rust != 1.57
uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features --features instructions
- name: Run cargo test for stable without instructions
uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features
test:
name: "Test"
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
target: x86_64-unknown-linux-musl
- name: "Print Rust Version"
run: |
rustc -Vv
cargo -Vv
- name: "Run cargo build"
uses: actions-rs/cargo@v1
with:
command: build
- name: "Run cargo doc"
uses: actions-rs/cargo@v1
with:
command: doc
- name: "Run cargo build on musl"
uses: actions-rs/cargo@v1
with:
command: build
args: --target x86_64-unknown-linux-musl
if: runner.os == 'Linux'
- name: "Run cargo test"
uses: actions-rs/cargo@v1
with:
command: test
- name: "Run cargo test on musl"
uses: actions-rs/cargo@v1
with:
command: test
args: --target x86_64-unknown-linux-musl
if: runner.os == 'Linux'
- name: "Install Rustup Targets"
run: |
rustup target add i686-unknown-linux-gnu
rustup target add thumbv7em-none-eabihf
- name: "Build on non x86_64 platforms"
run: |
cargo build --target i686-unknown-linux-gnu --no-default-features --features nightly
cargo build --target thumbv7em-none-eabihf --no-default-features --features nightly
bootloader-test:
name: "Bootloader Integration Test"
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
timeout-minutes: 15
steps:
- name: "Checkout Repository"
uses: actions/checkout@v4
- name: Cache binaries
id: cache-bin
uses: actions/cache@v4
with:
path: binaries
key: ${{ runner.OS }}-binaries
- name: Add binaries/bin to PATH
run: echo "$GITHUB_WORKSPACE/binaries/bin" >> $GITHUB_PATH
shell: bash
- name: "Install Rustup Components"
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
profile: minimal
components: rust-src, llvm-tools-preview
- name: "Install cargo-xbuild"
run: cargo install cargo-xbuild --debug --root binaries
- name: "Install bootimage"
run: cargo install bootimage --debug --root binaries
# install QEMU
- name: Install QEMU (Linux)
run: |
sudo apt update
sudo apt install qemu-system-x86
if: runner.os == 'Linux'
- name: Install QEMU (macOS)
run: brew install qemu
if: runner.os == 'macOS'
env:
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
- name: Install QEMU (Windows)
run: |
choco install qemu --version 2021.5.5
echo "$Env:Programfiles\qemu" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
if: runner.os == 'Windows'
shell: pwsh
- name: "Print QEMU Version"
run: qemu-system-x86_64 --version
- name: "Run Test Framework"
run: cargo xtest
shell: bash
working-directory: "testing"
check_formatting:
name: "Check Formatting"
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
profile: minimal
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: "Clippy"
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
profile: minimal
components: clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
semver-checks:
name: Semver Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
shared-key: "semver-checks"
cache-targets: false
- run: cargo install cargo-semver-checks --locked
- name: Check semver
run: cargo +stable semver-checks check-release