@@ -7,7 +7,6 @@ name: 🔥 Test Mojo Standard library
7
7
pull_request :
8
8
branches : [main]
9
9
10
- permissions : read-all
11
10
12
11
jobs :
13
12
stdlib-tests :
18
17
os : [ubuntu-24.04]
19
18
runs-on : ${{ matrix.os }}
20
19
timeout-minutes : 60
20
+ permissions :
21
+ id-token : write
21
22
steps :
22
23
24
+ - name : Get Web Identity Token via Cognito Identity Pool
25
+ id : web_id_token
26
+ # See: https://github.com/catnekaise/cognito-idpool-auth/issues/6
27
+ uses : >- # alpha
28
+ catnekaise/cognito-idpool-basic-auth@287d4dabb527d8b78d3df6e0436d46e3abd209d3
29
+ with :
30
+ # yamllint disable rule:line-length
31
+ cognito-identity-pool-id : " us-east-2:7edef192-7c1c-4e55-8ab4-6035b9c2288f"
32
+ aws-account-id : " 471112781046"
33
+ aws-region : " us-east-2"
34
+ audience : " sts.amazonaws.com"
23
35
- name : Checkout
24
36
uses : >- # v4.1.6
25
37
actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
@@ -31,25 +43,24 @@ jobs:
31
43
- name : Cache Nix derivations
32
44
uses : >- # v6
33
45
DeterminateSystems/magic-nix-cache-action@87e8236f46702ab0ce5a058b605a173ec88d618e
34
- - name : Mount bazel cache
35
- uses : >- # v4.0.2
36
- actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
37
- with :
38
- path : |
39
- ~/.cache/bazel
40
- key : >-
41
- ${{ runner.os }}-bazel-${{ hashFiles(
42
- '.bazelversion',
43
- '.bazelrc',
44
- 'MODULE.bazel',
45
- 'MODULE.bazel.lock',
46
- '**/*.nix',
47
- 'flake.lock'
48
- ) }}
49
- restore-keys : |
50
- ${{ runner.os }}-bazel-
46
+
47
+ # - name: Create secret from token
48
+ # uses: actions/github-script@v6
49
+ # with:
50
+ # # yamllint disable rule:line-length
51
+ # script: >-
52
+ # core.setSecret('NATIVELINK_TOKEN',
53
+ # '${{ steps.web_id_token.outputs.cognito_identity_oidc_access_token }}')
51
54
52
55
- name : Invoke Bazel build in Nix shell
56
+ env :
57
+ NATIVELINK_TOKEN : ${{ env.NATIVELINK_TOKEN }}
53
58
run : |
54
59
nix develop --impure --command \
55
- bash -c "bazel test --jobs=4 @mojo//... --verbose_failures"
60
+ bash -c "bazel test \
61
+ --jobs=4 \
62
+ --verbose_failures \
63
+ --experimental_remote_cache_async \
64
+ --remote_header=x-nativelink-api-key=$NATIVELINK_TOKEN \
65
+ --remote_cache=grpcs://cas-gha-ci.build-faster.nativelink.net:443 \
66
+ @mojo//..."
0 commit comments