Skip to content

Commit

Permalink
Merge #419
Browse files Browse the repository at this point in the history
419: Update and simplify the CI workflow r=cuviper a=cuviper

- Update to actions/checkout@v3
- Switch from actions-rs/toolchain to dtolnay/rust-toolchain
- Switch from actions-rs/cargo to plain run
- Stop explicitly naming CI steps


Co-authored-by: Josh Stone <[email protected]>
  • Loading branch information
bors[bot] and cuviper authored Jul 14, 2022
2 parents 644384f + 3c1c9a4 commit 0c3167f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 84 deletions.
61 changes: 13 additions & 48 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,76 +20,41 @@ jobs:
nightly
]
steps:
- name: Rust install
uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- name: Checkout
uses: actions/checkout@v2
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
- name: Test
run: ./ci/test_full.sh
- run: cargo build
- run: ./ci/test_full.sh

# try a target that doesn't have std at all, but does have alloc
no_std_stable:
name: No Std (stable)
runs-on: ubuntu-latest
steps:
- name: Rust install
uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
profile: minimal
override: true
target: thumbv6m-none-eabi
- name: Checkout
uses: actions/checkout@v1
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --target thumbv6m-none-eabi --no-default-features --features "alloc libm serde rand"
- run: cargo build --target thumbv6m-none-eabi --no-default-features --features "alloc libm serde rand"

# try a target that doesn't have std at all, nor alloc
no_std_131:
name: No Std (1.31.0)
runs-on: ubuntu-latest
steps:
- name: Rust install
uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@1.31.0
with:
toolchain: 1.31.0
profile: minimal
override: true
target: thumbv6m-none-eabi
- name: Checkout
uses: actions/checkout@v1
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --target thumbv6m-none-eabi --no-default-features --features "libm"
- run: cargo build --target thumbv6m-none-eabi --no-default-features --features "libm"

fmt:
name: Format
runs-on: ubuntu-latest
steps:
- name: Rust install
uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@1.62.0
with:
toolchain: 1.42.0
profile: minimal
override: true
components: rustfmt
- name: Checkout
uses: actions/checkout@v2
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- run: cargo fmt --all --check
16 changes: 4 additions & 12 deletions .github/workflows/master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,9 @@ jobs:
matrix:
rust: [1.31.0, stable]
steps:
- name: Rust install
uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- name: Checkout
uses: actions/checkout@v2
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
- name: Test
run: ./ci/test_full.sh
- run: cargo build
- run: ./ci/test_full.sh
31 changes: 7 additions & 24 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,19 @@ jobs:
matrix:
rust: [1.31.0, stable]
steps:
- name: Rust install
uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- name: Checkout
uses: actions/checkout@v2
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
- name: Test
run: ./ci/test_full.sh
- run: cargo build
- run: ./ci/test_full.sh

fmt:
name: Format
runs-on: ubuntu-latest
steps:
- name: Rust install
uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@1.62.0
with:
toolchain: 1.42.0
profile: minimal
override: true
components: rustfmt
- name: Checkout
uses: actions/checkout@v2
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- run: cargo fmt --all --check

0 comments on commit 0c3167f

Please sign in to comment.