Fix unicode printing #195
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.2.8" | |
| - "9.4.8" | |
| - "9.6.5" | |
| - "9.8.2" | |
| - "9.10.1" | |
| - "9.12.1" | |
| os: | |
| - "macos-latest" | |
| - "ubuntu-latest" | |
| - "windows-latest" | |
| runs-on: ${{ matrix.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 path-size:exe:path-size | |
| - name: Unit Tests | |
| run: cabal test unit --test-options '--hedgehog-tests 100000' | |
| - name: Functional Tests | |
| id: functional | |
| run: cabal test functional --test-options '--size-cutoff 100000' | |
| - uses: actions/upload-artifact@v4 | |
| name: CLI Tests Upload | |
| if: ${{ failure() && steps.functional.conclusion == 'failure' }} | |
| with: | |
| name: functional-tests-artifacts_${{ matrix.os }}_${{ matrix.ghc }} | |
| path: | | |
| test/functional/goldens/*actual | |
| retention-days: 1 | |
| # Only benchmark on ubuntu to reduce maintenance burden as other | |
| # benchmarks are not really actionable. | |
| - name: Benchmark Tasty | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| id: bench-tasty | |
| run: | | |
| cabal bench bench-tasty --benchmark-options ' | |
| +RTS -T -RTS -t100 | |
| --csv bench/tasty/bench_${{ matrix.os }}_${{ matrix.ghc }}_ci.csv | |
| --svg bench/tasty/bench_${{ matrix.os }}_${{ matrix.ghc }}_ci.svg | |
| --baseline bench/tasty/baseline_${{ matrix.os }}_${{ matrix.ghc }}_ci.csv | |
| --fail-if-slower 20 | |
| --fail-if-faster 20' | |
| # Only run criterion benchmarks when bench-tasty fails. We need the | |
| # failure() condition to override the implicit success() condition, that | |
| # only runs the job when the "overall status" is success (i.e. not | |
| # previous jobs have failed). | |
| - name: Benchmark Criterion | |
| if: ${{ failure() && steps.bench-tasty.conclusion == 'failure' && matrix.os == 'ubuntu-latest' }} | |
| id: bench-criterion | |
| run: | | |
| cabal bench bench-criterion --benchmark-options ' | |
| --csv bench/criterion/bench_${{ matrix.os }}_${{ matrix.ghc }}_ci.csv | |
| --output bench/criterion/bench_${{ matrix.os }}_${{ matrix.ghc }}_ci.html' | |
| - uses: actions/upload-artifact@v4 | |
| if: ${{ failure() && (steps.bench-tasty.conclusion == 'failure' || steps.bench-criterion.conclusion == 'failure' ) }} | |
| with: | |
| name: bench-artifacts_${{ matrix.os }}_${{ matrix.ghc }} | |
| path: | | |
| bench/criterion/bench_${{ matrix.os }}_${{ matrix.ghc }}_ci.csv | |
| bench/criterion/bench_${{ matrix.os }}_${{ matrix.ghc }}_ci.html | |
| bench/tasty/bench_${{ matrix.os }}_${{ matrix.ghc }}_ci.csv | |
| bench/tasty/bench_${{ matrix.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 |