@@ -14,26 +14,49 @@ jobs:
14
14
matrix :
15
15
runner :
16
16
# Replace with your profile label https://namespace.so/docs/features/faster-github-actions#using-runner-profiles
17
- - namespace-profile-default
18
- - namespace-profile-default- arm64
17
+ - namespace-profile-amd64-with-caching
18
+ - namespace-profile-arm64-with-caching
19
19
python-version : [3.9]
20
+ setup :
21
+ - manual
22
+ - init-pants-action
20
23
fail-fast : false
21
24
runs-on : ${{ matrix.runner }}
22
25
steps :
23
26
- uses : actions/checkout@v4
27
+
24
28
- name : Set up remote cache
25
29
run : |
26
- nsc pants cache setup --pants-toml=/tmp/pants.toml
30
+ nsc pants cache setup --pants-toml=pants.cache.toml
31
+
32
+ - name : Set up local cache
33
+ uses : namespacelabs/nscloud-cache-action@v1
34
+ with :
35
+ path : |
36
+ ~/.cache/pants/named_caches
37
+ ~/.cache/pants/lmdb_store
38
+ ~/.cache/nce
39
+
27
40
- uses : actions/setup-python@v5
28
41
with :
29
42
python-version : ${{ matrix.python-version }}
43
+
44
+ - name : Limit LMDB memory usage
45
+ if : runner.arch == 'ARM64'
46
+ run : echo "PANTS_LOCAL_STORE_PROCESSES_MAX_SIZE_BYTES=536870912" >> $GITHUB_ENV
47
+
30
48
- uses : pantsbuild/actions/init-pants@v8
31
- # This action bootstraps pants and manages 2-3 GHA caches.
32
- # See: github.com/pantsbuild/actions/tree/main/init-pants/
49
+ if : matrix.setup == 'init-pants-action'
33
50
with :
34
51
gha-cache-key : v0
35
52
named-caches-hash : ${{ hashFiles('python-default.lock') }}
36
- pants-ci-config : " ['pants.toml', '/tmp/pants.toml']"
53
+ pants-ci-config : " ['pants.toml', 'pants.ci.toml', 'pants.cache.toml']"
54
+
55
+ - name : Install Pants manually
56
+ if : matrix.setup == 'manual'
57
+ run : |
58
+ curl --proto '=https' --tlsv1.2 -fsSL https://static.pantsbuild.org/setup/get-pants.sh | bash
59
+ echo "PANTS_CONFIG_FILES=['pants.toml','pants.ci.toml','pants.cache.toml']" >> $GITHUB_ENV
37
60
38
61
- name : Check BUILD files
39
62
run : |
49
72
# We also smoke test that our release process will work by running `package`.
50
73
pants package ::
51
74
pants run helloworld/:pex_binary
52
- - name : Upload pants log
53
- uses : namespace-actions/upload-artifact@v1
75
+
76
+ - name : Breakpoint
77
+ uses : namespacelabs/breakpoint-action@v0
78
+ if : failure()
54
79
with :
55
- name : pants-log-${{ matrix.runner }}
56
- path : .pants.d/workdir/pants.log
57
- if : always() # We want the log even on failures.
80
+ duration : 15m
81
+ authorized-users : edganiukov,hugosantos,n-g,htr,nichtverstehen,gmichelo
0 commit comments