|
| 1 | +name: postgresql-current-meson-debug |
| 2 | +on: |
| 3 | + schedule: |
| 4 | + - cron: "0 0 * * *" |
| 5 | + pull_request: |
| 6 | + workflow_dispatch: |
| 7 | + |
| 8 | +jobs: |
| 9 | + build: |
| 10 | + name: pg-current-meson-debug |
| 11 | + runs-on: ubuntu-22.04 |
| 12 | + steps: |
| 13 | + - name: Install dependencies |
| 14 | + run: | |
| 15 | + sudo apt-get update |
| 16 | + sudo apt-get install -y libreadline6-dev systemtap-sdt-dev \ |
| 17 | + zlib1g-dev libssl-dev libpam0g-dev bison flex \ |
| 18 | + libipc-run-perl -y docbook-xsl docbook-xsl libxml2 libxml2-utils \ |
| 19 | + libxml2-dev libxslt-dev xsltproc libkrb5-dev libldap2-dev \ |
| 20 | + libsystemd-dev gettext tcl-dev libperl-dev pkg-config clang-11 \ |
| 21 | + llvm-11 llvm-11-dev libselinux1-dev python3-dev \ |
| 22 | + uuid-dev liblz4-dev meson ninja-build \ |
| 23 | + gpg wget libcurl4-openssl-dev libhttp-server-simple-perl |
| 24 | + sudo /usr/bin/perl -MCPAN -e 'install IPC::Run' |
| 25 | + sudo /usr/bin/perl -MCPAN -e 'install Text::Trim' |
| 26 | + wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg |
| 27 | + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list |
| 28 | + sudo apt update && sudo apt install -y vault |
| 29 | +
|
| 30 | + - name: Clone repository |
| 31 | + uses: actions/checkout@v4 |
| 32 | + with: |
| 33 | + path: 'src' |
| 34 | + ref: ${{ github.ref }} |
| 35 | + |
| 36 | + - name: Checkout submodules |
| 37 | + run: | |
| 38 | + git submodule update --init --recursive |
| 39 | + cd contrib/pg_tde |
| 40 | + git checkout main |
| 41 | + git pull |
| 42 | + working-directory: src |
| 43 | + |
| 44 | + - name: Build postgres |
| 45 | + run: | |
| 46 | + meson setup build --prefix `pwd`/../inst --buildtype=debug -Dcassert=true -Dtap_tests=enabled |
| 47 | + cd build && ninja && ninja install |
| 48 | + working-directory: src |
| 49 | + |
| 50 | + - name: Test postgres |
| 51 | + run: | |
| 52 | + TV=$(mktemp) |
| 53 | + { exec >$TV; vault server -dev; } & |
| 54 | + sleep 10 |
| 55 | + export ROOT_TOKEN=$(cat $TV | grep "Root Token" | cut -d ":" -f 2 | xargs echo -n) |
| 56 | + echo "Root token: $ROOT_TOKEN" |
| 57 | +
|
| 58 | + meson test |
| 59 | + working-directory: src/build |
| 60 | + |
| 61 | + - name: Report on test fail |
| 62 | + uses: actions/upload-artifact@v4 |
| 63 | + if: ${{ failure() }} |
| 64 | + with: |
| 65 | + name: Regressions diff and postgresql log |
| 66 | + path: | |
| 67 | + src/build/testrun/ |
| 68 | + retention-days: 3 |
0 commit comments