Skip to content

Commit 61199a9

Browse files
committed
Update release CI
1 parent 5c774d7 commit 61199a9

File tree

1 file changed

+50
-50
lines changed

1 file changed

+50
-50
lines changed

.github/workflows/integration-tests.yml

Lines changed: 50 additions & 50 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 15 March 2025, ubuntu-latest and windows-latest come with Stack 3.3.1
2010
# and GHC 9.12.1. However, macos-13 and macos-latest do not come with Haskell
2111
# tools. windows-latest comes with NSIS 3.10, for which the default value of the
@@ -32,19 +22,12 @@ jobs:
3222
fail-fast: false
3323
matrix:
3424
include:
25+
- os: ubuntu-22.04-arm
26+
release-args: "--alpine"
27+
cache-bust: "2024-05-17"
3528
- os: ubuntu-latest
3629
release-args: "--alpine"
3730
cache-bust: "2024-05-17"
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.3.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-02-07b"
4831
- os: windows-latest
4932
release-args: ""
5033
cache-bust: "2024-05-17"
@@ -78,7 +61,7 @@ jobs:
7861
run: |
7962
set -ex
8063
81-
if [[ "${{ matrix.os }}" == "ubuntu-24.04-arm" || "${{ matrix.os }}" == "macos-13" || "${{ matrix.os }}" == "macos-latest" ]]
64+
if [[ "${{ matrix.os }}" == "ubuntu-22.04-arm" || "${{ matrix.os }}" == "macos-13" || "${{ matrix.os }}" == "macos-latest" ]]
8265
then
8366
# ubuntu-24.04-arm, macos-13 and macos-latest do not include Haskell
8467
# tools as at 2025-03-15.
@@ -153,7 +136,7 @@ jobs:
153136
df -h
154137
155138
# Skip checks for Linux/AArch64, given checks for Linux/x86-64
156-
if [[ "${{ matrix.os }}" != "ubuntu-24.04-arm" ]]
139+
if [[ "${{ matrix.os }}" != "ubuntu-22.04-arm" ]]
157140
then
158141
# Do this in the same step as installing deps to get relevant env var modifications
159142
stack etc/scripts/release.hs check ${{ matrix.release-args }}
@@ -175,12 +158,52 @@ jobs:
175158
name: ${{ runner.os }}-${{ runner.arch }}
176159
path: _release/stack-*
177160

161+
freebsd-x64:
162+
name: FreeBSD X64
163+
runs-on: [self-hosted, FreeBSD, X64]
164+
steps:
165+
- name: Checkout code
166+
uses: actions/checkout@v4
167+
with:
168+
submodules: 'true'
169+
170+
- name: Install prerequisites
171+
run: |
172+
sudo sed -i.bak -e 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
173+
sudo pkg install -y ghc gcc curl git bash misc/compat10x misc/compat11x misc/compat12x gmake libiconv devel/stack
174+
sudo tzsetup Etc/GMT
175+
sudo adjkerntz -a
176+
177+
- uses: haskell/ghcup-setup@v1
178+
179+
- name: Install stack ghcup hook
180+
run: |
181+
set -eux
182+
ghcup install stack --set latest
183+
export STACK_ROOT="${GITHUB_WORKSPACE}"/.stack
184+
mkdir -p $STACK_ROOT/hooks/
185+
curl https://raw.githubusercontent.com/haskell/ghcup-hs/master/scripts/hooks/stack/ghc-install.sh > $STACK_ROOT/hooks/ghc-install.sh
186+
chmod +x $STACK_ROOT/hooks/ghc-install.sh
187+
stack config set system-ghc false --global
188+
189+
- name: Run build
190+
run: |
191+
export STACK_ROOT="${GITHUB_WORKSPACE}"/.stack
192+
export CABAL_DIR="$GITHUB_WORKSPACE/cabal"
193+
stack etc/scripts/release.hs build --allow-dirty
194+
- name: Upload bindist
195+
uses: actions/upload-artifact@v4
196+
with:
197+
name: FreeBSD-X64
198+
path: _release/stack-*
199+
178200
github-release:
179201
name: Create GitHub release
180202
permissions:
181203
contents: write
182204
needs:
183205
- integration-tests
206+
- linux-arm64
184207
runs-on: ubuntu-latest
185208
if: startsWith(github.ref, 'refs/tags/')
186209
steps:
@@ -209,21 +232,21 @@ jobs:
209232
with:
210233
name: Linux-ARM64
211234
path: _release
235+
- name: Download FreeBSD/X64 artifact
236+
uses: actions/download-artifact@v4
237+
with:
238+
name: FreeBSD-X64
239+
path: _release
212240
- name: Hash and sign assets
213241
shell: bash
214-
env:
215-
RELEASE_SIGNING_KEY: ${{ secrets.RELEASE_SIGNING_KEY }}
216242
run: |
217243
set -e
218-
echo "$RELEASE_SIGNING_KEY"|gpg --import
219244
cd _release
220245
for asset in *; do
221246
shasum -a 256 "$asset" >"$asset.sha256"
222-
gpg --digest-algo=sha512 --detach-sig --armor -u 0x575159689BEFB442 "$asset"
223247
done
224248
- name: Create GitHub release (final)
225249
id: github_release_final
226-
if: "!startsWith(github.ref, 'refs/tags/rc/')"
227250
uses: ncipollo/[email protected]
228251
env:
229252
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -240,19 +263,7 @@ jobs:
240263
[INSERT CONTRIBUTORS]
241264
draft: true
242265
prerelease: false
243-
- name: Create GitHub release (release candidate)
244-
id: github_release_rc
245-
if: "startsWith(github.ref, 'refs/tags/rc/')"
246-
uses: ncipollo/[email protected]
247-
env:
248-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
249-
with:
250-
body: |
251-
**Changes since v[INSERT PREVIOUS VERSION]:**
252266

253-
[INSERT CHANGELOG]
254-
draft: true
255-
prerelease: true
256267
- name: Upload assets to GitHub release (final)
257268
if: "!startsWith(github.ref, 'refs/tags/rc/')"
258269
uses: xresloader/upload-to-github-release@v1
@@ -264,14 +275,3 @@ jobs:
264275
prerelease: false
265276
overwrite: true
266277
release_id: ${{ steps.github_release_final.outputs.id }}
267-
- name: Upload assets to GitHub release (release candidate)
268-
if: "startsWith(github.ref, 'refs/tags/rc/')"
269-
uses: xresloader/upload-to-github-release@v1
270-
env:
271-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
272-
with:
273-
file: "_release/*"
274-
draft: true
275-
prerelease: true
276-
overwrite: true
277-
release_id: ${{ steps.github_release_rc.outputs.id }}

0 commit comments

Comments
 (0)