From 2f68a61329d4a2f9f93e7c8b9afdffa42e28a4cc Mon Sep 17 00:00:00 2001 From: Ratan Kaliani Date: Wed, 20 Nov 2024 12:50:31 -0800 Subject: [PATCH 1/4] fix: docker rate limit --- .github/actions/setup/action.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index d928b91df6..4174fc3168 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -8,11 +8,11 @@ inputs: setup_gcc: description: "Whether to setup GCC or not" required: false - default: 'true' + default: "true" setup_aws_cli: description: "Whether to install AWS CLI or not" required: false - default: 'true' + default: "true" runs: using: "composite" steps: @@ -51,7 +51,7 @@ runs: - uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: "3.10" - name: Install AWS CLI v2 if: inputs.setup_aws_cli == 'true' @@ -101,6 +101,13 @@ runs: else echo "pkg-config and libssl-dev are already installed." fi - + - name: Set up Docker uses: docker/setup-buildx-action@v3 + + - name: Log into registry ${{ env.REGISTRY }} + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} From 8fb781f196beab5c4879d533c5194e1a80557bf2 Mon Sep 17 00:00:00 2001 From: Ratan Kaliani Date: Wed, 20 Nov 2024 12:57:02 -0800 Subject: [PATCH 2/4] clean --- .github/workflows/book.yml | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml index d69cbf4bb1..572c645f01 100644 --- a/.github/workflows/book.yml +++ b/.github/workflows/book.yml @@ -13,29 +13,6 @@ on: merge_group: jobs: - # test: - # runs-on: ubuntu-latest - # name: test - # timeout-minutes: 60 - - # steps: - # - uses: actions/checkout@v4 - - # - name: Install mdbook - # run: | - # mkdir mdbook - # curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.14/mdbook-v0.4.14-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook - # echo $(pwd)/mdbook >> $GITHUB_PATH - - # - name: Install mdbook-template - # run: | - # mkdir mdbook-template - # curl -sSL https://github.com/sgoudham/mdbook-template/releases/latest/download/mdbook-template-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=./mdbook-template - # echo $(pwd)/mdbook-template >> $GITHUB_PATH - - # - name: Run tests - # run: mdbook test - lint: runs-on: ubuntu-latest name: lint From 8992f15a991187fa4da0e358f592d562e9a73db9 Mon Sep 17 00:00:00 2001 From: nhtyy Date: Tue, 26 Nov 2024 15:13:03 -0800 Subject: [PATCH 3/4] maybe-fix: inherit secrets --- .github/workflows/pr.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index cd4b03bc2e..9637b8bb4f 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -20,6 +20,7 @@ concurrency: jobs: test-x86: name: Test (x86-64) + secrets: inherit runs-on: [ runs-on, @@ -64,6 +65,7 @@ jobs: test-arm: name: Test (ARM) + secrets: inherit runs-on: [ runs-on, @@ -108,6 +110,7 @@ jobs: lint: name: Formatting & Clippy + secrets: inherit runs-on: [runs-on, runner=16cpu-linux-x64, "run-id=${{ github.run_id }}"] env: CARGO_NET_GIT_FETCH_WITH_CLI: "true" @@ -151,6 +154,7 @@ jobs: check: name: Cargo Check + secrets: inherit runs-on: [runs-on, runner=16cpu-linux-x64, disk=medium, "run-id=${{ github.run_id }}"] env: CARGO_NET_GIT_FETCH_WITH_CLI: "true" @@ -188,6 +192,7 @@ jobs: examples: name: Examples + secrets: inherit runs-on: [ runs-on, @@ -229,6 +234,7 @@ jobs: cli: name: CLI + secrets: inherit runs-on: [runs-on, runner=8cpu-linux-x64, disk=large, "run-id=${{ github.run_id }}"] env: CARGO_NET_GIT_FETCH_WITH_CLI: "true" @@ -263,6 +269,7 @@ jobs: performance: name: Performance + secrets: inherit runs-on: [runs-on, family=c7a.48xlarge, "run-id=${{ github.run_id }}"] env: CARGO_NET_GIT_FETCH_WITH_CLI: "true" @@ -451,6 +458,7 @@ jobs: lock-files: name: "Check lock files" + secrets: inherit runs-on: [ runs-on, From 6151e2bb0ce43ea86abe5b9848e04eb7893c1245 Mon Sep 17 00:00:00 2001 From: nhtyy Date: Tue, 26 Nov 2024 15:28:15 -0800 Subject: [PATCH 4/4] try with input --- .github/actions/setup/action.yml | 5 +++- .github/workflows/pr.yml | 43 ++++++++++++++++++++------------ 2 files changed, 31 insertions(+), 17 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 4174fc3168..87008615e9 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -13,6 +13,9 @@ inputs: description: "Whether to install AWS CLI or not" required: false default: "true" + gh_token: + description: 'The Github token to use for the action' + required: true runs: using: "composite" steps: @@ -110,4 +113,4 @@ runs: with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + password: ${{ inputs.gh_token }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 9637b8bb4f..33d3ded61e 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -20,7 +20,6 @@ concurrency: jobs: test-x86: name: Test (x86-64) - secrets: inherit runs-on: [ runs-on, @@ -37,12 +36,14 @@ jobs: - name: Setup CI uses: ./.github/actions/setup + with: + gh_token: ${{ secrets.GITHUB_TOKEN }} - name: Install SP1 toolchain from repo run: | cargo run -p sp1-cli -- prove install-toolchain cd crates/cli - cargo install --locked --path . + cargo install --force --locked --path . cargo clean - name: Run cargo check @@ -65,7 +66,6 @@ jobs: test-arm: name: Test (ARM) - secrets: inherit runs-on: [ runs-on, @@ -82,12 +82,15 @@ jobs: - name: Setup CI uses: ./.github/actions/setup + with: + gh_token: ${{ secrets.GITHUB_TOKEN }} + - name: Install SP1 toolchain from repo run: | cargo run -p sp1-cli -- prove install-toolchain cd crates/cli - cargo install --locked --path . + cargo install --force --locked --path . cargo clean - name: Run cargo check @@ -110,7 +113,6 @@ jobs: lint: name: Formatting & Clippy - secrets: inherit runs-on: [runs-on, runner=16cpu-linux-x64, "run-id=${{ github.run_id }}"] env: CARGO_NET_GIT_FETCH_WITH_CLI: "true" @@ -120,12 +122,14 @@ jobs: - name: Setup CI uses: ./.github/actions/setup + with: + gh_token: ${{ secrets.GITHUB_TOKEN }} - name: Install SP1 toolchain from repo run: | cargo run -p sp1-cli -- prove install-toolchain cd crates/cli - cargo install --locked --path . + cargo install --force --locked --path . cargo clean - name: Run cargo fmt @@ -154,7 +158,6 @@ jobs: check: name: Cargo Check - secrets: inherit runs-on: [runs-on, runner=16cpu-linux-x64, disk=medium, "run-id=${{ github.run_id }}"] env: CARGO_NET_GIT_FETCH_WITH_CLI: "true" @@ -164,12 +167,14 @@ jobs: - name: Setup CI uses: ./.github/actions/setup + with: + gh_token: ${{ secrets.GITHUB_TOKEN }} - name: Install SP1 toolchain from repo run: | cargo run -p sp1-cli -- prove install-toolchain cd crates/cli - cargo install --locked --path . + cargo install --force --locked --path . cargo clean - name: Check workspace no features @@ -192,7 +197,6 @@ jobs: examples: name: Examples - secrets: inherit runs-on: [ runs-on, @@ -209,12 +213,14 @@ jobs: - name: Setup CI uses: ./.github/actions/setup + with: + gh_token: ${{ secrets.GITHUB_TOKEN }} - name: Install SP1 toolchain from repo run: | cargo run -p sp1-cli -- prove install-toolchain cd crates/cli - cargo install --locked --path . + cargo install --force --locked --path . cargo clean - name: Run cargo fmt @@ -234,7 +240,6 @@ jobs: cli: name: CLI - secrets: inherit runs-on: [runs-on, runner=8cpu-linux-x64, disk=large, "run-id=${{ github.run_id }}"] env: CARGO_NET_GIT_FETCH_WITH_CLI: "true" @@ -244,12 +249,14 @@ jobs: - name: Setup CI uses: ./.github/actions/setup + with: + gh_token: ${{ secrets.GITHUB_TOKEN }} - name: Install SP1 toolchain from repo run: | cargo run -p sp1-cli -- prove install-toolchain cd crates/cli - cargo install --locked --path . + cargo install --force --locked --path . cargo clean - name: Run cargo prove new @@ -269,7 +276,6 @@ jobs: performance: name: Performance - secrets: inherit runs-on: [runs-on, family=c7a.48xlarge, "run-id=${{ github.run_id }}"] env: CARGO_NET_GIT_FETCH_WITH_CLI: "true" @@ -279,12 +285,14 @@ jobs: - name: Setup CI uses: ./.github/actions/setup + with: + gh_token: ${{ secrets.GITHUB_TOKEN }} - name: Install SP1 toolchain from repo run: | cargo run -p sp1-cli -- prove install-toolchain cd crates/cli - cargo install --locked --path . + cargo install --force --locked --path . cargo clean - name: Run Evaluation @@ -326,12 +334,14 @@ jobs: - name: Setup CI uses: ./.github/actions/setup + with: + gh_token: ${{ secrets.GITHUB_TOKEN }} - name: Install SP1 toolchain from repo run: | cargo run -p sp1-cli -- prove install-toolchain cd crates/cli - cargo install --locked --path . + cargo install --force --locked --path . cargo clean - name: Run tendermint script @@ -458,7 +468,6 @@ jobs: lock-files: name: "Check lock files" - secrets: inherit runs-on: [ runs-on, @@ -478,6 +487,8 @@ jobs: - name: Setup CI uses: ./.github/actions/setup + with: + gh_token: ${{ secrets.GITHUB_TOKEN }} - name: "Remove lock files" run: |