Skip to content

Commit b19042e

Browse files
committed
CI run cargo check on all platforms without dev-dependencies
1 parent 07e55e9 commit b19042e

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,21 +94,28 @@ jobs:
9494
cd ../spdlog-macros
9595
cargo +nightly rustdoc --all-features --verbose -- -D warnings
9696
97-
check-minver:
98-
runs-on: ubuntu-latest
97+
check:
98+
strategy:
99+
matrix:
100+
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
101+
runs-on: ${{ matrix.os }}
99102
steps:
100103
- name: Checkout repository
101104
uses: actions/checkout@v2
102-
- name: Install dependencies
105+
- name: Install dependencies (Linux)
106+
if: matrix.os == 'ubuntu-latest'
103107
run: sudo apt install libsystemd-dev
104108
- name: Install Rust ${{ env.rust_minver }}
105109
run: rustup toolchain install ${{ env.rust_minver }}
106110
- name: Restore cargo caches
107111
uses: Swatinem/rust-cache@v1
108-
- name: Run check for core with Rust ${{ env.rust_minver }}
112+
- name: Avoid dev-dependencies
109113
run: |
110114
# Some dev-dependencies require a newer version of Rust, but it doesn't matter for MSRV check
115+
# And the features they enable for their own dependencies may disrupt `cargo check` reporting obvious errors
111116
# This is a workaround for the cargo nightly option `-Z avoid-dev-deps`
112-
sed -i 's/\[dev-dependencies]/[workaround-avoid-dev-deps]/g' ./spdlog/Cargo.toml
113-
114-
cargo +${{ env.rust_minver }} check --all-features --verbose
117+
perl -pi -e 's/\[dev-dependencies]/[workaround-avoid-dev-deps]/g' ./spdlog/Cargo.toml
118+
- name: Run check for core with Rust latest
119+
run: cargo check --all-features --verbose
120+
- name: Run check for core with Rust ${{ env.rust_minver }} (MSRV check)
121+
run: cargo +${{ env.rust_minver }} check --all-features --verbose

0 commit comments

Comments
 (0)