Fix dirio tests #3801
Workflow file for this run
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: API | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| jobs: | |
| packdiff: | |
| name: "Signature diff: master vs PR" | |
| env: | |
| GHCVER: 9.8.4 | |
| GHCUP_VERSION: 0.1.50.2 | |
| runs-on: ubuntu-latest | |
| steps: | |
| # This should happen before cache restore. | |
| - name: Remove ~/.ghcup symlink | |
| run: | | |
| rm -f ~/.ghcup | |
| - name: Cache ghcup and ghc (non-Windows) | |
| uses: actions/cache@v4 | |
| if: runner.os != 'Windows' | |
| with: | |
| path: | | |
| ~/.ghcup | |
| key: ${{ runner.os }}-ghcup-${{ env.GHCUP_VERSION }}-${{ env.GHCVER }} | |
| - name: Cache hackage package index (non-Windows) | |
| uses: actions/cache@v4 | |
| if: runner.os != 'Windows' | |
| with: | |
| path: | | |
| ~/.cache/cabal/packages | |
| # Bump the key version to clear the cache | |
| key: cache-cabal-packages | |
| - name: Cache packdiff (non-Windows) | |
| uses: actions/cache@v4 | |
| if: runner.os != 'Windows' | |
| with: | |
| path: | | |
| ~/.local/bin | |
| ~/.local/state/cabal | |
| # Bump the key version to clear the cache | |
| key: packdiff-ghc-${{ env.GHCVER }} | |
| - name: Checkout the current branch | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # Use a sane PATH, especially to pick the right GHC | |
| - name: Set PATH to add .local and .ghcup | |
| run: echo "$HOME/.local/bin:$HOME/.ghcup/bin:/bin:/usr/bin" > $GITHUB_PATH | |
| - name: Download ghc | |
| run: | | |
| if ! ghc --version 2>/dev/null | grep -q "$GHCVER" | |
| then | |
| curl -sL -o ./ghcup https://downloads.haskell.org/~ghcup/$GHCUP_VERSION/x86_64-linux-ghcup-$GHCUP_VERSION | |
| chmod +x ./ghcup | |
| export GHCUP_INSTALL_BASE_PREFIX=$HOME | |
| ./ghcup install ghc $GHCVER | |
| ./ghcup set ghc $GHCVER | |
| ./ghcup install cabal | |
| fi | |
| # XXX update only if not present | |
| cabal update | |
| - name: Install packdiff | |
| run: | | |
| if [ ! -f $HOME/.local/bin/packdiff ]; then | |
| mkdir -p $HOME/.local/bin | |
| # IMPORTANT: do not replace $HOME with ~, tilde is not expanded by | |
| # shell in the middle of a command string. | |
| cabal install packdiff --project-file=cabal.project.packdiff --installdir=$HOME/.local/bin --overwrite-policy=always | |
| fi | |
| - name: API diff for streamly-core | |
| run: packdiff diff streamly-core $(git rev-parse origin/master) streamly-core $(git rev-parse HEAD) | |
| - name: API diff for streamly | |
| run: packdiff diff streamly $(git rev-parse origin/master) streamly $(git rev-parse HEAD) |