From 4e1f8925ac6812e86d86c23a2bd66cddb5b0bd9e Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Mon, 20 May 2024 16:49:27 +0200 Subject: [PATCH] ci: Build on self-hosted ARM runner via stack --- .github/workflows/build.yaml | 18 +++++++++++++----- stack.yaml | 2 +- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 085a91f954f..74ad4a93bc7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -87,16 +87,24 @@ jobs: fail-fast: false matrix: include: - - name: Linux - runs-on: ubuntu-22.04 + - name: Linux x64 + runs-on: '"ubuntu-22.04"' cache: | ~/.stack/pantry ~/.stack/snapshots ~/.stack/stack.sqlite3 # no artifact for Linux, because we use the static build + - name: Linux aarch64 + runs-on: '["self-hosted", "Linux", "ARM64"]' + cache: | + ~/.stack/pantry + ~/.stack/snapshots + ~/.stack/stack.sqlite3 + # no artifact for Linux ARM, yet, because we use the other ARM job + - name: MacOS - runs-on: macos-12 + runs-on: '"macos-12"' cache: | ~/.stack/pantry ~/.stack/snapshots @@ -104,7 +112,7 @@ jobs: artifact: postgrest-macos-x64 - name: Windows - runs-on: windows-2022 + runs-on: '"windows-2022"' cache: | ~\AppData\Roaming\stack\pantry ~\AppData\Local\Programs\stack\pantry @@ -116,7 +124,7 @@ jobs: artifact: postgrest-windows-x64 name: Stack - ${{ matrix.name }} - runs-on: ${{ matrix.runs-on }} + runs-on: ${{ fromJson(matrix.runs-on) }} steps: - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 - uses: haskell-actions/setup@33585e1a16afa5875e124b0ebc89dd0c2f872c21 # v2.7.3 diff --git a/stack.yaml b/stack.yaml index 987599fc178..b8cd03b4506 100644 --- a/stack.yaml +++ b/stack.yaml @@ -3,7 +3,7 @@ resolver: lts-22.21 # 2024-05-06, GHC 9.6.5 nix: packages: - pcre - - pkgconfig + - pkg-config - postgresql - zlib # disable pure by default so that the test enviroment can be passed