Skip to content

Commit bdfaeab

Browse files
committed
Add GitHub Actions pipeline for pgSphere
1 parent 74b3304 commit bdfaeab

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

Diff for: .github/workflows/build-and-check.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Build and Check
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build_and_test:
9+
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
pg_version: [10, 11, 12, 13, 14, 15, 16]
16+
use_healpix: [0, 1]
17+
18+
name: PostgreSQL ${{ matrix.pg_version }} - USE_HEALPIX=${{ matrix.use_healpix }}
19+
20+
steps:
21+
- name: Install dependencies
22+
run: |
23+
sudo apt update && sudo apt install -y \
24+
postgresql-common \
25+
libhealpix-cxx-dev \
26+
docbook-xml \
27+
docbook-xsl \
28+
libxml2-utils \
29+
xsltproc \
30+
fop
31+
32+
- name: Install Postgres
33+
run: sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -p -v ${{ matrix.pg_version }} -i
34+
35+
- name: Clone pgSphere
36+
uses: actions/checkout@v4
37+
38+
- name: Set MAKE_CMD variable
39+
run: echo "MAKE_CMD=make --keep-going -j$(nproc) -l$(nproc) -O" >> $GITHUB_ENV
40+
41+
- name: Build pgSphere
42+
run: ${MAKE_CMD} PROFILE="-Werror -Wall" USE_HEALPIX=${{ matrix.use_healpix }}
43+
44+
- name: make test
45+
run: pg_virtualenv ${MAKE_CMD} USE_HEALPIX=${{ matrix.use_healpix }} test
46+
47+
- name: Install pgSphere
48+
run: sudo ${MAKE_CMD} USE_HEALPIX=${{ matrix.use_healpix }} install
49+
50+
- name: make installcheck
51+
run: pg_virtualenv ${MAKE_CMD} USE_HEALPIX=${{ matrix.use_healpix }} installcheck
52+
53+
- name: make crushtest
54+
run: pg_virtualenv ${MAKE_CMD} USE_HEALPIX=${{ matrix.use_healpix }} crushtest
55+
56+
- name: Build docs
57+
run: ${MAKE_CMD} -C doc
58+
59+
- name: Upload artifacts
60+
uses: actions/upload-artifact@v3
61+
if: success() || failure()
62+
with:
63+
name: ${{ github.ref_name }}-pg${{ matrix.pg_version }}-use-healpix-${{ matrix.use_healpix }}-${{ github.run_id }}
64+
if-no-files-found: ignore
65+
path: |
66+
./**/*.log
67+
./**/*.diffs

0 commit comments

Comments
 (0)