-
Notifications
You must be signed in to change notification settings - Fork 40
85 lines (72 loc) · 2.75 KB
/
CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: SQLite FDW test
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
- main
jobs:
detect-pgversion:
runs-on: ubuntu-22.04
outputs:
pgversion: ${{ steps.detect-pgversion.outputs.targets }}
steps:
- uses: actions/checkout@v4
- name: detect-pgversion
id: detect-pgversion
run: |
targets=`bash GitHubActions/detect_targets.sh`
echo "targets=$targets" >> $GITHUB_OUTPUT
test:
needs: detect-pgversion
env:
SQLITE_VERSION : "3460000"
SQLITE_YEAR: "2024"
POSTGIS_VERSION : "3.4.2"
HTTP_PROXY: ""
HTTPS_PROXY: ""
strategy:
fail-fast: false
matrix:
pg: ${{ fromJSON(needs.detect-pgversion.outputs.pgversion) }}
config: ["default", "postgis"]
name: Test on PostgreSQL ${{ matrix.pg }}, ${{ matrix.config }} mode
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: tar
run: tar zcvf sqlite_fdw.tar.gz ./*
- name: set_proxy
run: bash GitHubActions/env.sh
- name: install locales
run: bash GitHubActions/install_locales.sh
- name: build PostgreSQL ${{ matrix.pg }} with ${{ matrix.config }}
run: bash GitHubActions/build_postgres.sh ${{ matrix.pg }}
- name: build PostGIS ${{ env.POSTGIS_VERSION }} for PostgreSQL ${{ matrix.pg }}, ${{ matrix.config }} mode
run: |
if [[ "${{ matrix.config }}" == "postgis" ]]; then
bash GitHubActions/build_postgis.sh ${{ matrix.pg }} ${{ env.POSTGIS_VERSION }}
fi
- name: install SQLite, ${{ matrix.config }} mode
run: |
if [[ "${{ matrix.config }}" == "default" ]]; then
bash GitHubActions/install_sqlite.sh ${{ env.SQLITE_VERSION }} ${{ env.SQLITE_YEAR }}
elif [[ "${{ matrix.config }}" == "postgis" ]]; then
bash GitHubActions/install_sqlite.sh ${{ env.SQLITE_VERSION }} ${{ env.SQLITE_YEAR }} --enable-rtree
fi
- name: build sqlite_fdw, ${{ matrix.config }} mode
run: |
bash GitHubActions/build_sqlite_fdw.sh ${{ matrix.pg }} ${{ matrix.config }}
- name: execute sqlite_fdw test
run: bash GitHubActions/execute_test.sh ${{ matrix.pg }} ${{ matrix.config }}
- name: download output files (regression.diffs)
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.pg }}-${{ matrix.config }}-test-results
path: |
workdir/postgresql-${{ matrix.pg }}/contrib/sqlite_fdw/regression.diffs
workdir/postgresql-${{ matrix.pg }}/contrib/sqlite_fdw/regression.out
workdir/postgresql-${{ matrix.pg }}/contrib/sqlite_fdw/results
retention-days: 7