-
-
Notifications
You must be signed in to change notification settings - Fork 36
112 lines (84 loc) · 2.96 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: test-macos
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
macos:
strategy:
matrix:
config: [Release, Debug]
pg: [16, 15, 14, 13, 12, 11]
runs-on: macos-13
name: macos 🐘${{ matrix.pg }} (${{ matrix.config }})
steps:
- uses: actions/checkout@v3
- name: Debug
run: |
brew --prefix
mdfind -name libintl.h
ls -ltr /usr/local/include/libintl.h
- name: Cache Cargo
uses: actions/cache@v3
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-2023
- name: Install pg_validate_extupgrade
run: cargo install --locked --git https://github.com/rjuju/pg_validate_extupgrade.git
- name: Install (& link) PostgreSQL
run: |
brew install postgresql@${{ matrix.pg }}
brew link postgresql@${{ matrix.pg }}
- name: Generate
run: VERBOSE=true cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.config }} -DCMAKE_CXX_FLAGS=-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: Prepare PostgreSQL
run: |
pg_ctl start -D /usr/local/var/postgresql@${{ matrix.pg }} --wait
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
env: # something wrong with gettext
CXXFLAGS: -I/usr/local/include
CPPFLAGS: -I/usr/local/include
# ----- PostGIS tests -----
# I postgis on homebrew is pg@14 only, so I'm keeping this test separate
macos-12-postgis:
strategy:
matrix:
config: [Release, Debug]
runs-on: macos-12
name: macos 🐘14 w/ postgis@3 (homebrew)
steps:
- uses: actions/checkout@v3
- name: Cache Cargo
uses: actions/cache@v3
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-2023
- name: Install pg_validate_extupgrade
run: cargo install --locked --git https://github.com/rjuju/pg_validate_extupgrade.git
- name: Install PostGIS
run: brew install postgis
- name: Generate
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.config }}
- name: Build
run: cmake --build build --config ${{ matrix.config }}
- name: Install
run: sudo cmake --install build --component h3-pg --config ${{ matrix.config }}
- name: Prepare PostgreSQL
run: |
pg_ctl start -D /usr/local/var/postgresql@14 --wait
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