diff --git a/.github/actions/cache-on-main/action.yaml b/.github/actions/cache-on-main/action.yaml index a7dc0a94ed..537890e7ca 100644 --- a/.github/actions/cache-on-main/action.yaml +++ b/.github/actions/cache-on-main/action.yaml @@ -20,14 +20,14 @@ runs: using: composite steps: - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 - if: ${{ startsWith(github.ref, 'refs/heads/') || (inputs.save-prs && github.head_ref) }} + if: ${{ startsWith(github.ref, 'refs/heads/') || (inputs.save-prs && startsWith(github.ref, 'refs/pull/')) }} with: path: ${{ inputs.path }} key: ${{ runner.os }}-${{ inputs.prefix }}-${{ inputs.suffix }} restore-keys: | ${{ runner.os }}-${{ inputs.prefix }}- - uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 - if: ${{ !startsWith(github.ref, 'refs/heads/') && !(inputs.save-prs && github.head_ref) }} + if: ${{ !startsWith(github.ref, 'refs/heads/') && !(inputs.save-prs && startsWith(github.ref, 'refs/pull/')) }} with: path: ${{ inputs.path }} key: ${{ runner.os }}-${{ inputs.prefix }}-${{ inputs.suffix }} diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ed98504d24..414cfab8bc 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 + artifact: postgrest-linux-aarch64 + - 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 987599fc17..b8cd03b450 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