Skip to content

Commit b2fc7c0

Browse files
committed
Set up arm and amd examples.
1 parent c86b21d commit b2fc7c0

File tree

1 file changed

+35
-11
lines changed

1 file changed

+35
-11
lines changed

.github/workflows/pants.yaml

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,49 @@ jobs:
1414
matrix:
1515
runner:
1616
# 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
1919
python-version: [3.9]
20+
setup:
21+
- manual
22+
- init-pants-action
2023
fail-fast: false
2124
runs-on: ${{ matrix.runner }}
2225
steps:
2326
- uses: actions/checkout@v4
27+
2428
- name: Set up remote cache
2529
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+
2740
- uses: actions/setup-python@v5
2841
with:
2942
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+
3048
- 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'
3350
with:
3451
gha-cache-key: v0
3552
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
3760
3861
- name: Check BUILD files
3962
run: |
@@ -49,9 +72,10 @@ jobs:
4972
# We also smoke test that our release process will work by running `package`.
5073
pants package ::
5174
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()
5479
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

Comments
 (0)