Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(IDX): use dind runners #182

Merged
merged 17 commits into from
Jun 5, 2024
24 changes: 20 additions & 4 deletions .github/workflows-source/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@ env:
anchors:
image: &image
image: ghcr.io/dfinity/ic-build@sha256:eb85228ebf7511e2589f86788345eb3d1c8144914a8a2fa771d4347ddacac413
dind-small-setup: &dind-small-setup
runs-on:
labels: dind-runner-small
container:
<<: *image
timeout-minutes: 30
if: ${{ vars.RUN_CI == 'true' }}
dind-large-setup: &dind-large-setup
runs-on:
labels: dind-runner-large
container:
<<: *image
timeout-minutes: 60
if: ${{ vars.RUN_CI == 'true' }}
bazel-large-setup: &bazel-large-setup
runs-on:
labels: bazel-runner-large
Expand Down Expand Up @@ -79,12 +93,14 @@ anchors:
run: |
git config --global http.postBuffer 524288000
git config --global safe.directory '*'
if [ -e /__w/cache ]; then sudo ln -s /__w/cache /; fi
if [ -n "${NODE_NAME:-}" ]; then echo "Node: $NODE_NAME"; fi
checkout: &checkout
name: Checkout
uses: actions/checkout@v4
cargo-filters: &cargo-filters
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
name: Filter Rust Files [*.{rs,toml,lock}]
id: filter
with:
filters: |
Expand Down Expand Up @@ -208,7 +224,7 @@ jobs:

bazel-build-fuzzers:
name: Bazel Build Fuzzers
<<: *bazel-small-setup
<<: *dind-large-setup
steps:
- <<: *before-script
- <<: *checkout
Expand All @@ -224,7 +240,7 @@ jobs:

bazel-build-fuzzers-afl:
name: Bazel Build Fuzzers AFL
<<: *bazel-small-setup
<<: *dind-large-setup
steps:
- <<: *before-script
- <<: *checkout
Expand Down Expand Up @@ -352,7 +368,7 @@ jobs:

cargo-clippy-linux:
name: Cargo Clippy Linux
<<: *bazel-small-setup
<<: *dind-large-setup
steps:
- <<: *before-script
- <<: *checkout
Expand All @@ -371,7 +387,7 @@ jobs:

cargo-build-release-linux:
name: Cargo Build Release Linux
<<: *bazel-small-setup
<<: *dind-large-setup
timeout-minutes: 60
steps:
- <<: *before-script
Expand Down
26 changes: 22 additions & 4 deletions .github/workflows-source/ci-pr-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,20 @@ env:
anchors:
image: &image
image: ghcr.io/dfinity/ic-build@sha256:eb85228ebf7511e2589f86788345eb3d1c8144914a8a2fa771d4347ddacac413
dind-small-setup: &dind-small-setup
runs-on:
labels: dind-runner-small
container:
<<: *image
timeout-minutes: 30
if: ${{ vars.RUN_CI == 'true' }}
dind-large-setup: &dind-large-setup
runs-on:
labels: dind-runner-large
container:
<<: *image
timeout-minutes: 60
if: ${{ vars.RUN_CI == 'true' }}
bazel-small-setup: &bazel-small-setup
runs-on:
labels: bazel-runner-small
Expand All @@ -41,6 +55,9 @@ anchors:
id: before-script
shell: bash
run: |
git config --global http.postBuffer 524288000
git config --global safe.directory '*'
if [ -e /__w/cache ]; then sudo ln -s /__w/cache /; fi
if [ -n "${NODE_NAME:-}" ]; then echo "Node: $NODE_NAME"; fi
bazel-clean: &bazel-clean
name: Bazel Clean
Expand All @@ -50,12 +67,12 @@ anchors:
jobs:
bazel-build-fuzzers-archives:
name: Bazel Build Fuzzers Archives
<<: *bazel-small-setup
timeout-minutes: 60
<<: *dind-large-setup
steps:
- <<: *before-script
- <<: *checkout
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
name: Filter Relevant Files
id: filter
with:
filters: |
Expand All @@ -78,11 +95,12 @@ jobs:

lock-generate:
name: Lock Generate
<<: *bazel-small-setup
<<: *dind-small-setup
steps:
- <<: *before-script
- <<: *checkout
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
name: Filter Relevant Files
id: filter
with:
filters: |
Expand Down Expand Up @@ -115,7 +133,7 @@ jobs:

pre-commit:
name: Pre Commit Test
<<: *bazel-small-setup
<<: *dind-small-setup
steps:
- <<: *before-script
- <<: *checkout
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows-source/schedule-hourly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ anchors:
id: before-script
shell: bash
run: |
git config --global http.postBuffer 524288000
git config --global safe.directory '*'
if [ -e /__w/cache ]; then sudo ln -s /__w/cache /; fi
if [ -n "${NODE_NAME:-}" ]; then echo "Node: $NODE_NAME"; fi
bazel-clean: &bazel-clean
name: Bazel Clean
Expand Down
26 changes: 19 additions & 7 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
run: |
git config --global http.postBuffer 524288000
git config --global safe.directory '*'
if [ -e /__w/cache ]; then sudo ln -s /__w/cache /; fi
if [ -n "${NODE_NAME:-}" ]; then echo "Node: $NODE_NAME"; fi
- name: Checkout
uses: actions/checkout@v3 # v4 does not work with bazel-runner-large
Expand Down Expand Up @@ -105,6 +106,7 @@ jobs:
run: |
git config --global http.postBuffer 524288000
git config --global safe.directory '*'
if [ -e /__w/cache ]; then sudo ln -s /__w/cache /; fi
if [ -n "${NODE_NAME:-}" ]; then echo "Node: $NODE_NAME"; fi
- name: Checkout
uses: actions/checkout@v3 # v4 does not work with bazel-runner-large
Expand Down Expand Up @@ -148,6 +150,7 @@ jobs:
run: |
git config --global http.postBuffer 524288000
git config --global safe.directory '*'
if [ -e /__w/cache ]; then sudo ln -s /__w/cache /; fi
if [ -n "${NODE_NAME:-}" ]; then echo "Node: $NODE_NAME"; fi
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -194,10 +197,10 @@ jobs:
bazel-build-fuzzers:
name: Bazel Build Fuzzers
runs-on:
labels: bazel-runner-small
labels: dind-runner-large
container:
image: ghcr.io/dfinity/ic-build@sha256:eb85228ebf7511e2589f86788345eb3d1c8144914a8a2fa771d4347ddacac413
timeout-minutes: 45
timeout-minutes: 60
if: ${{ vars.RUN_CI == 'true' }}
steps:
- name: Before script
Expand All @@ -207,6 +210,7 @@ jobs:
run: |
git config --global http.postBuffer 524288000
git config --global safe.directory '*'
if [ -e /__w/cache ]; then sudo ln -s /__w/cache /; fi
if [ -n "${NODE_NAME:-}" ]; then echo "Node: $NODE_NAME"; fi
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -224,10 +228,10 @@ jobs:
bazel-build-fuzzers-afl:
name: Bazel Build Fuzzers AFL
runs-on:
labels: bazel-runner-small
labels: dind-runner-large
container:
image: ghcr.io/dfinity/ic-build@sha256:eb85228ebf7511e2589f86788345eb3d1c8144914a8a2fa771d4347ddacac413
timeout-minutes: 45
timeout-minutes: 60
if: ${{ vars.RUN_CI == 'true' }}
steps:
- name: Before script
Expand All @@ -237,6 +241,7 @@ jobs:
run: |
git config --global http.postBuffer 524288000
git config --global safe.directory '*'
if [ -e /__w/cache ]; then sudo ln -s /__w/cache /; fi
if [ -n "${NODE_NAME:-}" ]; then echo "Node: $NODE_NAME"; fi
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -264,6 +269,7 @@ jobs:
run: |
git config --global http.postBuffer 524288000
git config --global safe.directory '*'
if [ -e /__w/cache ]; then sudo ln -s /__w/cache /; fi
if [ -n "${NODE_NAME:-}" ]; then echo "Node: $NODE_NAME"; fi
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -298,6 +304,7 @@ jobs:
run: |
git config --global http.postBuffer 524288000
git config --global safe.directory '*'
if [ -e /__w/cache ]; then sudo ln -s /__w/cache /; fi
if [ -n "${NODE_NAME:-}" ]; then echo "Node: $NODE_NAME"; fi
- name: Checkout
uses: actions/checkout@v3 # v4 does not work with bazel-runner-large
Expand Down Expand Up @@ -374,6 +381,7 @@ jobs:
run: |
git config --global http.postBuffer 524288000
git config --global safe.directory '*'
if [ -e /__w/cache ]; then sudo ln -s /__w/cache /; fi
if [ -n "${NODE_NAME:-}" ]; then echo "Node: $NODE_NAME"; fi
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -400,10 +408,10 @@ jobs:
cargo-clippy-linux:
name: Cargo Clippy Linux
runs-on:
labels: bazel-runner-small
labels: dind-runner-large
container:
image: ghcr.io/dfinity/ic-build@sha256:eb85228ebf7511e2589f86788345eb3d1c8144914a8a2fa771d4347ddacac413
timeout-minutes: 45
timeout-minutes: 60
if: ${{ vars.RUN_CI == 'true' }}
steps:
- name: Before script
Expand All @@ -413,10 +421,12 @@ jobs:
run: |
git config --global http.postBuffer 524288000
git config --global safe.directory '*'
if [ -e /__w/cache ]; then sudo ln -s /__w/cache /; fi
if [ -n "${NODE_NAME:-}" ]; then echo "Node: $NODE_NAME"; fi
- name: Checkout
uses: actions/checkout@v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
name: Filter Rust Files [*.{rs,toml,lock}]
id: filter
with:
filters: |
Expand All @@ -438,7 +448,7 @@ jobs:
cargo-build-release-linux:
name: Cargo Build Release Linux
runs-on:
labels: bazel-runner-small
labels: dind-runner-large
container:
image: ghcr.io/dfinity/ic-build@sha256:eb85228ebf7511e2589f86788345eb3d1c8144914a8a2fa771d4347ddacac413
if: ${{ vars.RUN_CI == 'true' }}
Expand All @@ -451,10 +461,12 @@ jobs:
run: |
git config --global http.postBuffer 524288000
git config --global safe.directory '*'
if [ -e /__w/cache ]; then sudo ln -s /__w/cache /; fi
if [ -n "${NODE_NAME:-}" ]; then echo "Node: $NODE_NAME"; fi
- name: Checkout
uses: actions/checkout@v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
name: Filter Rust Files [*.{rs,toml,lock}]
id: filter
with:
filters: |
Expand Down
22 changes: 18 additions & 4 deletions .github/workflows/ci-pr-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,25 @@ jobs:
bazel-build-fuzzers-archives:
name: Bazel Build Fuzzers Archives
runs-on:
labels: bazel-runner-small
labels: dind-runner-large
container:
image: ghcr.io/dfinity/ic-build@sha256:eb85228ebf7511e2589f86788345eb3d1c8144914a8a2fa771d4347ddacac413
if: ${{ vars.RUN_CI == 'true' }}
timeout-minutes: 60
if: ${{ vars.RUN_CI == 'true' }}
steps:
- name: Before script
if: always()
id: before-script
shell: bash
run: |
git config --global http.postBuffer 524288000
git config --global safe.directory '*'
if [ -e /__w/cache ]; then sudo ln -s /__w/cache /; fi
if [ -n "${NODE_NAME:-}" ]; then echo "Node: $NODE_NAME"; fi
- name: Checkout
uses: actions/checkout@v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
name: Filter Relevant Files
id: filter
with:
filters: |
Expand All @@ -55,7 +59,7 @@ jobs:
lock-generate:
name: Lock Generate
runs-on:
labels: bazel-runner-small
labels: dind-runner-small
container:
image: ghcr.io/dfinity/ic-build@sha256:eb85228ebf7511e2589f86788345eb3d1c8144914a8a2fa771d4347ddacac413
timeout-minutes: 30
Expand All @@ -66,10 +70,14 @@ jobs:
id: before-script
shell: bash
run: |
git config --global http.postBuffer 524288000
git config --global safe.directory '*'
if [ -e /__w/cache ]; then sudo ln -s /__w/cache /; fi
if [ -n "${NODE_NAME:-}" ]; then echo "Node: $NODE_NAME"; fi
- name: Checkout
uses: actions/checkout@v4
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
name: Filter Relevant Files
id: filter
with:
filters: |
Expand Down Expand Up @@ -103,6 +111,9 @@ jobs:
id: before-script
shell: bash
run: |
git config --global http.postBuffer 524288000
git config --global safe.directory '*'
if [ -e /__w/cache ]; then sudo ln -s /__w/cache /; fi
if [ -n "${NODE_NAME:-}" ]; then echo "Node: $NODE_NAME"; fi
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -112,7 +123,7 @@ jobs:
pre-commit:
name: Pre Commit Test
runs-on:
labels: bazel-runner-small
labels: dind-runner-small
container:
image: ghcr.io/dfinity/ic-build@sha256:eb85228ebf7511e2589f86788345eb3d1c8144914a8a2fa771d4347ddacac413
timeout-minutes: 30
Expand All @@ -123,6 +134,9 @@ jobs:
id: before-script
shell: bash
run: |
git config --global http.postBuffer 524288000
git config --global safe.directory '*'
if [ -e /__w/cache ]; then sudo ln -s /__w/cache /; fi
if [ -n "${NODE_NAME:-}" ]; then echo "Node: $NODE_NAME"; fi
- name: Checkout
uses: actions/checkout@v4
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/schedule-hourly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
id: before-script
shell: bash
run: |
git config --global http.postBuffer 524288000
git config --global safe.directory '*'
if [ -e /__w/cache ]; then sudo ln -s /__w/cache /; fi
if [ -n "${NODE_NAME:-}" ]; then echo "Node: $NODE_NAME"; fi
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -69,6 +72,9 @@ jobs:
id: before-script
shell: bash
run: |
git config --global http.postBuffer 524288000
git config --global safe.directory '*'
if [ -e /__w/cache ]; then sudo ln -s /__w/cache /; fi
if [ -n "${NODE_NAME:-}" ]; then echo "Node: $NODE_NAME"; fi
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -98,6 +104,9 @@ jobs:
id: before-script
shell: bash
run: |
git config --global http.postBuffer 524288000
git config --global safe.directory '*'
if [ -e /__w/cache ]; then sudo ln -s /__w/cache /; fi
if [ -n "${NODE_NAME:-}" ]; then echo "Node: $NODE_NAME"; fi
- name: Checkout
uses: actions/checkout@v3
Expand Down
Loading