From 5edad296b3a385bf96e730cabba516b20477ac0a Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Sat, 27 Apr 2024 00:08:58 -0700 Subject: [PATCH 01/19] ci: add cargo bloat --- .github/workflows/bloat.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/bloat.yml diff --git a/.github/workflows/bloat.yml b/.github/workflows/bloat.yml new file mode 100644 index 000000000000..14c2a10bb9e6 --- /dev/null +++ b/.github/workflows/bloat.yml @@ -0,0 +1,21 @@ +on: # rebuild any PRs and main branch changes + pull_request: + push: + branches: + - main + +name: bloat + +jobs: + cargo_bloat: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: Run cargo bloat + uses: orf/cargo-bloat-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} From ddd8fcbc6796ae425dd22fb38173808002d3d410 Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Sat, 27 Apr 2024 00:16:17 -0700 Subject: [PATCH 02/19] update --- .github/workflows/bloat.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bloat.yml b/.github/workflows/bloat.yml index 14c2a10bb9e6..d61c6bffae36 100644 --- a/.github/workflows/bloat.yml +++ b/.github/workflows/bloat.yml @@ -15,7 +15,10 @@ jobs: uses: actions-rs/toolchain@v1 with: toolchain: stable + + - run: bash ./ci/prepare_build_environment.sh + - name: Run cargo bloat uses: orf/cargo-bloat-action@v1 with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From e60cbedfe64bb56667637fbb70f5b9de281b39b6 Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Sat, 27 Apr 2024 00:30:08 -0700 Subject: [PATCH 03/19] update --- .github/workflows/bloat.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bloat.yml b/.github/workflows/bloat.yml index d61c6bffae36..d59eb59279e3 100644 --- a/.github/workflows/bloat.yml +++ b/.github/workflows/bloat.yml @@ -19,6 +19,6 @@ jobs: - run: bash ./ci/prepare_build_environment.sh - name: Run cargo bloat - uses: orf/cargo-bloat-action@v1 + uses: wsxiaoys/cargo-bloat-action@v1 with: token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From c2ca8f3fbb0c0ccd3c1954fb3fe1fe20187b6b2d Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Sat, 27 Apr 2024 00:30:52 -0700 Subject: [PATCH 04/19] update --- .github/workflows/bloat.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/bloat.yml b/.github/workflows/bloat.yml index d59eb59279e3..9c81779d6761 100644 --- a/.github/workflows/bloat.yml +++ b/.github/workflows/bloat.yml @@ -16,6 +16,22 @@ jobs: with: toolchain: stable + - name: Sccache cache + uses: mozilla-actions/sccache-action@v0.0.3 + with: + version: "v0.4.0" + + - name: Cargo registry cache + uses: actions/cache@v3 + with: + key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-${{ github.sha }} + restore-keys: | + cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}- + cargo-${{ runner.os }}- + path: | + ~/.cargo/registry + ~/.cargo/git + - run: bash ./ci/prepare_build_environment.sh - name: Run cargo bloat From a029a0d9d380c96d4e8ff339f8a3b21dd650be95 Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Sat, 27 Apr 2024 00:31:44 -0700 Subject: [PATCH 05/19] update --- .github/workflows/autofix-rust.yml | 6 +++--- .github/workflows/bloat.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/autofix-rust.yml b/.github/workflows/autofix-rust.yml index 1131ad193557..2a467adcf67d 100644 --- a/.github/workflows/autofix-rust.yml +++ b/.github/workflows/autofix-rust.yml @@ -48,10 +48,10 @@ jobs: - name: Cargo registry cache uses: actions/cache@v3 with: - key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-${{ github.sha }} + key: cargo-autofix-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-${{ github.sha }} restore-keys: | - cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}- - cargo-${{ runner.os }}- + cargo-autofix-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}- + cargo-autofix-${{ runner.os }}- path: | ~/.cargo/registry ~/.cargo/git diff --git a/.github/workflows/bloat.yml b/.github/workflows/bloat.yml index 9c81779d6761..41228408c0b6 100644 --- a/.github/workflows/bloat.yml +++ b/.github/workflows/bloat.yml @@ -24,10 +24,10 @@ jobs: - name: Cargo registry cache uses: actions/cache@v3 with: - key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-${{ github.sha }} + key: cargo-bloat-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-${{ github.sha }} restore-keys: | - cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}- - cargo-${{ runner.os }}- + cargo-bloat-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}- + cargo-bloat-${{ runner.os }}- path: | ~/.cargo/registry ~/.cargo/git From 3bede58059ff5ffba1438089fe9f36a3a13a8932 Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Sat, 27 Apr 2024 00:32:03 -0700 Subject: [PATCH 06/19] update --- .github/workflows/autofix-rust.yml | 6 +++--- .github/workflows/bloat.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/autofix-rust.yml b/.github/workflows/autofix-rust.yml index 2a467adcf67d..1131ad193557 100644 --- a/.github/workflows/autofix-rust.yml +++ b/.github/workflows/autofix-rust.yml @@ -48,10 +48,10 @@ jobs: - name: Cargo registry cache uses: actions/cache@v3 with: - key: cargo-autofix-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-${{ github.sha }} + key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-${{ github.sha }} restore-keys: | - cargo-autofix-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}- - cargo-autofix-${{ runner.os }}- + cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}- + cargo-${{ runner.os }}- path: | ~/.cargo/registry ~/.cargo/git diff --git a/.github/workflows/bloat.yml b/.github/workflows/bloat.yml index 41228408c0b6..9c81779d6761 100644 --- a/.github/workflows/bloat.yml +++ b/.github/workflows/bloat.yml @@ -24,10 +24,10 @@ jobs: - name: Cargo registry cache uses: actions/cache@v3 with: - key: cargo-bloat-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-${{ github.sha }} + key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-${{ github.sha }} restore-keys: | - cargo-bloat-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}- - cargo-bloat-${{ runner.os }}- + cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}- + cargo-${{ runner.os }}- path: | ~/.cargo/registry ~/.cargo/git From e8080f48d1f2974c79b654908e2682c2162a20d1 Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Sat, 27 Apr 2024 00:32:50 -0700 Subject: [PATCH 07/19] update --- .github/workflows/bloat.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bloat.yml b/.github/workflows/bloat.yml index 9c81779d6761..dca12c391f45 100644 --- a/.github/workflows/bloat.yml +++ b/.github/workflows/bloat.yml @@ -35,6 +35,6 @@ jobs: - run: bash ./ci/prepare_build_environment.sh - name: Run cargo bloat - uses: wsxiaoys/cargo-bloat-action@v1 + uses: wsxiaoys/cargo-bloat-action@latest with: token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 6fe3e4d4b327b91707dda226471ea6874e9bc590 Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Sat, 27 Apr 2024 00:33:40 -0700 Subject: [PATCH 08/19] update --- .github/workflows/bloat.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bloat.yml b/.github/workflows/bloat.yml index dca12c391f45..83a304dbdb24 100644 --- a/.github/workflows/bloat.yml +++ b/.github/workflows/bloat.yml @@ -35,6 +35,6 @@ jobs: - run: bash ./ci/prepare_build_environment.sh - name: Run cargo bloat - uses: wsxiaoys/cargo-bloat-action@latest + uses: wsxiaoys/cargo-bloat-action@master with: token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From cc54a275b557a0954b3c0d7453e44c12b8e19f62 Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Sat, 27 Apr 2024 00:37:59 -0700 Subject: [PATCH 09/19] enable sccache --- .github/workflows/autofix-rust.yml | 5 +++++ .github/workflows/bloat.yml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/autofix-rust.yml b/.github/workflows/autofix-rust.yml index 1131ad193557..faa74c5a5fbd 100644 --- a/.github/workflows/autofix-rust.yml +++ b/.github/workflows/autofix-rust.yml @@ -22,6 +22,11 @@ concurrency: jobs: autofix: + env: + CARGO_TERM_COLOR: always + SCCACHE_GHA_ENABLED: true + RUSTC_WRAPPER: sccache + CARGO_INCREMENTAL: 0 runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/bloat.yml b/.github/workflows/bloat.yml index 83a304dbdb24..002e9bc9436d 100644 --- a/.github/workflows/bloat.yml +++ b/.github/workflows/bloat.yml @@ -8,6 +8,11 @@ name: bloat jobs: cargo_bloat: + env: + CARGO_TERM_COLOR: always + SCCACHE_GHA_ENABLED: true + RUSTC_WRAPPER: sccache + CARGO_INCREMENTAL: 0 runs-on: ubuntu-latest steps: - uses: actions/checkout@master From 39100bfee6b47cbc52ab4911f596a259797aeb16 Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Sat, 27 Apr 2024 00:38:26 -0700 Subject: [PATCH 10/19] update --- .github/workflows/bloat.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/bloat.yml b/.github/workflows/bloat.yml index 002e9bc9436d..048ca1a44d15 100644 --- a/.github/workflows/bloat.yml +++ b/.github/workflows/bloat.yml @@ -6,6 +6,12 @@ on: # rebuild any PRs and main branch changes name: bloat +concurrency: + group: ${{ github.workflow_ref }}-${{ github.head_ref || github.ref_name }} + + # If this is enabled it will cancel current running and start latest + cancel-in-progress: true + jobs: cargo_bloat: env: From 8a79d86d003552450a8fb028cfce92fea66ea606 Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Sat, 27 Apr 2024 00:41:31 -0700 Subject: [PATCH 11/19] update --- .github/workflows/bloat.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bloat.yml b/.github/workflows/bloat.yml index 048ca1a44d15..aa5df8bdeaae 100644 --- a/.github/workflows/bloat.yml +++ b/.github/workflows/bloat.yml @@ -46,6 +46,6 @@ jobs: - run: bash ./ci/prepare_build_environment.sh - name: Run cargo bloat - uses: wsxiaoys/cargo-bloat-action@master + uses: wsxiaoys/cargo-bloat-action@6b999cf68b041c266e674d3446acf24d195fd4d4 with: token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From acee247494750c13f442bc608ac375c4ec2d0ad4 Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Sat, 27 Apr 2024 00:43:32 -0700 Subject: [PATCH 12/19] update --- .github/workflows/autofix-rust.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/autofix-rust.yml b/.github/workflows/autofix-rust.yml index faa74c5a5fbd..b38f6ed6d2b0 100644 --- a/.github/workflows/autofix-rust.yml +++ b/.github/workflows/autofix-rust.yml @@ -39,17 +39,17 @@ jobs: toolchain: nightly components: rustfmt, clippy + - name: Sccache cache + uses: mozilla-actions/sccache-action@v0.0.3 + with: + version: "v0.4.0" + - name: Install cargo-machete uses: actions-rs/cargo@v1 with: command: install args: cargo-machete - - name: Sccache cache - uses: mozilla-actions/sccache-action@v0.0.3 - with: - version: "v0.4.0" - - name: Cargo registry cache uses: actions/cache@v3 with: From 3845917983bdf3ee665c4ded09ddcf5e6a415df7 Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Sat, 27 Apr 2024 00:45:54 -0700 Subject: [PATCH 13/19] update --- .github/workflows/bloat.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bloat.yml b/.github/workflows/bloat.yml index aa5df8bdeaae..048ca1a44d15 100644 --- a/.github/workflows/bloat.yml +++ b/.github/workflows/bloat.yml @@ -46,6 +46,6 @@ jobs: - run: bash ./ci/prepare_build_environment.sh - name: Run cargo bloat - uses: wsxiaoys/cargo-bloat-action@6b999cf68b041c266e674d3446acf24d195fd4d4 + uses: wsxiaoys/cargo-bloat-action@master with: token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From a7054b41fd1bbd5a67e793b67d0e99a65a42d584 Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Sat, 27 Apr 2024 00:48:34 -0700 Subject: [PATCH 14/19] update --- .github/workflows/bloat.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bloat.yml b/.github/workflows/bloat.yml index 048ca1a44d15..811c76435bfb 100644 --- a/.github/workflows/bloat.yml +++ b/.github/workflows/bloat.yml @@ -46,6 +46,6 @@ jobs: - run: bash ./ci/prepare_build_environment.sh - name: Run cargo bloat - uses: wsxiaoys/cargo-bloat-action@master + uses: wsxiaoys/cargo-bloat-action@d84b3fd with: token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 11b14a6565edd2716d7ec57f88f8bf57c9aed488 Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Sat, 27 Apr 2024 00:50:27 -0700 Subject: [PATCH 15/19] update --- .github/workflows/bloat.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bloat.yml b/.github/workflows/bloat.yml index 811c76435bfb..0cd4b157671a 100644 --- a/.github/workflows/bloat.yml +++ b/.github/workflows/bloat.yml @@ -46,6 +46,6 @@ jobs: - run: bash ./ci/prepare_build_environment.sh - name: Run cargo bloat - uses: wsxiaoys/cargo-bloat-action@d84b3fd + uses: wsxiaoys/cargo-bloat-action@d84b3fdae2bc773cb57aac9e960e2b4c0adbd9df with: token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 63132023494911bce5be727d254f14a656241adb Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Sat, 27 Apr 2024 00:54:05 -0700 Subject: [PATCH 16/19] update --- .github/workflows/bloat.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/bloat.yml b/.github/workflows/bloat.yml index 0cd4b157671a..b2fc264a0126 100644 --- a/.github/workflows/bloat.yml +++ b/.github/workflows/bloat.yml @@ -21,7 +21,10 @@ jobs: CARGO_INCREMENTAL: 0 runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v3 + with: + submodules: recursive + - name: Install Rust uses: actions-rs/toolchain@v1 with: @@ -46,6 +49,6 @@ jobs: - run: bash ./ci/prepare_build_environment.sh - name: Run cargo bloat - uses: wsxiaoys/cargo-bloat-action@d84b3fdae2bc773cb57aac9e960e2b4c0adbd9df + uses: wsxiaoys/cargo-bloat-action@ with: token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 463f267ee205186bd2b3dbe2c4374170fb74be6b Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Sat, 27 Apr 2024 00:56:08 -0700 Subject: [PATCH 17/19] update --- .github/workflows/bloat.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bloat.yml b/.github/workflows/bloat.yml index b2fc264a0126..07d7823dad08 100644 --- a/.github/workflows/bloat.yml +++ b/.github/workflows/bloat.yml @@ -19,7 +19,9 @@ jobs: SCCACHE_GHA_ENABLED: true RUSTC_WRAPPER: sccache CARGO_INCREMENTAL: 0 + runs-on: ubuntu-latest + steps: - uses: actions/checkout@v3 with: @@ -49,6 +51,6 @@ jobs: - run: bash ./ci/prepare_build_environment.sh - name: Run cargo bloat - uses: wsxiaoys/cargo-bloat-action@ + uses: wsxiaoys/cargo-bloat-action@master with: token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From b1c2d5caee883ea6e93e84d59c0d6aa6ea77ee93 Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Sat, 27 Apr 2024 01:14:03 -0700 Subject: [PATCH 18/19] update --- .github/workflows/bloat.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/bloat.yml b/.github/workflows/bloat.yml index 07d7823dad08..980d47cf76a1 100644 --- a/.github/workflows/bloat.yml +++ b/.github/workflows/bloat.yml @@ -53,4 +53,5 @@ jobs: - name: Run cargo bloat uses: wsxiaoys/cargo-bloat-action@master with: - token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + token: ${{ secrets.GITHUB_TOKEN }} + include_packages: "tabby" \ No newline at end of file From 6f1b719b4f1d4ac9cc468ebe9e591667d947da41 Mon Sep 17 00:00:00 2001 From: Meng Zhang Date: Sat, 27 Apr 2024 01:16:49 -0700 Subject: [PATCH 19/19] update --- .github/workflows/bloat.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/bloat.yml b/.github/workflows/bloat.yml index 980d47cf76a1..731faf8c9a0b 100644 --- a/.github/workflows/bloat.yml +++ b/.github/workflows/bloat.yml @@ -54,4 +54,4 @@ jobs: uses: wsxiaoys/cargo-bloat-action@master with: token: ${{ secrets.GITHUB_TOKEN }} - include_packages: "tabby" \ No newline at end of file + include_packages: tabby \ No newline at end of file