Skip to content
Merged
Show file tree
Hide file tree
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
28 changes: 25 additions & 3 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,28 @@ jobs:
test:
name: Test
strategy:
fail-fast: false
matrix:
os: [ ubuntu-24.04, windows-2022, macOS-latest ]
os: [ ubuntu-latest, macOS-latest ]
cxx: [ g++, clang++ ]
cxxflags: [ '-Werror' ]
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
# msvc's `-Werror` is `/WX`
cxxflags: '/WX'
- os: windows-2022
target: x86_64-pc-windows-msvc
cxx: clang++
cxxflags: '-Werror'
- os: windows-2022
target: x86_64-pc-windows-gnu
cxxflags: '-Werror'
runs-on: ${{ matrix.os }}
env:
CXX: ${{ matrix.cxx }}
# error on compiler warnings in CI
CXXFLAGS: ${{ matrix.cxxflags }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -52,15 +71,18 @@ jobs:
# figure out native target triple while we're at it
- name: install rust-toolchain
run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV"
- name: overwrite target
if: ${{ matrix.target != '' }}
run: echo "TARGET=${{ matrix.target }}" >> "$GITHUB_ENV"
# Fetch dependencies in a separate step to clearly show how long each part
# of the testing takes
- name: cargo fetch --locked
run: cargo fetch --locked --target $TARGET
- run: cargo fetch --locked
- name: cargo test build
run: cargo build --tests --release --all-features
run: cargo build --tests --release --all-features --target $TARGET
- name: cargo test
run: cargo test --release --all-features
run: cargo test --release --all-features --target $TARGET

deny-check:
name: cargo-deny
Expand Down
Loading
Loading