|
| 1 | +name: "Check release builds" |
| 2 | +description: "Check release builds for public libraries in local packages" |
| 3 | +inputs: |
| 4 | + ghc-version: |
| 5 | + required: true |
| 6 | + description: "Version of GHC" |
| 7 | + cabal-version: |
| 8 | + required: true |
| 9 | + description: "Version of cabal" |
| 10 | + hackage-index-state: |
| 11 | + required: true |
| 12 | + description: "Timestamp for Hackage index" |
| 13 | + cabal-files: |
| 14 | + required: true |
| 15 | + description: "Cabal files of the libraries that should be checked" |
| 16 | +runs: |
| 17 | + using: composite |
| 18 | + steps: |
| 19 | + - name: 🛠️ Install Haskell |
| 20 | + uses: haskell-actions/setup@v2 |
| 21 | + id: setup-haskell |
| 22 | + with: |
| 23 | + ghc-version: ${{ inputs.ghc-version }} |
| 24 | + cabal-version: ${{ inputs.cabal-version }} |
| 25 | + |
| 26 | + - name: 💾 Restore Cabal dependencies |
| 27 | + uses: actions/cache/restore@v4 |
| 28 | + if: ${{ !env.ACT }} |
| 29 | + id: cache-cabal |
| 30 | + with: |
| 31 | + path: ${{ steps.setup-haskell.outputs.cabal-store }} |
| 32 | + key: check-release-builds-${{ runner.os }}-ghc-${{ steps.setup-haskell.outputs.ghc-version }}-cabal-${{ steps.setup-haskell.outputs.cabal-version }}-input-state-${{ inputs.hackage-index-state }} |
| 33 | + |
| 34 | + - name: 🛠️ Build Cabal dependencies |
| 35 | + shell: sh |
| 36 | + run: | |
| 37 | + cabal build ./scripts/check-release-builds.hs \ |
| 38 | + ${{ inputs.hackage-index-state && format('--index-state={0}', inputs.hackage-index-state) }} \ |
| 39 | + --only-dependencies |
| 40 | +
|
| 41 | + - name: 💾 Save Cabal dependencies |
| 42 | + uses: actions/cache/save@v4 |
| 43 | + if: ${{ !env.ACT && steps.cache-cabal.outputs.cache-hit != 'true' }} |
| 44 | + with: |
| 45 | + path: ${{ steps.setup-haskell.outputs.cabal-store }} |
| 46 | + key: ${{ steps.cache-cabal.outputs.cache-primary-key }} |
| 47 | + |
| 48 | + - name: 🏗️ Build |
| 49 | + shell: sh |
| 50 | + run: | |
| 51 | + cabal build ./scripts/check-release-builds.hs \ |
| 52 | + ${{ inputs.hackage-index-state && format('--index-state={0}', inputs.hackage-index-state) }} |
| 53 | +
|
| 54 | + - name: 🛠️ Check release builds |
| 55 | + shell: sh |
| 56 | + run: | |
| 57 | + cabal run ./scripts/check-release-builds.hs \ |
| 58 | + ${{ inputs.hackage-index-state && format('--index-state={0}', inputs.hackage-index-state) }} \ |
| 59 | + -- ${{ inputs.cabal-files }} |
0 commit comments