Skip to content

Commit 3a81c60

Browse files
committed
Add manual comprehensive release CI job
1 parent 53aacfb commit 3a81c60

File tree

1 file changed

+156
-0
lines changed

1 file changed

+156
-0
lines changed
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
name: Comprehensive CI "Release" flow
2+
3+
# Manual trigger only - for pre-release validation and comprehensive testing
4+
on:
5+
workflow_dispatch:
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
# Test all LLVM versions (14-21) on recommended configuration
13+
test-all-llvm-versions:
14+
name: Test All LLVM Versions (${{ matrix.runner }}, GHC ${{ matrix.ghc }}, LLVM ${{ matrix.llvm }})
15+
runs-on: ${{ matrix.runner }}
16+
timeout-minutes: 45
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
runner: [ubuntu-latest]
21+
ghc: ['9.4.8']
22+
llvm: ['14', '15', '16', '17', '18', '19', '20', '21']
23+
steps:
24+
- name: Set git to use LF
25+
run: |
26+
git config --global core.autocrlf false
27+
git config --global core.eol lf
28+
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
32+
- name: Build and test
33+
uses: ./.github/actions/base
34+
with:
35+
runner: ${{ matrix.runner }}
36+
ghc: ${{ matrix.ghc }}
37+
llvm: ${{ matrix.llvm }}
38+
39+
cabal-check:
40+
name: Cabal check (${{ matrix.package }}) & sdist build
41+
runs-on: ubuntu-latest
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
package:
46+
- ansi-diff
47+
- c-expr-runtime
48+
- c-expr-dsl
49+
- hs-bindgen
50+
- hs-bindgen-runtime
51+
- hs-bindgen-test-runtime
52+
ghc-version: ['9.4.8']
53+
cabal-version: ['3.16']
54+
llvm-version: ['15']
55+
steps:
56+
- name: 📥 Checkout repository
57+
uses: actions/checkout@v5
58+
59+
- name: 🛠️ Setup Haskell
60+
id: setup-haskell
61+
uses: haskell-actions/setup@v2
62+
with:
63+
ghc-version: ${{ matrix.ghc-version }}
64+
cabal-version: ${{ matrix.cabal-version }}
65+
66+
- name: 💾 Run cabal check
67+
run: |
68+
cd ${{ matrix.package }}
69+
cabal check
70+
71+
- name: 💾 Generate sdist
72+
run: |
73+
cd ${{ matrix.package }}
74+
cabal sdist
75+
76+
- name: 💾 Test sdist can be built
77+
run: |
78+
SDIST_FILE=$(find ${{ matrix.package }}/dist-newstyle/sdist -name "*.tar.gz" | head -1)
79+
if [[ -z "$SDIST_FILE" ]]; then
80+
echo "Error: sdist file not found"
81+
exit 1
82+
fi
83+
84+
TEMP_DIR=$(mktemp -d)
85+
tar xzf "$SDIST_FILE" -C "$TEMP_DIR"
86+
cd "$TEMP_DIR"/*
87+
88+
cabal build --dry-run
89+
90+
# Build Haddock documentation for all packages
91+
build-haddock:
92+
name: Build Haddock (${{ matrix.package }})
93+
runs-on: ubuntu-latest
94+
timeout-minutes: 30
95+
strategy:
96+
fail-fast: false
97+
matrix:
98+
package:
99+
- ansi-diff
100+
- c-expr-runtime
101+
- c-expr-dsl
102+
- hs-bindgen
103+
- hs-bindgen-runtime
104+
- hs-bindgen-test-runtime
105+
ghc-version: ['9.4.8']
106+
cabal-version: ['3.16']
107+
llvm-version: ['15']
108+
steps:
109+
- name: 📥 Checkout repository
110+
uses: actions/checkout@v5
111+
112+
- name: 🛠️ Setup Haskell
113+
id: setup-haskell
114+
uses: haskell-actions/setup@v2
115+
with:
116+
ghc-version: ${{ matrix.ghc-version }}
117+
cabal-version: ${{ matrix.cabal-version }}
118+
119+
- name: 🛠️ Setup LLVM/Clang
120+
uses: ./.github/actions/setup-llvm
121+
with:
122+
version: ${{ matrix.llvm-version }}
123+
124+
- name: 🛠️ caba.project
125+
run: cp cabal.project.ci cabal.project
126+
127+
- name: 💾 Generate Cabal plan
128+
run: cabal build all --dry-run
129+
130+
- name: 💾 Restore Cabal dependencies
131+
id: cache-cabal-restore
132+
uses: actions/cache/restore@v4
133+
with:
134+
key: haddock-${{ matrix.package }}-ubuntu-latest-ghc-${{ steps.setup-haskell.outputs.ghc-version }}-cabal-${{ steps.setup-haskell.outputs.cabal-version }}-llvm-15-plan-${{ hashFiles('dist-newstyle/cache/plan.json') }}
135+
restore-keys: |
136+
haddock-${{ matrix.package }}-ubuntu-latest-ghc-${{ steps.setup-haskell.outputs.ghc-version }}-cabal-${{ steps.setup-haskell.outputs.cabal-version }}-llvm-15-
137+
138+
- name: 🛠️ Build Cabal dependencies
139+
run: cabal build all --only-dependencies
140+
141+
- name: 💾 Save Cabal dependencies
142+
uses: actions/cache/save@v4
143+
if: ${{ steps.cache-cabal-restore.outputs.cache-hit != 'true' }}
144+
with:
145+
path: ${{ steps.setup-haskell.outputs.cabal-store }}
146+
key: ${{ steps.cache-cabal-restore.outputs.cache-primary-key }}
147+
148+
- name: 🏗️ Build package
149+
run: |
150+
cd ${{ matrix.package }}
151+
cabal build
152+
153+
- name: 🏗️ Build Haddock
154+
run: |
155+
cd ${{ matrix.package }}
156+
cabal haddock --haddock-for-hackage

0 commit comments

Comments
 (0)