Skip to content

Merge pull request #1168 from yasir-hussain-shah/feature/utl_file #3

Merge pull request #1168 from yasir-hussain-shah/feature/utl_file

Merge pull request #1168 from yasir-hussain-shah/feature/utl_file #3

name: meson_build
on:
push:
branches: [ master , IVORY_REL_4_STABLE ]
pull_request:
branches: [ master , IVORY_REL_4_STABLE ]
jobs:
meson_build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: dependency - linux
run: |
sudo apt-get update
sudo apt-get install -y build-essential git lcov bison flex \
libkrb5-dev libssl-dev libldap-dev libpam-dev python3-dev \
tcl-dev libperl-dev gettext libxml2-dev libxslt-dev \
libreadline-dev libedit-dev uuid-dev libossp-uuid-dev \
libipc-run-perl libtime-hires-perl libtest-simple-perl \
libgssapi-krb5-2 libicu-dev
curl -L "https://github.com/mesonbuild/meson/releases/download/1.0.1/meson-1.0.1.tar.gz" -o meson-1.0.1.tar.gz
curl -L "https://github.com/ninja-build/ninja/releases/download/v1.10.1/ninja-linux.zip" -o ninja-linux.zip
unzip -o ninja-linux.zip
sudo cp ninja /usr/bin/
tar xzf meson-1.0.1.tar.gz
cd meson-1.0.1
sudo python3 setup.py install
- name: configure - linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
meson setup build \
-Dcassert=true \
-Dbuildtype=debug
- name: compile
run: |
cd build && ninja
- name: run postgres test
id: test_postgres
run: |
cd build
meson test --verbose --no-rebuild
timeout-minutes: 30
- name: collect test logs
if: always()
run: |
mkdir -p ${{ github.workspace }}/test-logs
# Collect Meson test logs
if [ -d build/meson-logs ] && [ "$(ls -A build/meson-logs 2>/dev/null)" ]; then
cp build/meson-logs/* ${{ github.workspace }}/test-logs/ 2>/dev/null || true
echo "Copied meson log"
else
echo "No meson log found"
fi
# test results
if [ -d build/testrun ]; then
find build/testrun -type f \( -name "*.log" -o -name "*.diff" -o -name "regression.diffs" \) -exec cp {} ${{ github.workspace }}/test-logs/ \; 2>/dev/null || true
echo "Collected test run logs"
fi
# create summary
{
echo "IvorySQL Meson Test Summary"
echo "=========================="
echo "Workflow: ${{ github.workflow }}"
echo "Run ID: ${{ github.run_id }}"
echo "Run Number: ${{ github.run_number }}"
echo "Commit: ${{ github.sha }}"
echo "Branch: ${{ github.ref }}"
echo "Event: ${{ github.event_name }}"
echo "Date: $(date -u '+%Y-%m-%d %H:%M:%S UTC')"
} > ${{ github.workspace }}/test-logs/SUMMARY.txt
# Compress logs
cd ${{ github.workspace }}
tar -czf test-logs.tar.gz test-logs/
echo "Compressed test logs: $(du -h test-logs.tar.gz | cut -f1)"
- name: upload failure logs (raw directories for deep debugging)
if: failure()
uses: actions/upload-artifact@v4
with:
name: postgres-test-failures-${{ github.sha }}.raw
path: |
build/meson-logs/
build/testrun/
retention-days: 30
compression-level: 6