Bump actions/checkout from 2 to 4 #223
Workflow file for this run
This file contains 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: Haskell CI | |
on: | |
pull_request: | |
branches: | |
- "**" | |
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@v4 | |
- name: Extract the tested GHC versions | |
id: set-matrix | |
run: | | |
wget https://github.com/Kleidukos/get-tested/releases/download/v0.1.5.0/get-tested-0.1.5.0-linux-amd64 -O get-tested | |
chmod +x get-tested | |
./get-tested --ubuntu tree-sitter/tree-sitter.cabal >> $GITHUB_OUTPUT | |
build: | |
name: ${{ matrix.ghc }} on ${{ matrix.os }} | |
needs: generateMatrix | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: ${{ fromJSON(needs.generateMatrix.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v4 | |
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main' | |
- uses: haskell/actions/setup@v1 | |
name: Setup Haskell | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
- name: Cache | |
uses: actions/[email protected] | |
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 }}- | |
- uses: actions/cache@v2 | |
name: Cache dist-newstyle | |
with: | |
path: dist-newstyle | |
key: ${{ runner.os }}-${{ matrix.ghc }}-repo-dist | |
- name: Install dependencies | |
run: | | |
git submodule update -i --recursive | |
cabal update | |
cabal configure --enable-benchmarks --enable-tests --write-ghc-environment-files=always -j2 -O0 | |
cabal build --only-dependencies all | |
- name: Build & test | |
run: | | |
cabal build all | |
cabal test all | |
cabal haddock all | |
cabal sdist all | |
for p in tree-sitter* ; do echo "$p" ; cd "$p" ; cabal check ; cd ..; done |