name: CIGithubActions on: # yamllint disable-line rule:truthy pull_request: types: - synchronize - reopened - opened branches: - master paths-ignore: - 'docs/**' - 'website/**' 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 BuilderPerformance: 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: 'performance' 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 PerformanceComparison: needs: [BuilderPerformance] runs-on: [self-hosted, perf-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: Performance Comparison env: TEMP_PATH: ${{runner.temp}}/performance_comparison REPORTS_PATH: ${{runner.temp}}/reports_dir CHECK_NAME: 'Performance Comparison (actions)' REPO_COPY: ${{runner.temp}}/performance_comparison/ClickHouse RAMDRIVE_PATH: ${{runner.temp}}/performance_comparison/ramdrive RAMDRIVE_SIZE: '30G' run: | sudo rm -fr $TEMP_PATH mkdir -p $TEMP_PATH cp -r $GITHUB_WORKSPACE $TEMP_PATH cd $REPO_COPY/tests/ci python3 performance_comparison_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