Bump actions/checkout from 5 to 6 #121
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: one-time-password | |
| # Trigger the workflow on push or pull request, but only for the master branch | |
| on: | |
| pull_request: | |
| push: | |
| branches: ["master"] | |
| jobs: | |
| generateMatrix: | |
| name: "Generate matrix from cabal" | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - name: Checkout base repo | |
| uses: actions/checkout@v6 | |
| - name: Extract the tested GHC versions | |
| id: set-matrix | |
| run: | | |
| wget https://github.com/Kleidukos/get-tested/releases/download/v0.1.4.0/get-tested-0.1.4.0-linux-amd64 -O get-tested | |
| chmod +x get-tested | |
| ./get-tested --ubuntu --macos one-time-password.cabal >> $GITHUB_OUTPUT | |
| tests: | |
| name: ${{ matrix.ghc }} on ${{ matrix.os }} | |
| needs: generateMatrix | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: ${{ fromJSON(needs.generateMatrix.outputs.matrix) }} | |
| steps: | |
| - name: Checkout base repo | |
| uses: actions/checkout@v6 | |
| - name: Set up Haskell | |
| id: setup-haskell | |
| uses: haskell-actions/setup@v2 | |
| with: | |
| ghc-version: ${{ matrix.ghc }} | |
| cabal-version: 'latest' | |
| - name: Configure | |
| run: | | |
| ./.github/workflows/install-libsodium.sh | |
| cabal freeze | |
| - name: Cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.setup-haskell.outputs.cabal-store }} | |
| key: ${{ runner.os }}-ghc-${{ matrix.ghc }}-cabal-${{ hashFiles('**/plan.json') }} | |
| restore-keys: ${{ runner.os }}-ghc-${{ matrix.ghc }}- | |
| - name: Test with homebrew on macOS | |
| if: ${{ matrix.os == 'macos-latest' }} | |
| run: | | |
| cabal build --project-file=cabal.homebrew.project -v2 all | |
| cabal test --project-file=cabal.homebrew.project all | |
| - name: Test with pkg-config | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| run: | | |
| cabal build --project-file=cabal.pkg-config.project -v2 all | |
| cabal test --project-file=cabal.pkg-config.project all |