mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 09:22:05 +00:00
92 lines
3.1 KiB
YAML
92 lines
3.1 KiB
YAML
name: NightlyBuilds
|
|
|
|
env:
|
|
# Force the stdout and stderr streams to be unbuffered
|
|
PYTHONUNBUFFERED: 1
|
|
|
|
"on":
|
|
schedule:
|
|
- cron: '13 3 * * *'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
RunConfig:
|
|
runs-on: [self-hosted, style-checker-aarch64]
|
|
outputs:
|
|
data: ${{ steps.runconfig.outputs.CI_DATA }}
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: ClickHouse/checkout@v1
|
|
with:
|
|
clear-repository: true # to ensure correct digests
|
|
fetch-depth: 0 # to get version
|
|
filter: tree:0
|
|
- name: Debug Info
|
|
uses: ./.github/actions/debug
|
|
- name: PrepareRunConfig
|
|
id: runconfig
|
|
run: |
|
|
echo "::group::configure CI run"
|
|
python3 "$GITHUB_WORKSPACE/tests/ci/ci.py" --configure --workflow NightlyBuilds --outfile ${{ runner.temp }}/ci_run_data.json
|
|
echo "::endgroup::"
|
|
|
|
echo "::group::CI run configure results"
|
|
python3 -m json.tool ${{ runner.temp }}/ci_run_data.json
|
|
echo "::endgroup::"
|
|
{
|
|
echo 'CI_DATA<<EOF'
|
|
cat ${{ runner.temp }}/ci_run_data.json
|
|
echo 'EOF'
|
|
} >> "$GITHUB_OUTPUT"
|
|
BuildDockers:
|
|
needs: [RunConfig]
|
|
uses: ./.github/workflows/docker_test_images.yml
|
|
with:
|
|
data: "${{ needs.RunConfig.outputs.data }}"
|
|
set_latest: true
|
|
|
|
Builds_1:
|
|
needs: [RunConfig]
|
|
if: ${{ !failure() && !cancelled() && contains(fromJson(needs.RunConfig.outputs.data).stages_data.stages_to_do, 'Builds_1') }}
|
|
uses: ./.github/workflows/reusable_build_stage.yml
|
|
with:
|
|
stage: Builds_1
|
|
data: ${{ needs.RunConfig.outputs.data }}
|
|
Tests_1:
|
|
needs: [RunConfig, Builds_1]
|
|
if: ${{ !failure() && !cancelled() && contains(fromJson(needs.RunConfig.outputs.data).stages_data.stages_to_do, 'Tests_1') }}
|
|
uses: ./.github/workflows/reusable_test_stage.yml
|
|
with:
|
|
stage: Tests_1
|
|
data: ${{ needs.RunConfig.outputs.data }}
|
|
Builds_2:
|
|
needs: [RunConfig, Builds_1]
|
|
if: ${{ !failure() && !cancelled() && contains(fromJson(needs.RunConfig.outputs.data).stages_data.stages_to_do, 'Builds_2') }}
|
|
uses: ./.github/workflows/reusable_build_stage.yml
|
|
with:
|
|
stage: Builds_2
|
|
data: ${{ needs.RunConfig.outputs.data }}
|
|
Tests_2:
|
|
needs: [RunConfig, Builds_1, Tests_1]
|
|
if: ${{ !failure() && !cancelled() && contains(fromJson(needs.RunConfig.outputs.data).stages_data.stages_to_do, 'Tests_2') }}
|
|
uses: ./.github/workflows/reusable_test_stage.yml
|
|
with:
|
|
stage: Tests_2
|
|
data: ${{ needs.RunConfig.outputs.data }}
|
|
|
|
CheckWorkflow:
|
|
if: ${{ !cancelled() }}
|
|
needs: [RunConfig, BuildDockers, Tests_2]
|
|
runs-on: [self-hosted, style-checker-aarch64]
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: ClickHouse/checkout@v1
|
|
- name: Check Workflow results
|
|
if: ${{ !cancelled() }}
|
|
run: |
|
|
export WORKFLOW_RESULT_FILE="/tmp/workflow_results.json"
|
|
cat > "$WORKFLOW_RESULT_FILE" << 'EOF'
|
|
${{ toJson(needs) }}
|
|
EOF
|
|
python3 ./tests/ci/ci_buddy.py --check-wf-status
|