-
-
Notifications
You must be signed in to change notification settings - Fork 36
65 lines (50 loc) · 1.78 KB
/
test-macos.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
name: test-macos
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
macos:
strategy:
matrix:
config: [Release, Debug]
os: [mac-14, macos-13]
pg: [17, 16, 15, 14, 13]
runs-on: ${{ matrix.os }}
name: macos 🐘${{ matrix.pg }} (${{ matrix.config }})
steps:
- uses: actions/checkout@v4
- name: Setup pg_validate_extupgrade
uses: baptiste0928/cargo-install@v3
with:
crate: pg_validate_extupgrade
git: https://github.com/rjuju/pg_validate_extupgrade
- name: Setup PostgreSQL
run: |
brew install postgresql@${{ matrix.pg }}
brew unlink postgresql@${{ matrix.pg }}
brew link --overwrite postgresql@${{ matrix.pg }}
brew services run postgresql@${{ matrix.pg }}
- name: Setup PostGIS
run: brew install postgis
if: ${{ matrix.pg == 17 || matrix.pg == 14 }}
- name: Fix gettext linkage for PostgreSQL >= 15
run: brew unlink gettext && brew link --overwrite --force gettext
if: ${{ matrix.pg >= 15 }}
- name: Generate
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.config }}
env:
# Fixes missing libintl.h on some runners
CFLAGS: "-I /usr/local/include"
- name: Build
run: cmake --build build --config ${{ matrix.config }}
- name: Install
run: sudo cmake --install build --component h3-pg --config ${{ matrix.config }}
- name: Create test database (for pg_validate_extupgrade)
run: createdb runner
- name: Test
run: ctest --test-dir build --output-on-failure --build-config ${{ matrix.config }}
- name: Print regression diffs
if: ${{ failure() }}
run: cat build/*/regression.diffs