2022-02-10 10:44:50 +00:00
|
|
|
name: NightlyBuilds
|
|
|
|
|
|
|
|
env:
|
|
|
|
# Force the stdout and stderr streams to be unbuffered
|
|
|
|
PYTHONUNBUFFERED: 1
|
|
|
|
|
|
|
|
"on":
|
|
|
|
schedule:
|
2022-02-14 00:24:42 +00:00
|
|
|
- cron: '13 3 * * *'
|
2022-03-23 14:26:22 +00:00
|
|
|
workflow_dispatch:
|
2022-02-10 10:44:50 +00:00
|
|
|
|
|
|
|
jobs:
|
2023-12-18 08:07:22 +00:00
|
|
|
RunConfig:
|
2024-02-21 16:59:41 +00:00
|
|
|
runs-on: [self-hosted, style-checker-aarch64]
|
2023-12-18 08:07:22 +00:00
|
|
|
outputs:
|
|
|
|
data: ${{ steps.runconfig.outputs.CI_DATA }}
|
2022-02-10 10:44:50 +00:00
|
|
|
steps:
|
|
|
|
- name: Check out repository code
|
2022-12-23 16:54:19 +00:00
|
|
|
uses: ClickHouse/checkout@v1
|
2022-12-20 10:14:42 +00:00
|
|
|
with:
|
2023-12-18 08:07:22 +00:00
|
|
|
clear-repository: true # to ensure correct digests
|
2023-12-18 16:06:10 +00:00
|
|
|
fetch-depth: 0 # to get version
|
|
|
|
filter: tree:0
|
2024-09-13 15:20:49 +00:00
|
|
|
- name: Debug Info
|
|
|
|
uses: ./.github/actions/debug
|
2023-12-18 08:07:22 +00:00
|
|
|
- name: PrepareRunConfig
|
|
|
|
id: runconfig
|
2022-02-10 10:44:50 +00:00
|
|
|
run: |
|
2023-12-18 08:07:22 +00:00
|
|
|
echo "::group::configure CI run"
|
2024-11-19 16:14:55 +00:00
|
|
|
python3 "$GITHUB_WORKSPACE/tests/ci/ci.py" --configure --workflow NightlyBuilds --outfile ${{ runner.temp }}/ci_run_data.json
|
2023-12-18 08:07:22 +00:00
|
|
|
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]
|
2024-07-14 19:07:41 +00:00
|
|
|
uses: ./.github/workflows/docker_test_images.yml
|
2023-12-18 08:07:22 +00:00
|
|
|
with:
|
|
|
|
data: "${{ needs.RunConfig.outputs.data }}"
|
|
|
|
set_latest: true
|
2024-11-19 16:14:55 +00:00
|
|
|
|
|
|
|
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 }}
|
|
|
|
|
2024-07-22 13:46:27 +00:00
|
|
|
CheckWorkflow:
|
|
|
|
if: ${{ !cancelled() }}
|
2024-11-19 16:14:55 +00:00
|
|
|
needs: [RunConfig, BuildDockers, Tests_2]
|
2024-07-22 13:46:27 +00:00
|
|
|
runs-on: [self-hosted, style-checker-aarch64]
|
|
|
|
steps:
|
|
|
|
- name: Check out repository code
|
|
|
|
uses: ClickHouse/checkout@v1
|
|
|
|
- name: Check Workflow results
|
2024-07-25 09:32:59 +00:00
|
|
|
if: ${{ !cancelled() }}
|
2024-07-22 13:46:27 +00:00
|
|
|
run: |
|
|
|
|
export WORKFLOW_RESULT_FILE="/tmp/workflow_results.json"
|
2024-07-24 07:32:51 +00:00
|
|
|
cat > "$WORKFLOW_RESULT_FILE" << 'EOF'
|
2024-07-22 13:46:27 +00:00
|
|
|
${{ toJson(needs) }}
|
|
|
|
EOF
|
|
|
|
python3 ./tests/ci/ci_buddy.py --check-wf-status
|