Skip to content

Use enum to avoid strcmp for better performance in TdsSetAtAtStatVariable which is in critical path for many operations. #7086

Use enum to avoid strcmp for better performance in TdsSetAtAtStatVariable which is in critical path for many operations.

Use enum to avoid strcmp for better performance in TdsSetAtAtStatVariable which is in critical path for many operations. #7086

Workflow file for this run

name: TAP Tests
on: [push, pull_request]
jobs:
run-babelfish-tap-tests:
env:
OLD_INSTALL_DIR: psql_source
NEW_INSTALL_DIR: psql_target
ENGINE_BRANCH_OLD: BABEL_2_6_STABLE__PG_14_9
EXTENSION_BRANCH_OLD: BABEL_2_6_STABLE
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
id: checkout
- name: Install Dependencies
id: install-dependencies
if: always()
uses: ./.github/composite-actions/install-dependencies
- name: Install Tap Tests Dependencies
id: install-tap-dependencies
if: always() && steps.install-dependencies.outcome == 'success'
run: |
export PERL_MM_USE_DEFAULT=1
sudo perl -MCPAN -e 'install IPC::Run'
shell: bash
- name: Install Kerberos Dependencies
id: install-kerberos-dependencies
if: always() && steps.install-tap-dependencies.outcome == 'success'
run: |
cd ~
export DEBIAN_FRONTEND=noninteractive
sudo -E apt-get install krb5-admin-server krb5-kdc krb5-user libkrb5-dev -y -qq
shell: bash
- name: Build Modified Postgres using ${{env.ENGINE_BRANCH_OLD}}
id: build-modified-postgres-old
if: always() && steps.install-kerberos-dependencies.outcome == 'success'
uses: ./.github/composite-actions/build-modified-postgres
with:
engine_branch: ${{env.ENGINE_BRANCH_OLD}}
install_dir: ${{env.OLD_INSTALL_DIR}}
- name: Compile ANTLR
id: compile-antlr
if: always() && steps.build-modified-postgres-old.outcome == 'success'
uses: ./.github/composite-actions/compile-antlr
with:
install_dir: ${{env.OLD_INSTALL_DIR}}
- name: Build PostGIS Extension using ${{env.EXTENSION_BRANCH_OLD}}
id: build-postgis-extension-old
if: always() && steps.compile-antlr.outcome == 'success'
run: |
cd ..
export CC='ccache gcc'
export CMAKE_C_COMPILER_LAUNCHER=ccache
export CMAKE_CXX_COMPILER_LAUNCHER=ccache
sudo apt-get install wget
wget http://postgis.net/stuff/postgis-3.4.0.tar.gz
tar -xvzf postgis-3.4.0.tar.gz
wget https://download.osgeo.org/proj/proj-9.2.1.tar.gz
tar -xvzf proj-9.2.1.tar.gz
cd proj-9.2.1
if [ ! -d "build" ]; then
mkdir build
fi
cd build
cmake -DCMAKE_INSTALL_LIBDIR="lib/x86_64-linux-gnu" -DCMAKE_INSTALL_PREFIX="/usr" ..
cmake --build .
sudo cmake --build . --target install
cd ../../postgis-3.4.0
./configure --without-protobuf --without-raster --with-pgconfig=$HOME/psql_source/bin/pg_config
make USE_PGXS=1 PG_CONFIG=~/psql_source/bin/pg_config
sudo make USE_PGXS=1 PG_CONFIG=~/psql_source/bin/pg_config install
shell: bash
- name: Build Extensions using ${{env.EXTENSION_BRANCH_OLD}}
id: build-extensions-old
if: always() && steps.build-postgis-extension-old.outcome == 'success'
uses: ./.github/composite-actions/build-extensions
with:
install_dir: ${{env.OLD_INSTALL_DIR}}
extension_branch: ${{env.EXTENSION_BRANCH_OLD}}
- uses: actions/checkout@v2
- name: Build Modified Postgres using latest version
id: build-modified-postgres-new
if: always() && steps.build-extensions-old.outcome == 'success'
uses: ./.github/composite-actions/build-modified-postgres
with:
tap_tests: 'yes'
install_dir: ${{env.NEW_INSTALL_DIR}}
- name: Copy ANTLR
run: cp "/usr/local/lib/libantlr4-runtime.so.4.9.3" ~/${{env.NEW_INSTALL_DIR}}/lib/
- name: Build Extensions using latest version
id: build-extensions-new
if: always() && steps.build-modified-postgres-new.outcome == 'success'
uses: ./.github/composite-actions/build-extensions
with:
install_dir: ${{env.NEW_INSTALL_DIR}}
- name: Build PostGIS Extension
id: build-postgis-extension
if: always() && steps.build-extensions-new.outcome == 'success'
uses: ./.github/composite-actions/build-postgis-extension
with:
install_dir: ${{env.NEW_INSTALL_DIR}}
- name: Run TAP Tests
id: tap
if: always() && steps.build-postgis-extension.outcome == 'success'
timeout-minutes: 5
run: |
export PG_CONFIG=~/${{env.NEW_INSTALL_DIR}}/bin/pg_config
export PATH=/opt/mssql-tools/bin:$PATH
export oldinstall=$HOME/${{env.OLD_INSTALL_DIR}}
cd contrib/babelfishpg_tds
make installcheck PROVE_TESTS="t/001_tdspasswd.pl t/002_tdskerberos.pl t/003_bbfextnotloaded.pl t/004_bbfdumprestore.pl"
- name: Upload Logs
if: always() && steps.tap.outcome == 'failure'
uses: actions/upload-artifact@v2
with:
name: tap_tests_logs
path: contrib/babelfishpg_tds/test/tmp_check