-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(IDX): update daily workflow (#254)
Adding `system-tests-benchmarks-nightly`. DRY related changes. --------- Co-authored-by: Carly Gundy <[email protected]> Co-authored-by: Bas van Dijk <[email protected]> Co-authored-by: IDX GitHub Automation <IDX GitHub Automation>
- Loading branch information
1 parent
e13ab85
commit 28eb5e6
Showing
2 changed files
with
220 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,158 @@ | ||
name: Schedule Daily | ||
|
||
on: | ||
schedule: | ||
- cron: "0 1 * * *" | ||
workflow_dispatch: | ||
|
||
env: | ||
AWS_SHARED_CREDENTIALS_CONTENT: ${{ secrets.AWS_SHARED_CREDENTIALS_FILE }} | ||
BAZEL_STARTUP_ARGS: "--output_base=/var/tmp/bazel-output/" | ||
CI_COMMIT_SHA: ${{ github.sha }} | ||
CI_COMMIT_REF_PROTECTED: ${{ github.ref_protected }} | ||
CI_JOB_NAME: ${{ github.job }} | ||
CI_JOB_ID: ${{ github.job }} # github does not expose this variable https://github.com/orgs/community/discussions/8945 | ||
CI_JOB_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
CI_PIPELINE_SOURCE: ${{ github.event_name }} | ||
CI_PROJECT_DIR: ${{ github.workspace }} | ||
CI_MERGE_REQUEST_TARGET_BRANCH_NAME: ${{ github.event.pull_request.base.ref }} | ||
ROOT_PIPELINE_ID: ${{ github.run_id }} | ||
DOCKER_HUB_USER: ${{ secrets.DOCKER_HUB_USER }} | ||
DOCKER_HUB_PASSWORD_RO: ${{ secrets.DOCKER_HUB_PASSWORD_RO }} | ||
BUILDEVENT_APIKEY: ${{ secrets.HONEYCOMB_API_TOKEN }} | ||
BUILDEVENT_DATASET: "github-ci-dfinity" | ||
|
||
anchors: | ||
image: &image | ||
image: ghcr.io/dfinity/ic-build@sha256:5bd0f059ad6e21966e9c644516b6ecd52d5ed44f1b18a76b91b59740a9d639a2 | ||
dind-large-setup: &dind-large-setup | ||
runs-on: | ||
group: dind-large | ||
container: | ||
<<: *image | ||
timeout-minutes: 120 | ||
if: ${{ vars.RUN_CI == 'true' }} | ||
checkout: &checkout | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
before-script: &before-script | ||
name: Before script | ||
id: before-script | ||
shell: bash | ||
run: ./gitlab-ci/src/ci-scripts/before-script.sh | ||
|
||
jobs: | ||
|
||
cut-release-candidate: | ||
name: Cut RC | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
token: ${{ secrets.IDX_PUSH_TO_PR }} | ||
- name: Cut Release Candidate | ||
shell: bash | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "IDX GitLab Automation" | ||
RC_BRANCH_NAME="rc--$(date '+%Y-%m-%d_%H-%M')--github" | ||
git switch --force-create "$RC_BRANCH_NAME" HEAD | ||
git push --force --set-upstream origin "$RC_BRANCH_NAME" | ||
rust-benchmarks: | ||
name: Bazel Run Rust Benchmarks | ||
<<: *dind-large-setup | ||
timeout-minutes: 720 # 12 hours | ||
# TODO: disable in GitLab before enabling here | ||
if: ${{ vars.RUN_CI == 'true' && false }} | ||
strategy: | ||
matrix: | ||
targets: ["//rs/crypto/...", "//rs/state_manager/..."] | ||
steps: | ||
- <<: *checkout | ||
- <<: *before-script | ||
- name: Run Rust Benchmarks | ||
id: rust-benchmarks | ||
shell: bash | ||
run: | | ||
./gitlab-ci/src/ci-scripts/rust-benchmarks.sh | ||
env: | ||
BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel" | ||
BAZEL_COMMAND: "run" | ||
BAZEL_STARTUP_ARGS: "--output_base=/var/tmp/bazel-output/" | ||
RUSTFLAGS: "--remap-path-prefix=${CI_PROJECT_DIR}=/ic" | ||
RUST_BACKTRACE: "full" | ||
TARGETS: ${{ matrix.targets }} | ||
|
||
bazel-test-bare-metal: | ||
name: Bazel Test Bare Metal | ||
<<: *dind-large-setup | ||
timeout-minutes: 120 | ||
# TODO: enable when zh1 is active again | ||
if: ${{ vars.RUN_CI == 'true' && false }} | ||
steps: | ||
- <<: *checkout | ||
- <<: *before-script | ||
- name: Run Bazel Launch Bare Metal | ||
shell: bash | ||
run: | | ||
echo "$ZH2_DLL01_CSV_SECRETS" > file1 | ||
echo "$ZH2_FILE_SHARE_KEY" > file2 && chmod 400 file2 | ||
# shellcheck disable=SC2046,SC2086 | ||
bazel ${BAZEL_STARTUP_ARGS} run ${BAZEL_CI_CONFIG} \ | ||
//ic-os/setupos/envs/dev:launch_bare_metal -- \ | ||
--config_path "$(realpath ./ic-os/dev-tools/bare_metal_deployment/zh2-dll01.yaml)" \ | ||
--csv_filename "$(realpath file1)" \ | ||
--file_share_ssh_key "$(realpath file2)" \ | ||
--file_share_username ci_interim \ | ||
--ci_mode | ||
bazel clean | ||
env: | ||
BAZEL_STARTUP_ARGS: "--output_base=/var/tmp/bazel-output/" | ||
BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel" | ||
ZH2_DLL01_CSV_SECRETS: "${{ secrets.ZH2_DLL01_CSV_SECRETS }}" | ||
ZH2_FILE_SHARE_KEY: "${{ secrets.ZH2_FILE_SHARE_KEY }}" | ||
|
||
nns-tests-nightly: | ||
name: Bazel Test NNS Nightly | ||
<<: *dind-large-setup | ||
timeout-minutes: 20 | ||
if: ${{ vars.RUN_CI == 'true' }} | ||
steps: | ||
- <<: *checkout | ||
- <<: *before-script | ||
- name: Run NNS Tests Nightly | ||
id: bazel-test-all | ||
uses: ./.github/actions/bazel-test-all/ | ||
with: | ||
BAZEL_COMMAND: "test" | ||
BAZEL_TARGETS: "//rs/nns/..." | ||
BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel" | ||
BAZEL_EXTRA_ARGS: "--keep_going --verbose_failures --test_tag_filters=nns_tests_nightly --test_env=SSH_AUTH_SOCK --test_env=NNS_CANISTER_UPGRADE_SEQUENCE=all" | ||
HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }} | ||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | ||
|
||
system-tests-benchmarks-nightly: | ||
name: Bazel System Test Benchmarks | ||
<<: *dind-large-setup | ||
timeout-minutes: 480 | ||
if: ${{ vars.RUN_CI == 'true' }} | ||
steps: | ||
- <<: *checkout | ||
- <<: *before-script | ||
- name: Test System Test Benchmarks | ||
id: bazel-system-test-benchmarks | ||
uses: ./.github/actions/bazel-test-all/ | ||
with: | ||
BAZEL_COMMAND: "test" | ||
BAZEL_TARGETS: "//..." | ||
BAZEL_CI_CONFIG: "--config=ci --repository_cache=/cache/bazel" | ||
# note: there's just one performance cluster, so the job can't be parallelized | ||
BAZEL_EXTRA_ARGS: "--test_tag_filters=system_test_benchmark --//bazel:enable_upload_perf_systest_results=True --keep_going --jobs 1" | ||
HONEYCOMB_API_TOKEN: ${{ secrets.HONEYCOMB_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters