Skip to content
Merged
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
35 changes: 26 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,33 @@ env:

jobs:
test:
name: Build and Test
name: Build and Test (${{ matrix.os }})
needs: [fmt-check, clippy]
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install stable toolchain
run: rustup update stable

- name: Install LLVM/Clang (Linux)
if: ${{ runner.os == 'Linux' }}
if: runner.os == 'Linux'
run: |
sudo apt install -y llvm llvm-dev clang libclang-dev
command -v llvm-config && clang -v

- name: Install LLVM/Clang (macOS)
if: ${{ runner.os == 'macOS' }}
if: runner.os == 'macOS'
run: |
brew install llvm

- name: Install LLVM/Clang (Windows)
if: runner.os == 'Windows'
run: |
choco install llvm -y
echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Checkout sources
uses: actions/checkout@v4
with:
Expand All @@ -48,9 +54,14 @@ jobs:
- name: Build
run: cargo build --verbose

- name: Run tests
- name: Run tests (Unix)
if: runner.os != 'Windows'
run: cargo test --all --verbose

- name: Run tests (Windows, unit tests only)
if: runner.os == 'Windows'
run: cargo test --lib --verbose

fmt-check:
name: Format Check
runs-on: ubuntu-latest
Expand All @@ -67,26 +78,32 @@ jobs:
run: cargo fmt --all --check --verbose

clippy:
name: Clippy Check
name: Clippy Check (${{ matrix.os }})
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install stable toolchain
run: rustup update stable

- name: Install LLVM/Clang (Linux)
if: ${{ runner.os == 'Linux' }}
if: runner.os == 'Linux'
run: |
sudo apt install -y llvm llvm-dev clang libclang-dev
command -v llvm-config && clang -v

- name: Install LLVM/Clang (macOS)
if: ${{ runner.os == 'macOS' }}
if: runner.os == 'macOS'
run: |
brew install llvm

- name: Install LLVM/Clang (Windows)
if: runner.os == 'Windows'
run: |
choco install llvm -y
echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Checkout sources
uses: actions/checkout@v4
with:
Expand Down