mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 21:24:28 +00:00
112 lines
3.8 KiB
YAML
112 lines
3.8 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
|
|
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
|
|
Builder:
|
|
needs: DockerHubPush
|
|
runs-on: [self-hosted, builder]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
build_number: [3, 7]
|
|
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)'
|
|
run: mkdir -p $TEMP_PATH && cp -r $GITHUB_WORKSPACE $TEMP_PATH && cd $REPO_COPY/tests/ci && python3 build_check.py "$CHECK_NAME" ${{ matrix.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: Builder
|
|
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: 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: 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]
|
|
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
|