Skip to content

Andreas make-build changes #111

Andreas make-build changes

Andreas make-build changes #111

Workflow file for this run

name: CI
# Trigger the workflow on push or pull request, but only for the master branch
on:
pull_request:
types:
- opened
- synchronize
push:
branches: [master]
jobs:
cabal:
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ghc: ['9.8.4'] # bootstrapping compiler
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- uses: haskell/ghcup-setup@v1
- id: ghcup
run: |
ghcup config set cache true
echo "basedir=$(ghcup whereis basedir)" >> $GITHUB_OUTPUT
- id: ghcup-cache
name: Cache GHCup basedir
uses: actions/cache@v4
with:
key: ghcup-basedir-${{ github.run_id }}
restore-keys: ghcup-basedir-
path: ${{ steps.ghcup.outputs.basedir }}
- run: |
ghcup install ghc --set ${{ matrix.ghc }}
ghcup install cabal --set
- id: cabal-paths
run: |
cabal user-config init
echo "store=$(cabal path --store-dir)" >> $GITHUB_OUTPUT
echo "remote-repo-cache=$(cabal path --remote-repo-cache)" >> $GITHUB_OUTPUT
- name: Restore Hackage index
uses: actions/cache/restore@v4
with:
key: hackage-${{ github.run_id }}
restore-keys: hackage-
path: ${{ steps.cabal-paths.outputs.remote-repo-cache }}
- run: cabal update
- name: Restore build artifacts
uses: actions/cache/restore@v4
with:
key: ${{ matrix.os }}-${{ matrix.ghc }}-${{ github.run_id }}
restore-keys: ${{ matrix.os }}-${{ matrix.ghc }}-
path: |
${{ steps.cabal-paths.outputs.store }}
libraries/Cabal/dist-newstyle
_build
- # This runs autoconf also in the subdirectories
run: autoreconf -v
- name: Build the bindist
run: make
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: bindist
path: _build/bindist
- name: Run the testsuite
run: make test
- name: Upload test results
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }} # upload test results even if the testsuite failed to pass
with:
name: testsuite-results
path: |
_build/test-perf.csv
_build/test-summary.txt
_build/test-junit.xml
- name: Save GHCup cache
uses: actions/cache/save@v4
if: always()
with:
key: ghcup-${{ github.run_id }}
path: ${{ steps.ghcup.outputs.cachedir }}
- name: Save Hackage index
uses: actions/cache/save@v4
if: always()
with:
key: hackage-${{ github.run_id }}
path: ${{ steps.cabal-paths.outputs.remote-repo-cache }}
- name: Save build artifacts
if: always()
uses: actions/cache/save@v4
with:
key: ${{ matrix.os }}-${{ matrix.ghc }}-${{ github.run_id }}
path: |
${{ steps.cabal-paths.outputs.store }}
libraries/Cabal/dist-newstyle
_build