Skip to content

Commit

Permalink
chore(CI): check build on 32-bit targets (#84)
Browse files Browse the repository at this point in the history
This would have caught the build failure for 32-bit platforms reported
in issue #82. Adding a 32-bit build job to CI will help ensure we don't
break 32-bit builds in the future.
  • Loading branch information
hawkw committed Sep 27, 2023
1 parent 90bf2e9 commit 7b7b974
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,39 @@ name: CI
on: [pull_request]

jobs:
check:
name: check
build:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- nightly
- 1.42.0
target:
- x86_64-unknown-linux-gnu
include:
- rust: stable
target: i686-unknown-linux-gnu
name: cargo +${{ matrix.rust }} build --target ${{ matrix.target }}
steps:
- uses: actions/checkout@master
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- name: Cargo check
- name: cargo +${{ matrix.rust }} build --target ${{ matrix.target }}
uses: actions-rs/cargo@v1
with:
command: check
args: --all-features
command: build
args: --all-targets --target ${{ matrix.target }}

test:
name: Tests
runs-on: ubuntu-latest
needs: check

needs: build
steps:
- uses: actions/checkout@master

Expand All @@ -46,7 +51,7 @@ jobs:
test-loom:
name: Loom tests
runs-on: ubuntu-latest
needs: check
needs: build

steps:
- uses: actions/checkout@master
Expand All @@ -62,7 +67,7 @@ jobs:

clippy_check:
runs-on: ubuntu-latest
needs: check
needs: build

steps:
- uses: actions/checkout@v2
Expand All @@ -82,7 +87,7 @@ jobs:
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
needs: check
needs: build

steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,16 @@ harness = false
lazy_static = "1"

[dev-dependencies]
loom = { version = "0.5", features = ["checkpoint"] }
proptest = "1"
criterion = "0.3"
slab = "0.4.2"

[target.'cfg(loom)'.dependencies]
loom = { version = "0.5", features = ["checkpoint"], optional = true }

[target.'cfg(loom)'.dev-dependencies]
loom = { version = "0.5", features = ["checkpoint"] }

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
4 changes: 4 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[toolchain]
channel = "stable"
profile = "default"
targets = [
"i686-unknown-linux-musl",
"x86_64-unknown-linux-gnu",
]

0 comments on commit 7b7b974

Please sign in to comment.