ci: Use include in stack build matrix
This commit is contained in:
committed by
Wolfgang Walther
parent
f3eb8a317d
commit
1981160536
@@ -133,7 +133,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os:
|
include:
|
||||||
- name: Linux & test
|
- name: Linux & test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
cache: |
|
cache: |
|
||||||
@@ -164,30 +164,30 @@ jobs:
|
|||||||
# test: true
|
# test: true
|
||||||
artifact: postgrest-windows-x64
|
artifact: postgrest-windows-x64
|
||||||
|
|
||||||
name: Build ${{ matrix.os.name }} (Stack)
|
name: Build ${{ matrix.name }} (Stack)
|
||||||
runs-on: ${{ matrix.os.runs-on }}
|
runs-on: ${{ matrix.runs-on }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.4.0
|
- uses: actions/checkout@v2.4.0
|
||||||
- name: Stack working files cache
|
- name: Stack working files cache
|
||||||
uses: actions/cache@v2.1.6
|
uses: actions/cache@v2.1.6
|
||||||
with:
|
with:
|
||||||
path: ${{ matrix.os.cache }}
|
path: ${{ matrix.cache }}
|
||||||
key: ${{ runner.os }}-${{ hashFiles('stack.yaml.lock') }}
|
key: ${{ runner.os }}-${{ hashFiles('stack.yaml.lock') }}
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
if: ${{ matrix.os.deps }}
|
if: ${{ matrix.deps }}
|
||||||
run: ${{ matrix.os.deps }}
|
run: ${{ matrix.deps }}
|
||||||
- name: Build with Stack
|
- name: Build with Stack
|
||||||
run: stack build --local-bin-path result --copy-bins
|
run: stack build --local-bin-path result --copy-bins
|
||||||
- name: Run Spec tests with Stack
|
- name: Run Spec tests with Stack
|
||||||
if: ${{ matrix.os.test }}
|
if: ${{ matrix.test }}
|
||||||
run: |
|
run: |
|
||||||
postgresql_bin="$(find ${{ matrix.os.pgdir }} -maxdepth 2 -type d -name bin | head -n 1)"
|
postgresql_bin="$(find ${{ matrix.pgdir }} -maxdepth 2 -type d -name bin | head -n 1)"
|
||||||
echo "Using PostgreSQL binaries at $postgresql_bin ..."
|
echo "Using PostgreSQL binaries at $postgresql_bin ..."
|
||||||
PATH="$postgresql_bin:$PATH" test/with_tmp_db stack test
|
PATH="$postgresql_bin:$PATH" test/with_tmp_db stack test
|
||||||
- name: Save built executable as artifact
|
- name: Save built executable as artifact
|
||||||
uses: actions/upload-artifact@v2.2.4
|
uses: actions/upload-artifact@v2.2.4
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.os.artifact }}
|
name: ${{ matrix.artifact }}
|
||||||
path: |
|
path: |
|
||||||
result/postgrest
|
result/postgrest
|
||||||
result/postgrest.exe
|
result/postgrest.exe
|
||||||
|
|||||||
Reference in New Issue
Block a user