|
|
|
@@ -17,7 +17,7 @@ jobs:
|
|
|
|
|
name: Lint & check code style
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
|
|
|
- name: Setup Nix Environment
|
|
|
|
|
uses: ./.github/actions/setup-nix
|
|
|
|
|
with:
|
|
|
|
@@ -37,7 +37,7 @@ jobs:
|
|
|
|
|
# https://github.com/actions/runner/issues/241#issuecomment-842566950
|
|
|
|
|
shell: script -qec "bash --noprofile --norc -eo pipefail {0}"
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
|
|
|
- name: Setup Nix Environment
|
|
|
|
|
uses: ./.github/actions/setup-nix
|
|
|
|
|
with:
|
|
|
|
@@ -73,7 +73,7 @@ jobs:
|
|
|
|
|
# https://github.com/actions/runner/issues/241#issuecomment-842566950
|
|
|
|
|
shell: script -qec "bash --noprofile --norc -eo pipefail {0}"
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
|
|
|
- name: Setup Nix Environment
|
|
|
|
|
uses: ./.github/actions/setup-nix
|
|
|
|
|
with:
|
|
|
|
@@ -92,7 +92,7 @@ jobs:
|
|
|
|
|
name: Test memory (Nix)
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
|
|
|
- name: Setup Nix Environment
|
|
|
|
|
uses: ./.github/actions/setup-nix
|
|
|
|
|
with:
|
|
|
|
@@ -105,7 +105,7 @@ jobs:
|
|
|
|
|
name: Build Linux static (Nix)
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
|
|
|
- name: Setup Nix Environment
|
|
|
|
|
uses: ./.github/actions/setup-nix
|
|
|
|
|
with:
|
|
|
|
@@ -116,7 +116,7 @@ jobs:
|
|
|
|
|
- name: Check static executable
|
|
|
|
|
run: postgrest-check-static result/bin/postgrest
|
|
|
|
|
- name: Save built executable as artifact
|
|
|
|
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
|
|
|
|
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
|
|
|
|
with:
|
|
|
|
|
name: postgrest-linux-static-x64
|
|
|
|
|
path: result/bin/postgrest
|
|
|
|
@@ -125,7 +125,7 @@ jobs:
|
|
|
|
|
- name: Build Docker image
|
|
|
|
|
run: nix-build -A docker.image --out-link postgrest-docker.tar.gz
|
|
|
|
|
- name: Save built Docker image as artifact
|
|
|
|
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
|
|
|
|
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
|
|
|
|
with:
|
|
|
|
|
name: postgrest-docker-x64
|
|
|
|
|
path: postgrest-docker.tar.gz
|
|
|
|
@@ -136,7 +136,7 @@ jobs:
|
|
|
|
|
name: Build MacOS (Nix)
|
|
|
|
|
runs-on: macos-latest
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
|
|
|
- name: Setup Nix Environment
|
|
|
|
|
uses: ./.github/actions/setup-nix
|
|
|
|
|
|
|
|
|
@@ -176,9 +176,9 @@ jobs:
|
|
|
|
|
name: Build ${{ matrix.name }} (Stack)
|
|
|
|
|
runs-on: ${{ matrix.runs-on }}
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
|
|
|
- name: Stack working files cache
|
|
|
|
|
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4
|
|
|
|
|
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
|
|
|
|
|
with:
|
|
|
|
|
path: ${{ matrix.cache }}
|
|
|
|
|
key: ${{ runner.os }}-${{ hashFiles('stack.yaml.lock') }}
|
|
|
|
@@ -188,7 +188,7 @@ jobs:
|
|
|
|
|
- name: Build with Stack
|
|
|
|
|
run: stack build --local-bin-path result --copy-bins
|
|
|
|
|
- name: Save built executable as artifact
|
|
|
|
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
|
|
|
|
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
|
|
|
|
with:
|
|
|
|
|
name: ${{ matrix.artifact }}
|
|
|
|
|
path: |
|
|
|
|
@@ -200,7 +200,7 @@ jobs:
|
|
|
|
|
name: Get FreeBSD build from CirrusCI
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
|
|
|
- name: Get FreeBSD executable from CirrusCI
|
|
|
|
|
env:
|
|
|
|
|
# GITHUB_SHA does weird things for pull request, so we roll our own:
|
|
|
|
@@ -208,7 +208,7 @@ jobs:
|
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
run: .github/get_cirrusci_freebsd
|
|
|
|
|
- name: Save executable as artifact
|
|
|
|
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
|
|
|
|
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
|
|
|
|
with:
|
|
|
|
|
name: postgrest-freebsd-x64
|
|
|
|
|
path: postgrest
|
|
|
|
@@ -222,7 +222,7 @@ jobs:
|
|
|
|
|
name: Build Linux (Cabal, GHC ${{ matrix.ghc }})
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
|
|
|
- name: Workaround runner image issue
|
|
|
|
|
# https://github.com/actions/runner-images/issues/7061
|
|
|
|
|
run: sudo chown -R "$USER" /usr/local/.ghcup
|
|
|
|
@@ -234,7 +234,7 @@ jobs:
|
|
|
|
|
run: |
|
|
|
|
|
cp cabal.project.non-nix cabal.project
|
|
|
|
|
- name: Cache
|
|
|
|
|
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4
|
|
|
|
|
uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1
|
|
|
|
|
with:
|
|
|
|
|
path: ~/.cabal
|
|
|
|
|
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
|
|
|
|
@@ -261,7 +261,7 @@ jobs:
|
|
|
|
|
GITHUB_COMMIT: ${{ github.sha }}
|
|
|
|
|
GHC_VERSION: ${{ matrix.ghc }}
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
|
|
|
- id: Remote-Dir
|
|
|
|
|
name: Unique directory name for the remote build
|
|
|
|
|
run: echo "remotepath=postgrest-build-$(uuidgen)" >> "$GITHUB_OUTPUT"
|
|
|
|
@@ -301,7 +301,7 @@ jobs:
|
|
|
|
|
- name: Extract downloaded binaries
|
|
|
|
|
run: tar -xvf result.tar.xz && rm result.tar.xz
|
|
|
|
|
- name: Save aarch64 executable as artifact
|
|
|
|
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
|
|
|
|
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
|
|
|
|
with:
|
|
|
|
|
name: postgrest-ubuntu-aarch64
|
|
|
|
|
path: result/postgrest
|
|
|
|
@@ -325,7 +325,7 @@ jobs:
|
|
|
|
|
version: ${{ steps.Identify-Version.outputs.version }}
|
|
|
|
|
isprerelease: ${{ steps.Identify-Version.outputs.isprerelease }}
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
|
|
|
- id: Identify-Version
|
|
|
|
|
name: Identify the version to be released
|
|
|
|
|
run: |
|
|
|
|
@@ -362,7 +362,7 @@ jobs:
|
|
|
|
|
echo "Relevant extract from CHANGELOG.md:"
|
|
|
|
|
cat CHANGES.md
|
|
|
|
|
- name: Save CHANGES.md as artifact
|
|
|
|
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
|
|
|
|
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
|
|
|
|
with:
|
|
|
|
|
name: release-changes
|
|
|
|
|
path: CHANGES.md
|
|
|
|
@@ -378,9 +378,9 @@ jobs:
|
|
|
|
|
env:
|
|
|
|
|
VERSION: ${{ needs.Prepare-Release.outputs.version }}
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
|
|
|
- name: Download all artifacts
|
|
|
|
|
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4
|
|
|
|
|
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
|
|
|
|
|
with:
|
|
|
|
|
path: artifacts
|
|
|
|
|
- name: Create release bundle with archives for all builds
|
|
|
|
@@ -410,7 +410,7 @@ jobs:
|
|
|
|
|
artifacts/postgrest-windows-x64/postgrest.exe
|
|
|
|
|
|
|
|
|
|
- name: Save release bundle
|
|
|
|
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
|
|
|
|
|
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
|
|
|
|
|
with:
|
|
|
|
|
name: release-bundle
|
|
|
|
|
path: release-bundle
|
|
|
|
@@ -443,13 +443,13 @@ jobs:
|
|
|
|
|
VERSION: ${{ needs.Prepare-Release.outputs.version }}
|
|
|
|
|
ISPRERELEASE: ${{ needs.Prepare-Release.outputs.isprerelease }}
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
|
|
|
- name: Setup Nix Environment
|
|
|
|
|
uses: ./.github/actions/setup-nix
|
|
|
|
|
with:
|
|
|
|
|
tools: release
|
|
|
|
|
- name: Download Docker image
|
|
|
|
|
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4
|
|
|
|
|
uses: actions/download-artifact@87c55149d96e628cc2ef7e6fc2aab372015aec85 # v4.1.3
|
|
|
|
|
with:
|
|
|
|
|
name: postgrest-docker-x64
|
|
|
|
|
- name: Publish images on Docker Hub
|
|
|
|
@@ -496,7 +496,7 @@ jobs:
|
|
|
|
|
VERSION: ${{ needs.Prepare-Release.outputs.version }}
|
|
|
|
|
ISPRERELEASE: ${{ needs.Prepare-Release.outputs.isprerelease }}
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
|
|
|
- name: Publish images for ARM builds on Docker Hub
|
|
|
|
|
uses: appleboy/ssh-action@master
|
|
|
|
|
env:
|
|
|
|
@@ -523,7 +523,7 @@ jobs:
|
|
|
|
|
env:
|
|
|
|
|
REMOTE_DIR: ${{ needs.Build-Cabal-Arm.outputs.remotepath }}
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
|
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
|
|
|
- name: Remove uploaded files from server
|
|
|
|
|
uses: appleboy/ssh-action@master
|
|
|
|
|
with:
|
|
|
|
|