File: test-macos.yml

package info (click to toggle)
h3-pg 4.2.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,196 kB
  • sloc: sql: 4,469; ansic: 3,497; python: 322; sh: 56; makefile: 18
file content (65 lines) | stat: -rw-r--r-- 1,835 bytes parent folder | download | duplicates (2)
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:
        os: [macos-13]
        pg: [17, 16, 15, 14, 13]
        config: [Release, Debug]

    runs-on: ${{ matrix.os }}

    name: ${{ matrix.os }} 🐘${{ 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/*/test/regression.diffs