Skip to content

Merge pull request #4277 from sysown/v2.6.0-distro-targets #176

Merge pull request #4277 from sysown/v2.6.0-distro-targets

Merge pull request #4277 from sysown/v2.6.0-distro-targets #176

Workflow file for this run

name: CI-builds
on:
push:
branches: [ "v2.x" ]
paths-ignore:
- '.github/**'
- '**.md'
pull_request:
branches: [ "v2.x" ]
paths-ignore:
- '.github/**'
- '**.md'
# schedule:
# - cron: '15 13 * * 3'
workflow_dispatch:
jobs:
builds:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
# dist: [ 'almalinux8','almalinux9','centos6','centos7','centos8','debian8','debian9','debian10','debian11','fedora27','fedora28','fedora33','fedora34','fedora36','fedora37','opensuse15','ubuntu14','ubuntu16','ubuntu18','ubuntu20','ubuntu22' ]
# dist: [ 'centos6','fedora37' ]
# type: [ '','-dbg','-clang' ]
include:
- dist: 'centos6'
type: ''
- dist: 'ubuntu22'
type: '-tap'
# - dist: 'ubuntu22'
# type: '-testaurora'
# - dist: 'ubuntu22'
# type: '-testgalera'
# - dist: 'ubuntu22'
# type: '-testgrouprep'
# - dist: 'ubuntu22'
# type: '-testreadonly'
# - dist: 'ubuntu22'
# type: '-testreplicationlag'
# - dist: 'ubuntu22'
# type: '-testall'
- dist: 'fedora37'
type: '-clang'
steps:
- name: Cache build
id: cache
if: ${{ matrix.type == '-tap' }}
uses: actions/cache@v3
with:
# key: ${{ github.workflow }}_${{ matrix.dist }}${{ matrix.type }}_${{ env.GIT_VERSION }}
key: ${{ github.workflow }}_${{ github.sha }}_${{ matrix.dist }}${{ matrix.type }}
# lookup-only: true
path: |
proxysql/
- name: Checkout repository
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
uses: actions/checkout@v3
with:
repository: 'sysown/proxysql'
# ref: 'v2.x'
fetch-depth: 0
path: 'proxysql'
# - name: Set GIT_VERSION
# if: ${{ steps.cache.outputs.cache-hit != 'true' }}
# run: |
# git fetch --tags --force
# GIT_VERSION=$(git describe --long --abbrev=7)
# echo "GIT_VERSION=${GIT_VERSION}"
# echo "GIT_VERSION=${GIT_VERSION}" >> $GITHUB_ENV
- name: hot-fixes
run: |
#sed -i 's/-I$(CURL_IDIR) -I$(IDIR)/-I$(CURL_IDIR) -I${SQLITE3_DIR} -I$(IDIR)/' proxysql/test/tap/tests/Makefile
#sed -i '/#include "SpookyV2.h"/d' proxysql/test/tap/tests/aurora.cpp
#sed -i '/#include "SpookyV2.h"/d' proxysql/test/tap/tap/SQLite3_Server.cpp
#sed -i '/LDIRS=/a LDIRS+= -L$(DEPS_PATH)/coredumper/coredumper/src' proxysql/test/tap/tests/Makefile
#sed -i '/STATIC_LIBS=/a STATIC_LIBS+= $(DEPS_PATH)/coredumper/coredumper/src/libcoredumper.a' proxysql/test/tap/tests/Makefile
#sed -i '/#include "SpookyV2.h"/d' proxysql/test/tap/tests/galera_1_timeout_count.cpp
#sed -i 's/dump_table_mysql_servers()/dump_table_mysql("mysql_servers")/' proxysql/test/tap/tests/galera_1_timeout_count.cpp
#sed -i '/#include "SpookyV2.h"/d' proxysql/test/tap/tests/galera_2_timeout_no_count.cpp
#sed -i 's/dump_table_mysql_servers()/dump_table_mysql("mysql_servers")/' proxysql/test/tap/tests/galera_2_timeout_no_count.cpp
- name: Build
id: build
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: |
cd proxysql/
if [[ "${{ matrix.type }}" =~ "-tap" ]]; then
# build proxysql
sed -i "/command/c \ command: bash -l -c 'cd /opt/proxysql && make -j$(nproc) debug_clickhouse WITHGCOV=1'" docker-compose.yml
make ${{ matrix.dist }}-dbg
# build tap tests
sed -i "/command/c \ command: bash -l -c 'cd /opt/proxysql && make -j$(nproc) build_tap_test_debug WITHGCOV=1'" docker-compose.yml
make ${{ matrix.dist }}-dbg | tee ../build.log
elif [[ "${{ matrix.type }}" =~ "-test" ]]; then
TYPE=${{ matrix.type }}
# build TYPE
sed -i "/command/c \ command: bash -l -c 'cd /opt/proxysql && make -j$(nproc) ${TYPE#-}'" docker-compose.yml
make ${{ matrix.dist }} | tee ../build.log
else
make -j$(nproc) ${{ matrix.dist }}${{ matrix.type }} | tee ../build.log
fi
- name: Check build
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: |
grep 'exited with code 0' build.log