Skip to content

Commit 503cb8c

Browse files
committed
Update release CI
1 parent c7eb848 commit 503cb8c

1 file changed

Lines changed: 47 additions & 55 deletions

File tree

.github/workflows/integration-tests.yml

Lines changed: 47 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
11
name: Integration tests
22

33
on:
4-
pull_request:
54
push:
6-
branches:
7-
- master
8-
- stable
9-
- rc/**
105
tags:
116
- '**'
127
workflow_dispatch:
138

14-
# Stack will use the value of the GH_TOKEN environment variable to authenticate
15-
# its requests of the GitHub REST API, providing a higher request rate limit.
16-
env:
17-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18-
199
# As of 2026-01-30, ubuntu-latest and windows-latest come with Stack 3.9.1 and
2010
# GHC 9.14.1. However, macos-15-intel and macos-latest do not come with Haskell
2111
# tools. windows-latest no longer comes with NSIS 3.10, for which the default
@@ -32,18 +22,11 @@ jobs:
3222
fail-fast: false
3323
matrix:
3424
include:
35-
- os: ubuntu-latest
36-
release-args: "--alpine"
37-
cache-bust: "2025-11-05"
38-
# On public preview since 16 January 2025
3925
- os: ubuntu-24.04-arm
40-
# Stack's project-level configuration (stack.yaml) specifies the
41-
# multi-architecture (including Linux/Aarch64) Docker image published
42-
# by Oliver Benz (@benz0li, on GitHub). That image comes with
43-
# Stack 3.9.1. (Note that the online documentation for
44-
# '--docker-stack-exe image' specifies that the host Stack and image
45-
# Stack must have the same version number.)
4626
release-args: "--alpine --stack-args --docker-stack-exe=image"
27+
cache-bust: "2025-02-07b"
28+
- os: ubuntu-latest
29+
release-args: "--alpine"
4730
cache-bust: "2025-11-05"
4831
- os: windows-latest
4932
release-args: ""
@@ -151,14 +134,6 @@ jobs:
151134
EOF
152135
fi
153136
154-
# A temporary fix, due to Docker 29.0.0 and later producing an error
155-
# message in a format not recognised by Stack 3.9.1 or earlier. See
156-
# https://github.com/commercialhaskell/stack/issues/6848
157-
if [[ "${{ matrix.release-args }}" == "--alpine" ]]
158-
then
159-
docker pull quay.io/benz0li/ghc-musl:9.10.3
160-
fi
161-
162137
# In case GHCup hooks have been created, remove them
163138
if [ -d $(stack path --stack-root)/hooks ]
164139
then
@@ -192,6 +167,45 @@ jobs:
192167
name: ${{ runner.os }}-${{ runner.arch }}
193168
path: _release/stack-*
194169

170+
freebsd-x64:
171+
name: FreeBSD X64
172+
runs-on: [self-hosted, FreeBSD, X64]
173+
steps:
174+
- name: Checkout code
175+
uses: actions/checkout@v4
176+
with:
177+
submodules: 'true'
178+
179+
- name: Install prerequisites
180+
run: |
181+
sudo sed -i.bak -e 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
182+
sudo pkg install -y ghc gcc curl git bash misc/compat10x misc/compat11x misc/compat12x gmake libiconv devel/stack
183+
sudo tzsetup Etc/GMT
184+
sudo adjkerntz -a
185+
186+
- uses: haskell/ghcup-setup@v1
187+
188+
- name: Install stack ghcup hook
189+
run: |
190+
set -eux
191+
ghcup install stack --set latest
192+
export STACK_ROOT="${GITHUB_WORKSPACE}"/.stack
193+
mkdir -p $STACK_ROOT/hooks/
194+
curl https://raw.githubusercontent.com/haskell/ghcup-hs/master/scripts/hooks/stack/ghc-install.sh > $STACK_ROOT/hooks/ghc-install.sh
195+
chmod +x $STACK_ROOT/hooks/ghc-install.sh
196+
stack config set system-ghc false --global
197+
198+
- name: Run build
199+
run: |
200+
export STACK_ROOT="${GITHUB_WORKSPACE}"/.stack
201+
export CABAL_DIR="$GITHUB_WORKSPACE/cabal"
202+
stack etc/scripts/release.hs build --allow-dirty
203+
- name: Upload bindist
204+
uses: actions/upload-artifact@v6
205+
with:
206+
name: FreeBSD-X64
207+
path: _release/stack-*
208+
195209
github-release:
196210
name: Create GitHub release
197211
permissions:
@@ -226,17 +240,18 @@ jobs:
226240
with:
227241
name: Linux-ARM64
228242
path: _release
243+
- name: Download FreeBSD/X64 artifact
244+
uses: actions/download-artifact@v7
245+
with:
246+
name: FreeBSD-X64
247+
path: _release
229248
- name: Hash and sign assets
230249
shell: bash
231-
env:
232-
RELEASE_SIGNING_KEY: ${{ secrets.RELEASE_SIGNING_KEY }}
233250
run: |
234251
set -e
235-
echo "$RELEASE_SIGNING_KEY"|gpg --import
236252
cd _release
237253
for asset in *; do
238254
shasum -a 256 "$asset" >"$asset.sha256"
239-
gpg --digest-algo=sha512 --detach-sig --armor -u 0x575159689BEFB442 "$asset"
240255
done
241256
- name: Create GitHub release (final)
242257
id: github_release_final
@@ -257,19 +272,7 @@ jobs:
257272
[INSERT CONTRIBUTORS]
258273
draft: true
259274
prerelease: false
260-
- name: Create GitHub release (release candidate)
261-
id: github_release_rc
262-
if: "startsWith(github.ref, 'refs/tags/rc/')"
263-
uses: ncipollo/release-action@v1.20.0
264-
env:
265-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
266-
with:
267-
body: |
268-
**Changes since v[INSERT PREVIOUS VERSION]:**
269275

270-
[INSERT CHANGELOG]
271-
draft: true
272-
prerelease: true
273276
- name: Upload assets to GitHub release (final)
274277
if: "!startsWith(github.ref, 'refs/tags/rc/')"
275278
uses: xresloader/upload-to-github-release@v1
@@ -281,14 +284,3 @@ jobs:
281284
prerelease: false
282285
overwrite: true
283286
release_id: ${{ steps.github_release_final.outputs.id }}
284-
- name: Upload assets to GitHub release (release candidate)
285-
if: "startsWith(github.ref, 'refs/tags/rc/')"
286-
uses: xresloader/upload-to-github-release@v1
287-
env:
288-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
289-
with:
290-
file: "_release/*"
291-
draft: true
292-
prerelease: true
293-
overwrite: true
294-
release_id: ${{ steps.github_release_rc.outputs.id }}

0 commit comments

Comments
 (0)