diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a6da51..b2c3417 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: @@ -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 @@ -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: