forked from postgis/postgis
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.96 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
# GitHub Actions for PostGIS
#
# Paul Ramsey <pramsey at cleverelephant dot ca>
name: "CI"
on: [push, pull_request]
jobs:
linux:
name: "CI"
strategy:
matrix:
ci:
# Use the last stable releases to run more tests
# - { tag: pg13-geos39-gdal31-proj71, mode: garden }
- { tag: pg13-geos38-gdal31-proj71, mode: tests }
- { tag: pg13-geos38-gdal31-proj71, mode: debug }
- { tag: pg13-geos38-gdal31-proj71, mode: coverage }
- { tag: pg13-geos38-gdal31-proj71, mode: usan_gcc }
# Run tests with different dependency combinations
# - { tag: latest, mode: tests }
- { tag: pg12-geos37-gdal30-proj611, mode: tests }
- { tag: pg11-geos37-gdal24-proj52, mode: tests }
- { tag: pg10-geos36-gdal23-proj49, mode: tests }
- { tag: pg96-geos36-gdal22-proj49, mode: tests }
runs-on: ubuntu-latest
steps:
# - name: 'Install Docker'
# run: |
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
# sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- name: 'Check Out'
uses: actions/checkout@v2
- name: 'Prepare Image'
run: |
set -e
uname -a
echo "/tmp/logbt-coredumps/core.%p.%E" | sudo tee /proc/sys/kernel/core_pattern
echo "FROM postgis/postgis-build-env:${{ matrix.ci.tag }}" > Dockerfile
echo "ADD --chown=postgres:postgres . /src/postgis" >> Dockerfile
echo "CMD bash ci/travis/run_${{ matrix.ci.mode }}.sh" >> Dockerfile
docker build -t pgtest .
ci_env=`bash .github/codecov_env.bash`
- name: 'Build & Test'
run: |
docker run $ci_env --name pgtest-${GITHUB_RUN_NUMBER} pgtest
- name: 'Clean Up Image'
if: ${{ success() }}
run: |
docker rm pgtest-${GITHUB_RUN_NUMBER}