Skip to content

Commit 3caf37e

Browse files
authored
ci: Use cicd-actions setup-bazel-cache and unblock user namespace for linux-sandbox actions (eclipse-score#151)
There is now a release of cicd-actions! Lets make use of that and simplify our code. cicd-workflows are also being updated: eclipse-score/cicd-workflows#125 # setup-bazel-cache This centralizes bazel caching logic within S-CORE and moves it into a central place of perfection. # unblock linux user namespaces for linux-sandbox The code in cicd-actions is better tested and should be considered a single source of perfection
1 parent cba2a48 commit 3caf37e

4 files changed

Lines changed: 9 additions & 79 deletions

File tree

.github/actions/unblock_user_namespace_for_linux_sandbox/action.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/build_and_test_cross_compilation.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,11 @@ jobs:
3535
- name: Create config indicator file
3636
run: echo "${{ matrix.bazel-config }}" > .bazel_config
3737
- name: Setup Bazel
38-
uses: bazel-contrib/setup-bazel@0.19.0
38+
uses: eclipse-score/cicd-actions/setup-bazel-cache@659dcbed63f6b7fbde88c7850125ea0a0a92f939
3939
with:
40-
output-base: /mnt/.bazel
41-
# Avoid downloading Bazel every time.
42-
bazelisk-cache: true
43-
# Store build cache per workflow.
44-
disk-cache: ${{ github.workflow }}-${{ matrix.bazel-config }}
45-
# Share repository cache between workflows.
46-
repository-cache: |
47-
- ./MODULE.bazel
48-
- ./.bazel_config
49-
# Cache external/
50-
external-cache: true
51-
cache-save: ${{ github.event_name == 'push' }}
40+
unique-cache-name: ${{ github.workflow }}-${{ github.job }}-${{ matrix.bazel-config }}
5241
- name: Allow linux-sandbox
53-
uses: ./.github/actions/unblock_user_namespace_for_linux_sandbox
42+
uses: eclipse-score/cicd-actions/unblock-user-namespace-for-linux-sandbox@659dcbed63f6b7fbde88c7850125ea0a0a92f939
5443
- run: df -h
5544
- name: Bazel build targets
5645
# TODO: build all targets ( //... ) once python toolchain issue is resolved.

.github/workflows/build_and_test_host.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,11 @@ jobs:
3131
- name: Create config indicator file
3232
run: echo "host" > .bazel_config
3333
- name: Setup Bazel
34-
uses: bazel-contrib/setup-bazel@0.19.0
34+
uses: eclipse-score/cicd-actions/setup-bazel-cache@659dcbed63f6b7fbde88c7850125ea0a0a92f939
3535
with:
36-
output-base: /mnt/.bazel
37-
# Avoid downloading Bazel every time.
38-
bazelisk-cache: true
39-
# Store build cache per workflow.
40-
disk-cache: ${{ github.workflow }}
41-
# Share repository cache between workflows.
42-
repository-cache: |
43-
- ./MODULE.bazel
44-
- ./.bazel_config
45-
# Cache external/
46-
external-cache: true
47-
cache-save: ${{ github.event_name == 'push' }}
36+
unique-cache-name: ${{ github.workflow }}-${{ github.job }}
4837
- name: Allow linux-sandbox
49-
uses: ./.github/actions/unblock_user_namespace_for_linux_sandbox
38+
uses: eclipse-score/cicd-actions/unblock-user-namespace-for-linux-sandbox@659dcbed63f6b7fbde88c7850125ea0a0a92f939
5039
- run: df -h
5140
- name: Bazel build targets
5241
run: |

.github/workflows/copilot-setup-steps.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,8 @@ jobs:
4242
sudo mkdir -p /mnt/.bazel
4343
sudo chown -R $USER:$USER /mnt/.bazel
4444
- name: Setup Bazel
45-
uses: bazel-contrib/setup-bazel@0.19.0
45+
uses: eclipse-score/cicd-actions/setup-bazel-cache@659dcbed63f6b7fbde88c7850125ea0a0a92f939
4646
with:
47-
output-base: /mnt/.bazel
48-
# Avoid downloading Bazel every time.
49-
bazelisk-cache: true
50-
# Share repository cache between workflows.
51-
repository-cache: true
52-
# Cache external/
53-
external-cache: true
54-
cache-save: false
47+
unique-cache-name: ${{ github.workflow }}-${{ github.job }}
5548
- name: Allow linux-sandbox
56-
uses: ./.github/actions/unblock_user_namespace_for_linux_sandbox
49+
uses: eclipse-score/cicd-actions/unblock-user-namespace-for-linux-sandbox@659dcbed63f6b7fbde88c7850125ea0a0a92f939

0 commit comments

Comments
 (0)