mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 23:52:03 +00:00
129 lines
4.1 KiB
YAML
129 lines
4.1 KiB
YAML
name: CIGithubActions
|
|
on: # yamllint disable-line rule:truthy
|
|
pull_request:
|
|
types:
|
|
- labeled
|
|
- unlabeled
|
|
- synchronize
|
|
- reopened
|
|
- opened
|
|
branches:
|
|
- master
|
|
jobs:
|
|
CheckLabels:
|
|
runs-on: [self-hosted, style-checker]
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Labels check
|
|
run: |
|
|
cd $GITHUB_WORKSPACE/tests/ci
|
|
python3 run_check.py
|
|
DockerHubPush:
|
|
needs: CheckLabels
|
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'pr-documentation') && !contains(github.event.pull_request.labels.*.name, 'pr-doc-fix') }}
|
|
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
|
|
StyleCheck:
|
|
needs: DockerHubPush
|
|
runs-on: [self-hosted, style-checker]
|
|
steps:
|
|
- name: Download changed images
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: changed_images
|
|
path: ${{ runner.temp }}/style_check
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Style Check
|
|
run: |
|
|
cd $GITHUB_WORKSPACE/tests/ci
|
|
python3 style_check.py
|
|
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 }}/build_check
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: 'recursive'
|
|
- name: Build
|
|
env:
|
|
TEMP_PATH: ${{runner.temp}}/build_check
|
|
REPO_COPY: ${{runner.temp}}/build_check/ClickHouse
|
|
CACHES_PATH: ${{runner.temp}}/../ccaches
|
|
CHECK_NAME: 'ClickHouse build check (actions)'
|
|
BUILD_NUMBER: 7
|
|
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_NUMBER
|
|
- 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
|
|
BuilderReport:
|
|
needs: [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"
|
|
FastTest:
|
|
needs: DockerHubPush
|
|
runs-on: [self-hosted, builder]
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Fast Test
|
|
env:
|
|
TEMP_PATH: ${{runner.temp}}/fasttest
|
|
REPO_COPY: ${{runner.temp}}/fasttest/ClickHouse
|
|
CACHES_PATH: ${{runner.temp}}/../ccaches
|
|
run: |
|
|
sudo rm -fr $TEMP_PATH
|
|
mkdir -p $TEMP_PATH
|
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
|
cd $REPO_COPY/tests/ci && python3 fast_test_check.py
|
|
FinishCheck:
|
|
needs: [StyleCheck, DockerHubPush, CheckLabels, BuilderReport, FastTest]
|
|
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
|