mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-13 02:53:38 +00:00
380 lines
14 KiB
YAML
380 lines
14 KiB
YAML
name: BackportPR
|
|
on: # yamllint disable-line rule:truthy
|
|
push:
|
|
branches:
|
|
- 'backport/**'
|
|
jobs:
|
|
DockerHubPush:
|
|
runs-on: [self-hosted, style-checker]
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Images check
|
|
run: |
|
|
cd $GITHUB_WORKSPACE/tests/ci
|
|
python3 docker_images_check.py
|
|
- name: Upload images files to artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: changed_images
|
|
path: ${{ runner.temp }}/docker_images_check/changed_images.json
|
|
CompatibilityCheck:
|
|
needs: [BuilderDebRelease]
|
|
runs-on: [self-hosted, style-checker]
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Download json reports
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
path: ${{runner.temp}}/reports_dir
|
|
- name: CompatibilityCheck
|
|
env:
|
|
TEMP_PATH: ${{runner.temp}}/compatibility_check
|
|
REPO_COPY: ${{runner.temp}}/compatibility_check/ClickHouse
|
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
|
run: |
|
|
sudo rm -fr $TEMP_PATH
|
|
mkdir -p $TEMP_PATH
|
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
|
cd $REPO_COPY/tests/ci && python3 compatibility_check.py
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
docker kill $(docker ps -q) ||:
|
|
docker rm -f $(docker ps -a -q) ||:
|
|
sudo rm -fr $TEMP_PATH
|
|
#########################################################################################
|
|
#################################### ORDINARY BUILDS ####################################
|
|
#########################################################################################
|
|
BuilderDebRelease:
|
|
needs: [DockerHubPush]
|
|
runs-on: [self-hosted, builder]
|
|
steps:
|
|
- name: Download changed images
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: changed_images
|
|
path: ${{ runner.temp }}/images_path
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: 'recursive'
|
|
fetch-depth: 0 # otherwise we will have no info about contributors
|
|
- name: Build
|
|
env:
|
|
TEMP_PATH: ${{runner.temp}}/build_check
|
|
IMAGES_PATH: ${{runner.temp}}/images_path
|
|
REPO_COPY: ${{runner.temp}}/build_check/ClickHouse
|
|
CACHES_PATH: ${{runner.temp}}/../ccaches
|
|
CHECK_NAME: 'ClickHouse build check (actions)'
|
|
BUILD_NAME: 'package_release'
|
|
run: |
|
|
sudo rm -fr $TEMP_PATH
|
|
mkdir -p $TEMP_PATH
|
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
|
cd $REPO_COPY/tests/ci && python3 build_check.py "$CHECK_NAME" $BUILD_NAME
|
|
- name: Upload build URLs to artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ env.BUILD_NAME }}
|
|
path: ${{ runner.temp }}/build_check/${{ env.BUILD_NAME }}.json
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
docker kill $(docker ps -q) ||:
|
|
docker rm -f $(docker ps -a -q) ||:
|
|
sudo rm -fr $TEMP_PATH
|
|
BuilderDebAsan:
|
|
needs: [DockerHubPush]
|
|
runs-on: [self-hosted, builder]
|
|
steps:
|
|
- name: Download changed images
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: changed_images
|
|
path: ${{ runner.temp }}/images_path
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: 'recursive'
|
|
fetch-depth: 0 # otherwise we will have no info about contributors
|
|
- name: Build
|
|
env:
|
|
TEMP_PATH: ${{runner.temp}}/build_check
|
|
IMAGES_PATH: ${{runner.temp}}/images_path
|
|
REPO_COPY: ${{runner.temp}}/build_check/ClickHouse
|
|
CACHES_PATH: ${{runner.temp}}/../ccaches
|
|
CHECK_NAME: 'ClickHouse build check (actions)'
|
|
BUILD_NAME: 'package_asan'
|
|
run: |
|
|
sudo rm -fr $TEMP_PATH
|
|
mkdir -p $TEMP_PATH
|
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
|
cd $REPO_COPY/tests/ci && python3 build_check.py "$CHECK_NAME" $BUILD_NAME
|
|
- name: Upload build URLs to artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ env.BUILD_NAME }}
|
|
path: ${{ runner.temp }}/build_check/${{ env.BUILD_NAME }}.json
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
docker kill $(docker ps -q) ||:
|
|
docker rm -f $(docker ps -a -q) ||:
|
|
sudo rm -fr $TEMP_PATH
|
|
BuilderDebTsan:
|
|
needs: [DockerHubPush]
|
|
runs-on: [self-hosted, builder]
|
|
steps:
|
|
- name: Download changed images
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: changed_images
|
|
path: ${{ runner.temp }}/images_path
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: 'recursive'
|
|
fetch-depth: 0 # otherwise we will have no info about contributors
|
|
- name: Build
|
|
env:
|
|
TEMP_PATH: ${{runner.temp}}/build_check
|
|
IMAGES_PATH: ${{runner.temp}}/images_path
|
|
REPO_COPY: ${{runner.temp}}/build_check/ClickHouse
|
|
CACHES_PATH: ${{runner.temp}}/../ccaches
|
|
CHECK_NAME: 'ClickHouse build check (actions)'
|
|
BUILD_NAME: 'package_tsan'
|
|
run: |
|
|
sudo rm -fr $TEMP_PATH
|
|
mkdir -p $TEMP_PATH
|
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
|
cd $REPO_COPY/tests/ci && python3 build_check.py "$CHECK_NAME" $BUILD_NAME
|
|
- name: Upload build URLs to artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ env.BUILD_NAME }}
|
|
path: ${{ runner.temp }}/build_check/${{ env.BUILD_NAME }}.json
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
docker kill $(docker ps -q) ||:
|
|
docker rm -f $(docker ps -a -q) ||:
|
|
sudo rm -fr $TEMP_PATH
|
|
BuilderDebDebug:
|
|
needs: [DockerHubPush]
|
|
runs-on: [self-hosted, builder]
|
|
steps:
|
|
- name: Download changed images
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: changed_images
|
|
path: ${{ runner.temp }}/images_path
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: 'recursive'
|
|
fetch-depth: 0 # otherwise we will have no info about contributors
|
|
- name: Build
|
|
env:
|
|
TEMP_PATH: ${{runner.temp}}/build_check
|
|
IMAGES_PATH: ${{runner.temp}}/images_path
|
|
REPO_COPY: ${{runner.temp}}/build_check/ClickHouse
|
|
CACHES_PATH: ${{runner.temp}}/../ccaches
|
|
CHECK_NAME: 'ClickHouse build check (actions)'
|
|
BUILD_NAME: 'package_debug'
|
|
run: |
|
|
sudo rm -fr $TEMP_PATH
|
|
mkdir -p $TEMP_PATH
|
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
|
cd $REPO_COPY/tests/ci && python3 build_check.py "$CHECK_NAME" $BUILD_NAME
|
|
- name: Upload build URLs to artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ env.BUILD_NAME }}
|
|
path: ${{ runner.temp }}/build_check/${{ env.BUILD_NAME }}.json
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
docker kill $(docker ps -q) ||:
|
|
docker rm -f $(docker ps -a -q) ||:
|
|
sudo rm -fr $TEMP_PATH
|
|
############################################################################################
|
|
##################################### BUILD REPORTER #######################################
|
|
############################################################################################
|
|
BuilderReport:
|
|
needs:
|
|
- BuilderDebRelease
|
|
- BuilderDebAsan
|
|
- BuilderDebTsan
|
|
- BuilderDebUBsan
|
|
- BuilderDebMsan
|
|
- BuilderDebDebug
|
|
runs-on: [self-hosted, style-checker]
|
|
steps:
|
|
- name: Download json reports
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
path: ${{runner.temp}}/reports_dir
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Report Builder
|
|
env:
|
|
TEMP_PATH: ${{runner.temp}}/report_check
|
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
|
CHECK_NAME: 'ClickHouse build check (actions)'
|
|
run: |
|
|
sudo rm -fr $TEMP_PATH
|
|
mkdir -p $TEMP_PATH
|
|
cd $GITHUB_WORKSPACE/tests/ci
|
|
python3 build_report_check.py "$CHECK_NAME"
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
docker kill $(docker ps -q) ||:
|
|
docker rm -f $(docker ps -a -q) ||:
|
|
sudo rm -fr $TEMP_PATH
|
|
##############################################################################################
|
|
########################### FUNCTIONAl STATELESS TESTS #######################################
|
|
##############################################################################################
|
|
FunctionalStatelessTestAsan:
|
|
needs: [BuilderDebAsan]
|
|
runs-on: [self-hosted, func-tester]
|
|
steps:
|
|
- name: Download json reports
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
path: ${{runner.temp}}/reports_dir
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Functional test
|
|
env:
|
|
TEMP_PATH: ${{runner.temp}}/stateless_debug
|
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
|
CHECK_NAME: 'Stateless tests (address, actions)'
|
|
REPO_COPY: ${{runner.temp}}/stateless_debug/ClickHouse
|
|
KILL_TIMEOUT: 10800
|
|
run: |
|
|
sudo rm -fr $TEMP_PATH
|
|
mkdir -p $TEMP_PATH
|
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
|
cd $REPO_COPY/tests/ci
|
|
python3 functional_test_check.py "$CHECK_NAME" $KILL_TIMEOUT
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
docker kill $(docker ps -q) ||:
|
|
docker rm -f $(docker ps -a -q) ||:
|
|
sudo rm -fr $TEMP_PATH
|
|
##############################################################################################
|
|
############################ FUNCTIONAl STATEFUL TESTS #######################################
|
|
##############################################################################################
|
|
FunctionalStatefulTestDebug:
|
|
needs: [BuilderDebDebug]
|
|
runs-on: [self-hosted, func-tester]
|
|
steps:
|
|
- name: Download json reports
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
path: ${{runner.temp}}/reports_dir
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Functional test
|
|
env:
|
|
TEMP_PATH: ${{runner.temp}}/stateful_debug
|
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
|
CHECK_NAME: 'Stateful tests (debug, actions)'
|
|
REPO_COPY: ${{runner.temp}}/stateful_debug/ClickHouse
|
|
KILL_TIMEOUT: 3600
|
|
run: |
|
|
sudo rm -fr $TEMP_PATH
|
|
mkdir -p $TEMP_PATH
|
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
|
cd $REPO_COPY/tests/ci
|
|
python3 functional_test_check.py "$CHECK_NAME" $KILL_TIMEOUT
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
docker kill $(docker ps -q) ||:
|
|
docker rm -f $(docker ps -a -q) ||:
|
|
sudo rm -fr $TEMP_PATH
|
|
##############################################################################################
|
|
######################################### STRESS TESTS #######################################
|
|
##############################################################################################
|
|
StressTestTsan:
|
|
needs: [BuilderDebTsan]
|
|
runs-on: [self-hosted, stress-tester]
|
|
steps:
|
|
- name: Download json reports
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
path: ${{runner.temp}}/reports_dir
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Stress test
|
|
env:
|
|
TEMP_PATH: ${{runner.temp}}/stress_thread
|
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
|
CHECK_NAME: 'Stress test (thread, actions)'
|
|
REPO_COPY: ${{runner.temp}}/stress_thread/ClickHouse
|
|
run: |
|
|
sudo rm -fr $TEMP_PATH
|
|
mkdir -p $TEMP_PATH
|
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
|
cd $REPO_COPY/tests/ci
|
|
python3 stress_check.py "$CHECK_NAME"
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
docker kill $(docker ps -q) ||:
|
|
docker rm -f $(docker ps -a -q) ||:
|
|
sudo rm -fr $TEMP_PATH
|
|
#############################################################################################
|
|
############################# INTEGRATION TESTS #############################################
|
|
#############################################################################################
|
|
IntegrationTestsRelease:
|
|
needs: [BuilderDebRelease, FunctionalStatelessTestRelease]
|
|
runs-on: [self-hosted, stress-tester]
|
|
steps:
|
|
- name: Download json reports
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
path: ${{runner.temp}}/reports_dir
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Integration test
|
|
env:
|
|
TEMP_PATH: ${{runner.temp}}/integration_tests_release
|
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
|
CHECK_NAME: 'Integration tests (release, actions)'
|
|
REPO_COPY: ${{runner.temp}}/integration_tests_release/ClickHouse
|
|
run: |
|
|
sudo rm -fr $TEMP_PATH
|
|
mkdir -p $TEMP_PATH
|
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
|
cd $REPO_COPY/tests/ci
|
|
python3 integration_test_check.py "$CHECK_NAME"
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
docker kill $(docker ps -q) ||:
|
|
docker rm -f $(docker ps -a -q) ||:
|
|
sudo rm -fr $TEMP_PATH
|
|
FinishCheck:
|
|
needs:
|
|
- DockerHubPush
|
|
- BuilderReport
|
|
- FunctionalStatelessTestAsan
|
|
- FunctionalStatefulTestDebug
|
|
- StressTestTsan
|
|
- IntegrationTestsRelease
|
|
- CompatibilityCheck
|
|
runs-on: [self-hosted, style-checker]
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Finish label
|
|
run: |
|
|
cd $GITHUB_WORKSPACE/tests/ci
|
|
python3 finish_check.py
|