Skip to content

Commit 83cf15f

Browse files
authored
ci: specify GHC_VERSION for ARM build on CI config
* change cabal version from recommended to latest
1 parent 40dc46e commit 83cf15f

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.github/scripts/arm/build.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44

55
[ -z "$1" ] && { echo "Missing 1st argument: PostgREST github commit SHA"; exit 1; }
66
[ -z "$2" ] && { echo "Missing 2nd argument: Build environment directory name"; exit 1; }
7+
[ -z "$3" ] && { echo "Missing 3rd argument: GHC version"; exit 1; }
78

89
PGRST_GITHUB_COMMIT="$1"
910
SCRIPT_DIR="$2"
1011

1112
DOCKER_BUILD_DIR="$SCRIPT_DIR/docker-env"
12-
CABAL_VERSION="3.6.0.0"
13-
GHC_VERSION="9.2.4"
13+
# latest is a shortcut documented on https://www.haskell.org/ghcup/guide/#tags-and-shortcuts
14+
CABAL_VERSION="latest"
15+
GHC_VERSION="$3"
1416

1517
install_packages() {
1618
sudo apt-get update -y

.github/workflows/ci.yaml

+8-3
Original file line numberDiff line numberDiff line change
@@ -247,13 +247,18 @@ jobs:
247247
run: cabal build --enable-tests --enable-benchmarks all
248248

249249
Build-Cabal-Arm:
250-
name: Build aarch64 (Cabal)
250+
strategy:
251+
matrix:
252+
ghc: ['9.2.4']
253+
fail-fast: false
254+
name: Build aarch64 (Cabal, GHC ${{ matrix.ghc }})
251255
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/rel-') }}
252256
runs-on: ubuntu-latest
253257
outputs:
254258
remotepath: ${{ steps.Remote-Dir.outputs.remotepath }}
255259
env:
256260
GITHUB_COMMIT: ${{ github.sha }}
261+
GHC_VERSION: ${{ matrix.ghc }}
257262
steps:
258263
- uses: actions/checkout@v3
259264
- id: Remote-Dir
@@ -280,8 +285,8 @@ jobs:
280285
fingerprint: ${{ secrets.SSH_ARM_FINGERPRINT }}
281286
command_timeout: 120m
282287
script_stop: true
283-
envs: GITHUB_COMMIT,REMOTE_DIR
284-
script: bash ~/$REMOTE_DIR/build.sh "$GITHUB_COMMIT" "$REMOTE_DIR"
288+
envs: GITHUB_COMMIT,REMOTE_DIR,GHC_VERSION
289+
script: bash ~/$REMOTE_DIR/build.sh "$GITHUB_COMMIT" "$REMOTE_DIR" "GHC_VERSION"
285290
- name: Download binaries from remote server
286291
uses: nicklasfrahm/scp-action@main
287292
with:

0 commit comments

Comments
 (0)