-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d816e7
commit bf07407
Showing
1 changed file
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: Build Package | ||
|
||
env: | ||
TRAVIS: "true" | ||
on: | ||
push: | ||
branches: | ||
- "**" | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
build_package: | ||
name: Build package | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
PGVERSION: | ||
- 10 | ||
- 11 | ||
- 12 | ||
- 13 | ||
- 14 | ||
TEST: | ||
- multi | ||
- single | ||
- monitor | ||
- ssl | ||
include: | ||
- PGVERSION: 14 | ||
TEST: tablespaces | ||
DOCKERTEST: true | ||
- PGVERSION: 14 | ||
TEST: tablespaces | ||
LINTING: true | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Set environment variables | ||
run: | | ||
echo "PGVERSION=${{ matrix.PGVERSION }}" >> $GITHUB_ENV | ||
echo "TEST=${{ matrix.TEST }}" >> $GITHUB_ENV | ||
echo "DOCKERTEST=${{ matrix.DOCKERTEST }}" >> $GITHUB_ENV | ||
echo "LINTING=${{ matrix.LINTING }}" >> $GITHUB_ENV | ||
echo "TRAVIS_BUILD_DIR=$(pwd)" >> $GITHUB_ENV | ||
- name: Clone and install tools branch | ||
run: | | ||
gcc --version | ||
git clone -b v0.7.22 --depth 1 https://github.com/citusdata/tools.git ../tools | ||
sudo make -C ../tools install | ||
- name: Pre Install steps | ||
run: | | ||
if [ -z "${LINTING}" ]; then setup_apt; fi | ||
if [ -z "${LINTING}" ]; then nuke_pg; fi | ||
python --version | ||
python3 --version | ||
sudo apt-get install liblz4-1 liblz4-dev bridge-utils python3-pip python3-nose python3-psycopg2 libxslt1-dev | ||
sudo apt-get install libkrb5-dev python3-setuptools | ||
sudo -H pip3 install pyroute2>=0.5.17 | ||
pip3 install --user black | ||
- name: Install steps | ||
run: | | ||
if [ -n "${LINTING}" ]; then install_uncrustify; fi | ||
if [ -n "${LINTING}" ]; then rm -rf uncrustify*; fi | ||
if [ -z "${LINTING}" ]; then install_pg; fi | ||
if [ -z "${LINTING}" ]; then install_custom_pg; fi | ||
env | ||
if [ -z "${LINTING}" ]; then pg_config; fi | ||
if [ -z "${LINTING}" ]; then PATH=`pg_config --bindir`:$PATH which pg_ctl; fi | ||
- name: Script steps | ||
run: | | ||
echo "Travis build dir: ${TRAVIS_BUILD_DIR}" | ||
if [ -n "${LINTING}" ]; then citus_indent --check; fi | ||
if [ -n "${LINTING}" ]; then black --check .; fi | ||
if [ -n "${LINTING}" ]; then ci/banned.h.sh; fi | ||
if [ -z "${LINTING}"] && [ -z "$DOCKERTEST" ]; then make -j5 CFLAGS=-Werror; fi | ||
if [ -z "${LINTING}"] && [ -z "$DOCKERTEST" ]; then sudo make install; fi | ||
if [ -z "${LINTING}"] && [ -z "$DOCKERTEST" ]; then PATH=`pg_config --bindir`:$PATH make test; fi | ||
set +e | ||
if [ -n "${LINTING}"] && [ -n "$DOCKERTEST" ]; then make test; fi | ||
set -e | ||
- name: After script steps | ||
run: | | ||
if [ -n "${LINTING}"] && [ -n "$DOCKERTEST" ]; then make -C tests/tablespaces teardown; fi |