mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-19 06:01:57 +00:00
125 lines
4.5 KiB
YAML
125 lines
4.5 KiB
YAML
name: NightlyBuilds
|
|
|
|
env:
|
|
# Force the stdout and stderr streams to be unbuffered
|
|
PYTHONUNBUFFERED: 1
|
|
|
|
"on":
|
|
schedule:
|
|
- cron: '13 3 * * *'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
DockerHubPushAarch64:
|
|
runs-on: [self-hosted, style-checker-aarch64]
|
|
steps:
|
|
- name: Clear repository
|
|
run: |
|
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Images check
|
|
run: |
|
|
cd "$GITHUB_WORKSPACE/tests/ci"
|
|
python3 docker_images_check.py --suffix aarch64 --all
|
|
- name: Upload images files to artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: changed_images_aarch64
|
|
path: ${{ runner.temp }}/docker_images_check/changed_images_aarch64.json
|
|
DockerHubPushAmd64:
|
|
runs-on: [self-hosted, style-checker]
|
|
steps:
|
|
- name: Clear repository
|
|
run: |
|
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Images check
|
|
run: |
|
|
cd "$GITHUB_WORKSPACE/tests/ci"
|
|
python3 docker_images_check.py --suffix amd64 --all
|
|
- name: Upload images files to artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: changed_images_amd64
|
|
path: ${{ runner.temp }}/docker_images_check/changed_images_amd64.json
|
|
DockerHubPush:
|
|
needs: [DockerHubPushAmd64, DockerHubPushAarch64]
|
|
runs-on: [self-hosted, style-checker]
|
|
steps:
|
|
- name: Clear repository
|
|
run: |
|
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Download changed aarch64 images
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: changed_images_aarch64
|
|
path: ${{ runner.temp }}
|
|
- name: Download changed amd64 images
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: changed_images_amd64
|
|
path: ${{ runner.temp }}
|
|
- name: Images check
|
|
run: |
|
|
cd "$GITHUB_WORKSPACE/tests/ci"
|
|
python3 docker_manifests_merge.py --suffix amd64 --suffix aarch64
|
|
- name: Upload images files to artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: changed_images
|
|
path: ${{ runner.temp }}/changed_images.json
|
|
BuilderCoverity:
|
|
needs: DockerHubPush
|
|
runs-on: [self-hosted, builder]
|
|
steps:
|
|
- name: Set envs
|
|
run: |
|
|
cat >> "$GITHUB_ENV" << 'EOF'
|
|
BUILD_NAME=coverity
|
|
CACHES_PATH=${{runner.temp}}/../ccaches
|
|
IMAGES_PATH=${{runner.temp}}/images_path
|
|
REPO_COPY=${{runner.temp}}/build_check/ClickHouse
|
|
TEMP_PATH=${{runner.temp}}/build_check
|
|
EOF
|
|
echo "COVERITY_TOKEN=${{ secrets.COVERITY_TOKEN }}" >> "$GITHUB_ENV"
|
|
- name: Download changed images
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: changed_images
|
|
path: ${{ env.IMAGES_PATH }}
|
|
- name: Clear repository
|
|
run: |
|
|
sudo rm -fr "$GITHUB_WORKSPACE" && mkdir "$GITHUB_WORKSPACE"
|
|
- name: Check out repository code
|
|
id: coverity-checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0 # otherwise we will have no info about contributors
|
|
- name: Build
|
|
run: |
|
|
git -C "$GITHUB_WORKSPACE" submodule sync
|
|
git -C "$GITHUB_WORKSPACE" submodule update --depth=1 --init --jobs=10
|
|
sudo rm -fr "$TEMP_PATH"
|
|
mkdir -p "$TEMP_PATH"
|
|
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
|
cd "$REPO_COPY/tests/ci" && python3 build_check.py "$BUILD_NAME"
|
|
- name: Upload Coverity Analysis
|
|
if: ${{ success() || failure() }}
|
|
run: |
|
|
curl --form token="${COVERITY_TOKEN}" \
|
|
--form email='security+coverity@clickhouse.com' \
|
|
--form file="@$TEMP_PATH/$BUILD_NAME/coverity-scan.tgz" \
|
|
--form version="${GITHUB_REF#refs/heads/}-${GITHUB_SHA::6}" \
|
|
--form description="Nighly Scan: $(date +'%Y-%m-%dT%H:%M:%S')" \
|
|
https://scan.coverity.com/builds?project=ClickHouse%2FClickHouse
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
docker ps --quiet | xargs --no-run-if-empty docker kill ||:
|
|
docker ps --all --quiet | xargs --no-run-if-empty docker rm -f ||:
|
|
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|