diff --git a/.github/workflows/ci-builds.yml b/.github/workflows/ci-builds.yml index 1cd9c8cb5..020606da9 100644 --- a/.github/workflows/ci-builds.yml +++ b/.github/workflows/ci-builds.yml @@ -20,90 +20,7 @@ concurrency: cancel-in-progress: true 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: 'centos7' - type: '' - - dist: 'fedora37' - type: '-clang' - - dist: 'ubuntu20' - type: '-clang' - - dist: 'ubuntu22' - type: '-tap' - steps: + run: + uses: sysown/proxysql/.github/workflows/ci-builds.yml@GH-Actions + secrets: inherit - - 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 -