diff --git a/.github/workflows/build_and_test.yaml b/.github/workflows/build_and_test.yaml new file mode 100644 index 00000000..79fa8b25 --- /dev/null +++ b/.github/workflows/build_and_test.yaml @@ -0,0 +1,57 @@ +name: pg_quack Build and Test +on: + push: + pull_request: +jobs: + build-and-test: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + version: [REL_16_STABLE] + runs-on: ${{ matrix.os }} + + steps: + - name: Test details + run: echo Build and test pg_quack on ${{ matrix.os }} with PostgreSQL ${{ matrix.version }} branch + + - name: Checkout and build PostgreSQL code + run: | + sudo apt-get update -qq + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 + sudo apt-get install -y build-essential libreadline-dev zlib1g-dev flex bison libxml2-dev libxslt-dev libssl-dev libxml2-utils xsltproc ccache pkg-config libc++-dev libc++abi-dev libglib2.0-dev libtinfo5 cmake libstdc++-12-dev + rm -rf postgres + git clone --branch ${{ matrix.version }} --single-branch --depth 1 https://github.com/postgres/postgres.git + pushd postgres + git branch + ./configure --prefix=$PWD/inst/ --enable-cassert --enable-debug --with-openssl + make -j4 install + + - name: Start Postgres + run: | + pushd postgres + cd inst/bin + ./initdb -D data + ./pg_ctl -D data -l logfile start + popd + + - name: Checkout pg_quack extension code + uses: actions/checkout@v4 + with: + path: quack + + - name: Build and test pg_quack extension + id: regression-tests + run: | + export PATH="${PWD}/postgres/inst/bin:$PATH" + pushd quack + git submodule update --init --recursive + make + make install + make installcheck + popd + + - name: Print regression.diffs if regression tests failed + if: failure() && steps.regression-tests.outcome != 'success' + run: | + cat quack/regression.diffs diff --git a/third_party/third_party.cmake b/third_party/third_party.cmake deleted file mode 100644 index 36ef4834..00000000 --- a/third_party/third_party.cmake +++ /dev/null @@ -1,25 +0,0 @@ -if(POLICY CMP0077) - set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) -endif() - -# -# duckdb -# -execute_process(COMMAND git submodule update --init -- third_party/duckdb - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) - -# Disable ASAN -SET(ENABLE_SANITIZER OFF) -SET(ENABLE_UBSAN OFF) - -# No DuckDB cli -SET(BUILD_SHELL OFF) - -# Disable unitest -SET(BUILD_UNITTESTS OFF) - -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/duckdb EXCLUDE_FROM_ALL) - -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/third_party/duckdb/src/include) - -SET(QUACK_THIRD_PARTY_LIBS duckdb) \ No newline at end of file