Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 0 additions & 44 deletions .github/workflows/meson_build.yml

This file was deleted.

99 changes: 99 additions & 0 deletions .github/workflows/meson_build_pg_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
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
55 changes: 19 additions & 36 deletions contrib/ivorysql_ora/gensql.pl
Original file line number Diff line number Diff line change
Expand Up @@ -80,46 +80,31 @@ sub sql_merge
shift @ARGV;
foreach my $v (@ARGV)
{
# Delete ivorysql_ora--x.x(--x.x).sql files generated before.
unlink(File::Spec->rel2abs("ivorysql_ora--$v.sql"))
if (-e File::Spec->rel2abs("ivorysql_ora--$v.sql"));
# For Make mode, delete the old file first.
if ($first_arg ne 'meson') {
unlink(File::Spec->rel2abs("ivorysql_ora--$v.sql"))
if (-e File::Spec->rel2abs("ivorysql_ora--$v.sql"));

# Open(create if necessary) ivorysql_ora--x.x(--x.x).sql.
if ($first_arg eq 'meson'){
open(OUTFILE, ">contrib/ivorysql_ora/ivorysql_ora--$v.sql")
|| croak "Could not open ivorysql_ora--$v.sql : $!";
}
else {
# Open output file for Make mode (meson mode uses STDOUT captured by meson)
open(OUTFILE, ">ivorysql_ora--$v.sql")
|| croak "Could not open ivorysql_ora--$v.sql : $!";
|| croak "Could not open ivorysql_ora--$v.sql : $!";
}

# Write "extension file loading information" into it.
# Write "extension file loading information".
# Create extension when this version is "x.x".
if ($v =~ /^\d+\.\d+$/)
{
if ($first_arg eq 'meson'){
print STDOUT '\echo Use "CREATE EXTENSION ivorysql_ora"';
print STDOUT " to load this file. \\quit\n";
}
else
{
print OUTFILE '\echo Use "CREATE EXTENSION ivorysql_ora"';
print OUTFILE " to load this file. \\quit\n";
}
my $fh = ($first_arg eq 'meson') ? *STDOUT : *OUTFILE;
print $fh '\echo Use "CREATE EXTENSION ivorysql_ora"';
print $fh " to load this file. \\quit\n";
}
# Update extension when this version is "x.x--x.x".
elsif ($v =~ /^\d+\.\d+\-\-\d+\.\d+$/)
{
my $up2ver = (split("--", $v))[1];
if ($first_arg eq 'meson'){
print STDOUT '\echo Use "ALTER EXTENSION ivorysql_ora UPDATE';
print STDOUT " TO \'$up2ver\'\" to load this file. \\quit\n";
}
else{
print OUTFILE '\echo Use "ALTER EXTENSION ivorysql_ora UPDATE';
print OUTFILE " TO \'$up2ver\'\" to load this file. \\quit\n";
}
my $fh = ($first_arg eq 'meson') ? *STDOUT : *OUTFILE;
print $fh '\echo Use "ALTER EXTENSION ivorysql_ora UPDATE';
print $fh " TO \'$up2ver\'\" to load this file. \\quit\n";
}
else
{
Expand All @@ -135,25 +120,23 @@ sub sql_merge
if (-e "$set--$v.sql")
{
# Add a newline.
print OUTFILE "\n";
my $fh = ($first_arg eq 'meson') ? *STDOUT : *OUTFILE;
print $fh "\n";

# Open a sql file.
open(INFILE, "<", File::Spec->rel2abs("$set--$v.sql"));
while (my $line = <INFILE>)
{
# Delete the last tailing "\n" of this line.
chomp($line);
# Write.
if ($first_arg eq 'meson'){
print STDOUT "$line\n";
}
else{
print OUTFILE "$line\n";
}
print $fh "$line\n";
}
close INFILE;
}
}

close OUTFILE;
# Close OUTFILE for Make mode (meson mode doesn't open it)
close OUTFILE if ($first_arg ne 'meson');
}
}
20 changes: 0 additions & 20 deletions contrib/ivorysql_ora/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,3 @@ install_data(
'preload_ora_misc.sql',
install_dir: dir_data,
)

tests += {
'name': 'ivorysql_ora',
'sd': meson.current_source_dir(),
'bd': meson.current_build_dir(),
'regress': {
'sql': [
'check',
'check_btree',
'check_heap',
],
},
'tap': {
'tests': [
't/001_verify_heapam.pl',
't/002_cic.pl',
't/003_cic_2pc.pl',
],
},
}
19 changes: 0 additions & 19 deletions contrib/ora_btree_gin/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,3 @@ install_data(
'ora_btree_gin--1.0.sql',
kwargs: contrib_data_args,
)

tests += {
'name': 'ora_btree_gin',
'sd': meson.current_source_dir(),
'bd': meson.current_build_dir(),
'regress': {
'sql': [
'init',
'number',
'varchar2',
'binary_float',
'binary_double',
'date',
'timestamp',
'timestamptz',
'timestampltz',
],
},
}
21 changes: 0 additions & 21 deletions contrib/ora_btree_gist/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,3 @@ install_data(
'ora_btree_gist--1.0.sql',
kwargs: contrib_data_args,
)

tests += {
'name': 'ora_btree_gist',
'sd': meson.current_source_dir(),
'bd': meson.current_build_dir(),
'regress': {
'sql': [
'init',
'number',
'varchar2',
'binary_float',
'binary_double',
'date',
'timestamp',
'timestamptz',
'timestampltz',
'yminterval',
'dsinterval',
],
},
}
1 change: 1 addition & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -3595,6 +3595,7 @@ sys.exit(sp.returncode)
''',
test_initdb_template,
temp_install_bindir / 'initdb',
'-m', 'pg',
'--auth', 'trust', '--no-sync', '--no-instructions', '--lc-messages=C',
'--no-clean'
],
Expand Down
1 change: 1 addition & 0 deletions src/backend/utils/mb/conversion_procs/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ encodings = {
'euc_tw_and_big5/euc_tw_and_big5.c',
'euc_tw_and_big5/big5.c',
],
'gb18030_and_gbk': ['gb18030_and_gbk/gb18030_and_gbk.c'],
'latin2_and_win1250': ['latin2_and_win1250/latin2_and_win1250.c'],
'latin_and_mic': ['latin_and_mic/latin_and_mic.c'],
'utf8_and_big5': ['utf8_and_big5/utf8_and_big5.c'],
Expand Down
45 changes: 23 additions & 22 deletions src/pl/plisql/src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -73,27 +73,28 @@ install_headers(
install_dir: dir_include_server
)


tests += {
'name': 'plisql',
'sd': meson.current_source_dir(),
'bd': meson.current_build_dir(),
'regress': {
'sql': [
'plisql_array',
'plisql_call',
'plisql_control',
'plisql_copy',
'plisql_domain',
'plisql_record',
'plisql_cache',
'plisql_simple',
'plisql_transaction',
'plisql_trap',
'plisql_trigger',
'plisql_varprops',
],
},
}
# IvorySQL: plisql is Oracle-compatible procedural language, not needed in meson test
# Use 'make oracle-check' to run plisql tests
# tests += {
# 'name': 'plisql',
# 'sd': meson.current_source_dir(),
# 'bd': meson.current_build_dir(),
# 'regress': {
# 'sql': [
# 'plisql_array',
# 'plisql_call',
# 'plisql_control',
# 'plisql_copy',
# 'plisql_domain',
# 'plisql_record',
# 'plisql_cache',
# 'plisql_simple',
# 'plisql_transaction',
# 'plisql_trap',
# 'plisql_trigger',
# 'plisql_varprops',
# ],
# },
# }

subdir('po', if_found: libintl)