Skip to content

Run regression tests with different opt levels. #93

Run regression tests with different opt levels.

Run regression tests with different opt levels. #93

Workflow file for this run

name: Build and Test
on: [push, pull_request]
jobs:
test_with_postgresql:
runs-on: ubuntu-22.04
if: ${{ !startsWith(github.ref_name, 'mac') && !startsWith(github.ref_name, 'windows') }}
strategy:
fail-fast: false
matrix:
opt_level: ['-O0', '-O1', '-O2', '-O3']
compiler: ['gcc', 'clang']
steps:
- uses: actions/checkout@v4
with:
submodules: true
- run: |
# Install PostgreSQL server.
git clone https://github.com/postgres/postgres --depth=1 pg
cd pg
CFLAGS="${{ matrix.opt_level }}" CC="${{ matrix.compiler }}" CXX="${{ matrix.compiler == 'gcc' && 'g++' || 'clang++' }}" \
./configure --prefix=$HOME/.local/pg --enable-cassert
make install-world-bin -j4
# Install pg_asmjit.
cd ..
PATH=$HOME/.local/pg/bin:$PATH make install -j4
- run: |
export PATH=$HOME/.local/pg/bin:$PATH
initdb -D/tmp/data -c unix_socket_directories=/tmp
echo "jit='on'" >> /tmp/data/postgresql.conf
echo "jit_provider='asmjit'" >> /tmp/data/postgresql.conf
echo "jit_above_cost=0" >> /tmp/data/postgresql.conf
pg_ctl -D/tmp/data -l/tmp/logfile start
cd pg
PGPORT=5432 PGHOST=127.0.0.1 make installcheck
- if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3