Skip to content

Commit 84d023b

Browse files
committed
Update release CI
1 parent 4937754 commit 84d023b

File tree

1 file changed

+54
-56
lines changed

1 file changed

+54
-56
lines changed

.github/workflows/integration-tests.yml

Lines changed: 54 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,16 @@
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-
19-
# As of 2025-11-05, ubuntu-latest and windows-latest come with Stack 3.7.1 and
20-
# GHC 9.12.2. However, macos-15-intel and macos-latest do not come with Haskell
21-
# tools. windows-latest no longer comes with NSIS 3.10, for which the default
22-
# value of the 'Unicode' installer attribute is 'true'. However, that is not the
23-
# 'large strings' build of NSIS and creates installers that corrupt the PATH
9+
# As of 15 March 2025, ubuntu-latest and windows-latest come with Stack 3.3.1
10+
# and GHC 9.12.1. However, macos-13 and macos-latest do not come with Haskell
11+
# tools. windows-latest comes with NSIS 3.10, for which the default value of the
12+
# 'Unicode' installer attribute is 'true'. However, that is not the 'large
13+
# strings' build of NSIS and creates installers that corrupt the PATH
2414
# environment variable if the default string length of 1024 characters is
2515
# exceeded.
2616

@@ -32,19 +22,12 @@ jobs:
3222
fail-fast: false
3323
matrix:
3424
include:
25+
- os: ubuntu-22.04-arm
26+
release-args: "--alpine --stack-args --docker-stack-exe=image"
27+
cache-bust: "2025-02-07b"
3528
- os: ubuntu-latest
3629
release-args: "--alpine"
3730
cache-bust: "2025-11-05"
38-
# On public preview since 16 January 2025
39-
- 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.7.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.)
46-
release-args: "--alpine --stack-args --docker-stack-exe=image"
47-
cache-bust: "2025-11-05"
4831
- os: windows-latest
4932
release-args: ""
5033
cache-bust: "2025-11-05"
@@ -97,7 +80,7 @@ jobs:
9780
run: |
9881
set -ex
9982
100-
if [[ "${{ matrix.os }}" == "ubuntu-24.04-arm" || "${{ matrix.os }}" == "macos-15-intel" || "${{ matrix.os }}" == "macos-latest" ]]
83+
if [[ "${{ matrix.os }}" == "ubuntu-22.04-arm" || "${{ matrix.os }}" == "macos-15-intel" || "${{ matrix.os }}" == "macos-latest" ]]
10184
then
10285
# ubuntu-24.04-arm, macos-15-intel and macos-latest do not include
10386
# Haskell tools as at 2025-12-19.
@@ -162,8 +145,7 @@ jobs:
162145
df -h
163146
164147
# Skip checks for Linux/AArch64, given checks for Linux/x86-64
165-
if [[ "${{ matrix.os }}" != "ubuntu-24.04-arm" ]]
166-
then
148+
if [[ "${{ matrix.os }}" != "ubuntu-22.04-arm" ]] ; then
167149
# Do this in the same step as installing deps to get relevant env var modifications
168150
stack etc/scripts/release.hs check ${{ matrix.release-args }}
169151
fi
@@ -184,6 +166,45 @@ jobs:
184166
name: ${{ runner.os }}-${{ runner.arch }}
185167
path: _release/stack-*
186168

169+
freebsd-x64:
170+
name: FreeBSD X64
171+
runs-on: [self-hosted, FreeBSD, X64]
172+
steps:
173+
- name: Checkout code
174+
uses: actions/checkout@v4
175+
with:
176+
submodules: 'true'
177+
178+
- name: Install prerequisites
179+
run: |
180+
sudo sed -i.bak -e 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
181+
sudo pkg install -y ghc gcc curl git bash misc/compat10x misc/compat11x misc/compat12x gmake libiconv devel/stack
182+
sudo tzsetup Etc/GMT
183+
sudo adjkerntz -a
184+
185+
- uses: haskell/ghcup-setup@v1
186+
187+
- name: Install stack ghcup hook
188+
run: |
189+
set -eux
190+
ghcup install stack --set latest
191+
export STACK_ROOT="${GITHUB_WORKSPACE}"/.stack
192+
mkdir -p $STACK_ROOT/hooks/
193+
curl https://raw.githubusercontent.com/haskell/ghcup-hs/master/scripts/hooks/stack/ghc-install.sh > $STACK_ROOT/hooks/ghc-install.sh
194+
chmod +x $STACK_ROOT/hooks/ghc-install.sh
195+
stack config set system-ghc false --global
196+
197+
- name: Run build
198+
run: |
199+
export STACK_ROOT="${GITHUB_WORKSPACE}"/.stack
200+
export CABAL_DIR="$GITHUB_WORKSPACE/cabal"
201+
stack etc/scripts/release.hs build --allow-dirty
202+
- name: Upload bindist
203+
uses: actions/upload-artifact@v4
204+
with:
205+
name: FreeBSD-X64
206+
path: _release/stack-*
207+
187208
github-release:
188209
name: Create GitHub release
189210
permissions:
@@ -218,21 +239,21 @@ jobs:
218239
with:
219240
name: Linux-ARM64
220241
path: _release
242+
- name: Download FreeBSD/X64 artifact
243+
uses: actions/download-artifact@v4
244+
with:
245+
name: FreeBSD-X64
246+
path: _release
221247
- name: Hash and sign assets
222248
shell: bash
223-
env:
224-
RELEASE_SIGNING_KEY: ${{ secrets.RELEASE_SIGNING_KEY }}
225249
run: |
226250
set -e
227-
echo "$RELEASE_SIGNING_KEY"|gpg --import
228251
cd _release
229252
for asset in *; do
230253
shasum -a 256 "$asset" >"$asset.sha256"
231-
gpg --digest-algo=sha512 --detach-sig --armor -u 0x575159689BEFB442 "$asset"
232254
done
233255
- name: Create GitHub release (final)
234256
id: github_release_final
235-
if: "!startsWith(github.ref, 'refs/tags/rc/')"
236257
uses: ncipollo/release-action@v1.13.0
237258
env:
238259
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -249,19 +270,7 @@ jobs:
249270
[INSERT CONTRIBUTORS]
250271
draft: true
251272
prerelease: false
252-
- name: Create GitHub release (release candidate)
253-
id: github_release_rc
254-
if: "startsWith(github.ref, 'refs/tags/rc/')"
255-
uses: ncipollo/release-action@v1.13.0
256-
env:
257-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
258-
with:
259-
body: |
260-
**Changes since v[INSERT PREVIOUS VERSION]:**
261273

262-
[INSERT CHANGELOG]
263-
draft: true
264-
prerelease: true
265274
- name: Upload assets to GitHub release (final)
266275
if: "!startsWith(github.ref, 'refs/tags/rc/')"
267276
uses: xresloader/upload-to-github-release@v1
@@ -273,14 +282,3 @@ jobs:
273282
prerelease: false
274283
overwrite: true
275284
release_id: ${{ steps.github_release_final.outputs.id }}
276-
- name: Upload assets to GitHub release (release candidate)
277-
if: "startsWith(github.ref, 'refs/tags/rc/')"
278-
uses: xresloader/upload-to-github-release@v1
279-
env:
280-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
281-
with:
282-
file: "_release/*"
283-
draft: true
284-
prerelease: true
285-
overwrite: true
286-
release_id: ${{ steps.github_release_rc.outputs.id }}

0 commit comments

Comments
 (0)