Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: migrate away from unmaintained actions #478

Merged
merged 4 commits into from
Apr 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 20 additions & 90 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,41 +27,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Run cargo build for stable
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
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
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
- run: cargo build --no-default-features --features instructions
- run: cargo build --no-default-features
- run: cargo doc --no-default-features --features instructions
- run: cargo doc --no-default-features
- run: cargo test --no-default-features --features instructions
- run: cargo test --no-default-features

test:
name: "Test"
Expand All @@ -76,51 +50,22 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@nightly
with:
profile: minimal
toolchain: nightly
override: true
target: x86_64-unknown-linux-musl

- name: "Print Rust Version"
run: |
rustc -Vv
cargo -Vv
targets: x86_64-unknown-linux-musl, i686-unknown-linux-gnu, thumbv7em-none-eabihf

- name: "Run cargo build"
uses: actions-rs/cargo@v1
with:
command: build
- run: cargo build

- name: "Run cargo doc"
uses: actions-rs/cargo@v1
with:
command: doc
- run: cargo doc

- name: "Run cargo build on musl"
uses: actions-rs/cargo@v1
with:
command: build
args: --target x86_64-unknown-linux-musl
- run: cargo build --target x86_64-unknown-linux-musl
if: runner.os == 'Linux'

- name: "Run cargo test"
uses: actions-rs/cargo@v1
with:
command: test
- run: cargo test

- name: "Run cargo test on musl"
uses: actions-rs/cargo@v1
with:
command: test
args: --target x86_64-unknown-linux-musl
- run: cargo test --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
Expand Down Expand Up @@ -151,13 +96,9 @@ jobs:
run: echo "$GITHUB_WORKSPACE/binaries/bin" >> $GITHUB_PATH
shell: bash

- name: "Install Rustup Components"
uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
override: true
profile: minimal
components: rust-src, llvm-tools-preview
components: rust-src, llvm-tools
- name: "Install cargo-xbuild"
run: cargo install cargo-xbuild --debug --root binaries
- name: "Install bootimage"
Expand Down Expand Up @@ -197,32 +138,21 @@ jobs:
timeout-minutes: 2
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
override: true
profile: minimal
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- run: cargo fmt --all -- --check

clippy:
name: "Clippy"
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
override: true
profile: minimal
components: clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
- run: cargo clippy

semver-checks:
name: Semver Checks
Expand Down