Exclude tests, migrations, fixtures and docs from language stats #487
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Mac OS | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| branches: ['**'] | |
| paths-ignore: | |
| - 'doc/**' | |
| - 'website/**' | |
| - 'branding/**' | |
| - 'docker/**' | |
| - 'studio/**' | |
| - 'wasm/**' | |
| - 'test/bench/**' | |
| - '*.md' | |
| - '.github/ISSUE_TEMPLATE/**' | |
| - '.github/pull_request_template.md' | |
| - 'CITATION.cff' | |
| - 'LICENSE' | |
| - 'META.json' | |
| - 'release.sh' | |
| - '.github/workflows/codeql.yml' | |
| - '.github/workflows/docs.yml' | |
| - '.github/workflows/build_and_test.yml' | |
| - '.github/workflows/pgxn.yml' | |
| - '.github/workflows/studio.yml' | |
| - '.github/workflows/studio-release.yml' | |
| - '.github/workflows/wsl.yml' | |
| - '.github/workflows/wasm.yml' | |
| pull_request: | |
| paths-ignore: | |
| - 'doc/**' | |
| - 'website/**' | |
| - 'branding/**' | |
| - 'docker/**' | |
| - 'studio/**' | |
| - 'wasm/**' | |
| - 'test/bench/**' | |
| - '*.md' | |
| - '.github/ISSUE_TEMPLATE/**' | |
| - '.github/pull_request_template.md' | |
| - 'CITATION.cff' | |
| - 'LICENSE' | |
| - 'META.json' | |
| - 'release.sh' | |
| - '.github/workflows/codeql.yml' | |
| - '.github/workflows/docs.yml' | |
| - '.github/workflows/build_and_test.yml' | |
| - '.github/workflows/pgxn.yml' | |
| - '.github/workflows/studio.yml' | |
| - '.github/workflows/studio-release.yml' | |
| - '.github/workflows/wsl.yml' | |
| - '.github/workflows/wasm.yml' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| pg: [15, 18] | |
| name: macOS – PostgreSQL ${{ matrix.pg }} | |
| runs-on: macos-latest | |
| steps: | |
| - run: brew update || true | |
| - run: brew install postgresql@${{ matrix.pg }} | |
| - run: brew link --force postgresql@${{ matrix.pg }} | |
| - run: brew install boost | |
| - run: brew services start postgresql@${{ matrix.pg }} | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-tags: true | |
| fetch-depth: 0 | |
| - run: make -j$(sysctl -n hw.ncpu) && make tdkc && make provsql_migrate_mmap && make install | |
| - name: KCMCP protocol conformance (tdkc) | |
| run: make test-kcmcp | |
| # pg_isready does a single connection attempt; the -t flag is the | |
| # connection timeout, not a retry duration. When the cluster is | |
| # mid-startup or in recovery, pg_isready returns 1 immediately. | |
| # A polling loop absorbs that. | |
| - run: | | |
| for _ in $(seq 1 60); do pg_isready -q && exit 0; sleep 1; done | |
| cat "$(brew --prefix)"/var/log/postgresql@${{ matrix.pg }}.log 2>/dev/null | |
| exit 1 | |
| - run: echo "POSTGRESQL_CONFIG=$(psql -t -c 'SHOW config_file' postgres | xargs)" >> "$GITHUB_ENV" | |
| - run: echo "shared_preload_libraries = 'provsql'" >> "$POSTGRESQL_CONFIG" | |
| - run: brew services restart postgresql@${{ matrix.pg }} | |
| - run: | | |
| for _ in $(seq 1 60); do pg_isready -q && exit 0; sleep 1; done | |
| cat "$(brew --prefix)"/var/log/postgresql@${{ matrix.pg }}.log 2>/dev/null | |
| exit 1 | |
| - name: Run regression tests | |
| run: | | |
| bash test/kcmcp/with-tdkc.sh make installcheck && exit 0 | |
| # Test run failed: surface everything needed to diagnose a | |
| # crash. A backend SIGSEGV shows up here as "server closed the | |
| # connection unexpectedly", after which every later test fails | |
| # with "the database system is in recovery mode". The signal | |
| # line lives in the server log; the symbolicated backtrace lives | |
| # in the macOS crash report. | |
| shopt -s nullglob | |
| echo "::group::regression.diffs" | |
| cat /tmp/tmp.provsql*/regression.diffs | |
| echo "::endgroup::" | |
| echo "::group::provsql_migrate_mmap dumps" | |
| for i in /tmp/provsql*; do echo "== $i =="; cat "$i"; done | |
| echo "::endgroup::" | |
| echo "::group::PostgreSQL server log" | |
| cat "$(brew --prefix)"/var/log/postgresql@${{ matrix.pg }}.log 2>/dev/null | |
| echo "::endgroup::" | |
| echo "::group::macOS crash reports (postgres)" | |
| for d in "$HOME/Library/Logs/DiagnosticReports" /Library/Logs/DiagnosticReports; do | |
| for f in "$d"/postgres*.ips "$d"/postgres*.crash; do | |
| echo "== $f =="; cat "$f"; echo | |
| done | |
| done | |
| echo "::endgroup::" | |
| exit 1 |