From 0ef9b109a97c215dcb74e306e97613bc5ac54a96 Mon Sep 17 00:00:00 2001 From: Aymen-Soussi-01 Date: Tue, 24 Jun 2025 12:08:52 +0200 Subject: [PATCH 1/5] Cache format and test workflows to check the improvement --- .github/workflows/format.yml | 5 +++++ .github/workflows/test.yml | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index b3b0b477b..71f1530b3 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -23,6 +23,11 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4.2.2 + - name: Cache Bazel + uses: actions/cache@v4 + with: + path: ~/.cache/bazel + key: ${{ runner.os }}-format-${{ hashFiles('**/*.bazel', '**/BUILD') }} - name: Setup Bazel uses: bazel-contrib/setup-bazel@0.9.1 - name: Run formatting checks diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ab0984abb..787939957 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,6 +21,13 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4.2.2 + - name: Cache Bazel and Python pip + uses: actions/cache@v4 + with: + path: | + ~/.cache/bazel + ~/.cache/pip + key: ${{ runner.os }}-test-${{ hashFiles('**/*.bazel', 'src/requirements.txt', 'src/**/*.py') }} - name: Run test targets run: | bazel run //src:ide_support From 11842cdd3ef1eece804c961b98f4a56da40f7930 Mon Sep 17 00:00:00 2001 From: Aymen-Soussi-01 Date: Tue, 24 Jun 2025 12:19:25 +0200 Subject: [PATCH 2/5] temporary to run the touched on push to test --- .github/workflows/format.yml | 3 +++ .github/workflows/test.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 71f1530b3..61737571f 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -13,6 +13,9 @@ name: Formatting checks on: + push: + branches: + - "**" pull_request: types: [opened, reopened, synchronize] merge_group: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 787939957..df0b428be 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,6 +13,9 @@ name: Run Bazel Tests on: + push: + branches: + - "**" pull_request: types: [opened, reopened, synchronize] jobs: From 50517087cef23add3454038a0bda33a4f51e1d25 Mon Sep 17 00:00:00 2001 From: Aymen-Soussi-01 Date: Tue, 24 Jun 2025 14:42:28 +0200 Subject: [PATCH 3/5] Remove build option on push --- .github/workflows/format.yml | 3 --- .github/workflows/test.yml | 3 --- 2 files changed, 6 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 61737571f..71f1530b3 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -13,9 +13,6 @@ name: Formatting checks on: - push: - branches: - - "**" pull_request: types: [opened, reopened, synchronize] merge_group: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index df0b428be..787939957 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,9 +13,6 @@ name: Run Bazel Tests on: - push: - branches: - - "**" pull_request: types: [opened, reopened, synchronize] jobs: From afbefabaf4b19215d73d151908467018ad21f7ec Mon Sep 17 00:00:00 2001 From: Aymen-Soussi-01 Date: Thu, 26 Jun 2025 11:23:44 +0200 Subject: [PATCH 4/5] Improve Bazel and pip caching strategy --- .github/workflows/format.yml | 11 ++++++++--- .github/workflows/test.yml | 11 +++++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 71f1530b3..78a86df3b 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -27,9 +27,14 @@ jobs: uses: actions/cache@v4 with: path: ~/.cache/bazel - key: ${{ runner.os }}-format-${{ hashFiles('**/*.bazel', '**/BUILD') }} - - name: Setup Bazel - uses: bazel-contrib/setup-bazel@0.9.1 + key: ${{ runner.os }}-format-${{ hashFiles('**/*.bazel', '**/BUILD', '**/*.bzl') }} + + - name: Setup Bazel with cache + uses: bazel-contrib/setup-bazel@v0.14.0 + with: + disk-cache: true + repository-cache: true + bazelisk-cache: true - name: Run formatting checks run: | bazel run //src:ide_support diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 787939957..e830f4c03 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,13 +21,20 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4.2.2 - - name: Cache Bazel and Python pip + - name: Cache Bazel and pip uses: actions/cache@v4 with: path: | ~/.cache/bazel ~/.cache/pip - key: ${{ runner.os }}-test-${{ hashFiles('**/*.bazel', 'src/requirements.txt', 'src/**/*.py') }} + key: ${{ runner.os }}-test-${{ hashFiles('**/*.bazel', '**/BUILD', '**/*.bzl', 'src/requirements.txt', 'src/**/*.py') }} + + - name: Setup Bazel with cache + uses: bazel-contrib/setup-bazel@v0.14.0 + with: + disk-cache: true + repository-cache: true + bazelisk-cache: true - name: Run test targets run: | bazel run //src:ide_support From ce9e6ee9f248ae81b24753cb4569abc52cad4f68 Mon Sep 17 00:00:00 2001 From: Aymen-Soussi-01 Date: Thu, 26 Jun 2025 11:32:11 +0200 Subject: [PATCH 5/5] upgrade setup-bazel to version: 0.15.0 with correct call --- .github/workflows/format.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 78a86df3b..f664708f8 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -30,7 +30,7 @@ jobs: key: ${{ runner.os }}-format-${{ hashFiles('**/*.bazel', '**/BUILD', '**/*.bzl') }} - name: Setup Bazel with cache - uses: bazel-contrib/setup-bazel@v0.14.0 + uses: bazel-contrib/setup-bazel@0.15.0 with: disk-cache: true repository-cache: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e830f4c03..33c4f4d23 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,7 +30,7 @@ jobs: key: ${{ runner.os }}-test-${{ hashFiles('**/*.bazel', '**/BUILD', '**/*.bzl', 'src/requirements.txt', 'src/**/*.py') }} - name: Setup Bazel with cache - uses: bazel-contrib/setup-bazel@v0.14.0 + uses: bazel-contrib/setup-bazel@0.15.0 with: disk-cache: true repository-cache: true