3 # See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency.
5 group: ${{ github.ref }}-${{ github.workflow }}
6 cancel-in-progress: true
22 ghc: ["8.10.7", "9.0.2", "9.2.7", "9.4.4"]
26 name: Bootstrap ${{ matrix.os }} ghc-${{ matrix.ghc }}
27 runs-on: ${{ matrix.os }}
29 - uses: actions/cache@v3
30 name: Cache the downloads
33 path: "/home/runner/work/cabal/cabal/_build"
34 key: bootstrap-${{ runner.os }}-${{ matrix.ghc }}-20221115-${{ github.sha }}
35 restore-keys: bootstrap-${{ runner.os }}-${{ matrix.ghc }}-20221115-
37 - uses: actions/checkout@v3
38 # See https://github.com/haskell/cabal/pull/8739
39 - name: Sudo chmod to permit ghcup to update its cache
41 if [[ "${{ runner.os }}" == "Linux" ]]; then
42 sudo ls -lah /usr/local/.ghcup/cache
43 sudo mkdir -p /usr/local/.ghcup/cache
44 sudo ls -lah /usr/local/.ghcup/cache
45 sudo chown -R $USER /usr/local/.ghcup
46 sudo chmod -R 777 /usr/local/.ghcup
50 GHC_VERSION=${{ matrix.ghc }}
52 ghcup config set cache true
53 ghcup install ghc $GHC_VERSION
55 # Fetch the bootstrap sources (we use linux dependencies also on macos)
56 python3 bootstrap/bootstrap.py -w $(ghcup whereis ghc $GHC_VERSION) -d bootstrap/linux-$GHC_VERSION.json fetch
58 # Bootstrap using the bootstrap sources
59 python3 bootstrap/bootstrap.py -w $(ghcup whereis ghc $GHC_VERSION) --bootstrap-sources bootstrap-sources.tar.gz
63 _build/bin/cabal --version
65 - uses: actions/upload-artifact@v3
67 name: cabal-${{ matrix.os }}-${{ matrix.ghc }}-bootstrapped
68 path: _build/artifacts/*