Fix windows test #277
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| cabal: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| ghc: | |
| - "9.6.6" | |
| - "9.8.4" | |
| - "9.10.2" | |
| - "9.12.2" | |
| platform: | |
| - os: "macos-latest" | |
| unit-trials: 10000 | |
| int-trials: 1000 | |
| - os: "ubuntu-latest" | |
| unit-trials: 10000 | |
| int-trials: 1000 | |
| - os: "windows-latest" | |
| unit-trials: 1000 | |
| int-trials: 1000 | |
| runs-on: ${{ matrix.platform.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: haskell-actions/setup@v2 | |
| with: | |
| ghc-version: ${{ matrix.ghc }} | |
| - name: Configure | |
| run: cabal configure --enable-tests --enable-benchmarks --ghc-options -Werror | |
| - name: Compile | |
| run: cabal build charon:exe:charon | |
| - name: Unit Tests | |
| id: unit | |
| run: | | |
| cabal test unit --test-options '--hedgehog-tests ${{ matrix.platform.unit-trials }}' | |
| - uses: actions/upload-artifact@v4 | |
| name: Unit Tests Upload | |
| if: ${{ failure() && steps.unit.conclusion == 'failure' }} | |
| with: | |
| name: unit-artifacts_${{ matrix.platform.os }}_${{ matrix.ghc }} | |
| path: test/unit/Unit/Data/Index/*actual | |
| retention-days: 1 | |
| - name: Integration Tests | |
| shell: bash | |
| run: | | |
| export INT_LOGS=1 | |
| cabal test integration --test-options '--hedgehog-tests ${{ matrix.platform.int-trials }} --hedgehog-discards 10000' | |
| - name: Functional Tests | |
| id: functional | |
| run: cabal test functional --test-options '--size-cutoff 100000' | |
| - uses: actions/upload-artifact@v4 | |
| name: Functional Tests Upload | |
| if: ${{ failure() && steps.functional.conclusion == 'failure' }} | |
| with: | |
| name: functional-artifacts_${{ matrix.platform.os }}_${{ matrix.ghc }} | |
| path: test/functional/goldens/*actual | |
| retention-days: 1 | |
| - name: Benchmarks | |
| if: ${{ matrix.platform.os == 'ubuntu-latest' }} | |
| id: bench | |
| run: | | |
| cabal bench --benchmark-options ' | |
| --csv benchmarks/${{ matrix.platform.os }}_${{ matrix.ghc }}_ci.csv | |
| --svg benchmarks/${{ matrix.platform.os }}_${{ matrix.ghc }}_ci.svg | |
| --baseline benchmarks/baseline_${{ matrix.platform.os }}_${{ matrix.ghc }}_ci.csv | |
| --fail-if-slower 50 | |
| --fail-if-faster 50' | |
| - uses: actions/upload-artifact@v4 | |
| name: Benchmarks Upload | |
| if: ${{ failure() && steps.bench.conclusion == 'failure' }} | |
| with: | |
| name: build-artifacts_${{ matrix.platform.os }}_${{ matrix.ghc }} | |
| path: | | |
| benchmarks/${{ matrix.platform.os }}_${{ matrix.ghc }}_ci.csv | |
| benchmarks/${{ matrix.platform.os }}_${{ matrix.ghc }}_ci.svg | |
| retention-days: 1 | |
| nix: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - "macos-latest" | |
| - "ubuntu-latest" | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup nix | |
| uses: cachix/install-nix-action@v30 | |
| with: | |
| github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| - name: Compile & Test | |
| run: nix build -Lv | |
| lint: | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup nix | |
| uses: cachix/install-nix-action@v30 | |
| with: | |
| github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
| nix_path: nixpkgs=channel:nixos-unstable | |
| - name: Formatting | |
| run: | | |
| nix run .#format | |
| git diff --exit-code --color=always |