mirror of https://github.com/sysown/proxysql
parent
85e6907bab
commit
9235fa4923
@ -0,0 +1,99 @@
|
||||
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
|
||||
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: 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 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 build_tap_test_debug WITHGCOV=1'" docker-compose.yml
|
||||
make ${{ matrix.dist }}-dbg
|
||||
elif [[ "${{ matrix.type }}" =~ "-test" ]]; then
|
||||
TYPE=${{ matrix.type }}
|
||||
# build TYPE
|
||||
sed -i "/command/c \ command: bash -l -c 'cd /opt/proxysql && make ${TYPE#-}'" docker-compose.yml
|
||||
make ${{ matrix.dist }}
|
||||
else
|
||||
make ${{ matrix.dist }}${{ matrix.type }}
|
||||
fi
|
||||
|
||||
- name: Check
|
||||
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
|
||||
run: |
|
||||
ls -l proxysql/src
|
||||
|
||||
Loading…
Reference in new issue