Skip to content

Commit

Permalink
Merge pull request #478 from mkroening/ci-actions
Browse files Browse the repository at this point in the history
ci: migrate away from unmaintained actions
  • Loading branch information
phil-opp authored Apr 4, 2024
2 parents b9a642a + ed41a38 commit a30e88f
Showing 1 changed file with 20 additions and 90 deletions.
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

0 comments on commit a30e88f

Please sign in to comment.