Skip to content

Commit 174f699

Browse files
committed
WIP
1 parent b92a08e commit 174f699

File tree

3 files changed

+79
-4
lines changed

3 files changed

+79
-4
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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 }}

.github/workflows/ci.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ jobs:
108108
--project-file="${{ matrix.cabal-project-file || env.DEFAULT_CABAL_PROJECT_FILE }}" \
109109
--only-dependencies
110110
111-
cabal build --only-dependencies ./scripts/check-release.hs
112-
113111
- name: 💾 Save Cabal dependencies
114112
uses: actions/cache/save@v4
115113
if: ${{ !env.ACT && steps.cache-cabal.outputs.cache-hit != 'true' }}
@@ -123,8 +121,6 @@ jobs:
123121
cabal build all \
124122
--project-file="${{ matrix.cabal-project-file || env.DEFAULT_CABAL_PROJECT_FILE }}"
125123
126-
cabal build ./scripts/check-release.hs
127-
128124
- name: 🧪 Test
129125
if: ${{ !matrix.cabal-skip-tests }}
130126
run: |
@@ -346,6 +342,26 @@ jobs:
346342
- name: 🎗️ Lint with ShellCheck
347343
run: ./scripts/lint-shellcheck.sh
348344

345+
################################################################################
346+
# Check release builds
347+
################################################################################
348+
check-release-builds:
349+
name: Check release builds
350+
runs-on: ubuntu-latest
351+
steps:
352+
- name: 📥 Checkout repository
353+
uses: actions/checkout@v4
354+
355+
- name: 🛠️ Check release builds
356+
uses: ./.github/actions/check-release-builds
357+
with:
358+
ghc-version: ${{ env.DEFAULT_GHC_VERSION }}
359+
cabal-version: ${{ env.DEFAULT_CABAL_VERSION }}
360+
hackage-index-state: "2025-06-16T00:00:00Z"
361+
# Run without supplying any cabal files just to verify whether the
362+
# script runs without problems.
363+
cabal-files: ""
364+
349365
################################################################################
350366
# Publish documentation
351367
################################################################################
File renamed without changes.

0 commit comments

Comments
 (0)