Refactor CI #28
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: Playground | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| pull_request: | |
| merge_group: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| # Set the default shell on all platforms. | |
| defaults: | |
| run: | |
| shell: sh | |
| jobs: | |
| ################################################################################ | |
| # Build | |
| ################################################################################ | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 60 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ["ubuntu-latest", "macOS-latest", "windows-latest"] | |
| ghc-version: ["9.2", "9.4", "9.6", "9.8", "9.10", "9.12"] | |
| cabal-version: ["3.12"] | |
| botan-version: ["3.9.0"] | |
| include: | |
| - os: "ubuntu-latest" | |
| ghc-version: "9.6" | |
| cabal-version: "3.12" | |
| botan-version: "3.0.0" | |
| - os: "ubuntu-latest" | |
| ghc-version: "9.6" | |
| cabal-version: "3.12" | |
| botan-version: "3.1.1" | |
| - os: "ubuntu-latest" | |
| ghc-version: "9.6" | |
| cabal-version: "3.12" | |
| botan-version: "3.2.0" | |
| - os: "ubuntu-latest" | |
| ghc-version: "9.6" | |
| cabal-version: "3.12" | |
| botan-version: "3.3.0" | |
| - os: "ubuntu-latest" | |
| ghc-version: "9.6" | |
| cabal-version: "3.12" | |
| botan-version: "3.4.0" | |
| - os: "ubuntu-latest" | |
| ghc-version: "9.6" | |
| cabal-version: "3.12" | |
| botan-version: "3.5.0" | |
| - os: "ubuntu-latest" | |
| ghc-version: "9.6" | |
| cabal-version: "3.12" | |
| botan-version: "3.6.1" | |
| - os: "ubuntu-latest" | |
| ghc-version: "9.6" | |
| cabal-version: "3.12" | |
| botan-version: "3.7.1" | |
| - os: "ubuntu-latest" | |
| ghc-version: "9.6" | |
| cabal-version: "3.12" | |
| botan-version: "3.8.1" | |
| steps: | |
| - name: 📥 Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: 🛠️ Setup Botan | |
| uses: ./.github/actions/setup-botan | |
| with: | |
| botan-version: ${{ matrix.botan-version }} | |
| cache-label: "ghc-${{ matrix.ghc-version }}-cabal-${{ matrix.cabal-version }}" | |
| - name: 🛠️ Setup Haskell | |
| id: setup-haskell | |
| uses: haskell-actions/setup@v2 | |
| with: | |
| ghc-version: ${{ matrix.ghc-version }} | |
| cabal-version: ${{ matrix.cabal-version }} | |
| - name: 🛠️ Configure | |
| run: | | |
| cabal configure \ | |
| --enable-tests \ | |
| --enable-benchmarks \ | |
| --disable-documentation \ | |
| --ghc-options="-Werror" \ | |
| cat "cabal.project.local" | |
| - name: 💾 Generate Cabal plan | |
| run: | | |
| cabal build all --dry-run | |
| - name: 💾 Restore cache | |
| uses: actions/cache/restore@v4 | |
| id: restore-cabal-cache | |
| env: | |
| key: build-botan-${{ runner.os }}-ghc-${{ steps.setup-haskell.outputs.ghc-version }}-cabal-${{ steps.setup-haskell.outputs.cabal-version }}-Botan-${{ matrix.botan-version }} | |
| with: | |
| path: ${{ steps.setup-haskell.outputs.cabal-store }} | |
| key: ${{ env.key }}-plan-${{ hashFiles('dist-newstyle/cache/plan.json') }} | |
| restore-keys: ${{ env.key }}- | |
| - name: 🛠️ Build Cabal dependencies | |
| run: | | |
| cabal build all --only-dependencies | |
| - name: 💾 Save cache | |
| uses: actions/cache/save@v4 | |
| if: ${{ steps.restore-cabal-cache.outputs.cache-hit != 'true' }} | |
| with: | |
| path: ${{ steps.setup-haskell.outputs.cabal-store }} | |
| key: ${{ steps.restore-cabal-cache.outputs.cache-primary-key }} |