Skip to content

Commit

Permalink
ci: specify GHC_VERSION for ARM build on CI config
Browse files Browse the repository at this point in the history
* change cabal version from recommended to latest
  • Loading branch information
laurenceisla committed Jun 21, 2023
1 parent 40dc46e commit 83cf15f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .github/scripts/arm/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@

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

PGRST_GITHUB_COMMIT="$1"
SCRIPT_DIR="$2"

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

install_packages() {
sudo apt-get update -y
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,18 @@ jobs:
run: cabal build --enable-tests --enable-benchmarks all

Build-Cabal-Arm:
name: Build aarch64 (Cabal)
strategy:
matrix:
ghc: ['9.2.4']
fail-fast: false
name: Build aarch64 (Cabal, GHC ${{ matrix.ghc }})
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/rel-') }}
runs-on: ubuntu-latest
outputs:
remotepath: ${{ steps.Remote-Dir.outputs.remotepath }}
env:
GITHUB_COMMIT: ${{ github.sha }}
GHC_VERSION: ${{ matrix.ghc }}
steps:
- uses: actions/checkout@v3
- id: Remote-Dir
Expand All @@ -280,8 +285,8 @@ jobs:
fingerprint: ${{ secrets.SSH_ARM_FINGERPRINT }}
command_timeout: 120m
script_stop: true
envs: GITHUB_COMMIT,REMOTE_DIR
script: bash ~/$REMOTE_DIR/build.sh "$GITHUB_COMMIT" "$REMOTE_DIR"
envs: GITHUB_COMMIT,REMOTE_DIR,GHC_VERSION
script: bash ~/$REMOTE_DIR/build.sh "$GITHUB_COMMIT" "$REMOTE_DIR" "GHC_VERSION"
- name: Download binaries from remote server
uses: nicklasfrahm/scp-action@main
with:
Expand Down

0 comments on commit 83cf15f

Please sign in to comment.