Skip to content

Commit 298cb75

Browse files
Yury Samkevichfacebook-github-bot
Yury Samkevich
authored andcommitted
add nativelink example to github actions (#930)
Summary: Pull Request resolved: #930 Differential Revision: D74001305
1 parent 6f4ba79 commit 298cb75

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

.github/actions/build_example_nativelink/action.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ runs:
99
- name: Build examples/remote_execution/nativelink directory using remote execution
1010
run: |-
1111
{
12-
echo "[buck2_re_client]
12+
echo "[buck2]
13+
digest_algorithms = SHA256
14+
execution_platforms = root//platforms:platforms
15+
16+
[buck2_re_client]
1317
engine_address = grpc://scheduler-buck2.build-faster.nativelink.net:443
1418
action_cache_address = grpc://cas-buck2.build-faster.nativelink.net:443
1519
cas_address = grpc://cas-buck2.build-faster.nativelink.net:443
@@ -18,7 +22,11 @@ runs:
1822
instance_name = main"
1923
} > examples/remote_execution/nativelink/.buckconfig.local
2024
cd examples/remote_execution/nativelink
21-
$RUNNER_TEMP/artifacts/buck2 build //...
25+
if [[ -z ${NATIVELINK_HEADER_RW_KEY:+x} ]]; then
26+
echo "Missing NativeLink Api key." >&2
27+
else
28+
$RUNNER_TEMP/artifacts/buck2 build //...
29+
fi
2230
env:
2331
NATIVELINK_HEADER_RW_KEY: ${{ inputs.NATIVELINK_HEADER_RW_KEY_SECRET }}
2432
shell: bash

.github/workflows/build-and-test.yml

+3
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ jobs:
7373
- uses: ./.github/actions/build_example_persistent_worker
7474
with:
7575
buildbuddyApiKey: ${{ secrets.BUILDBUDDY_API_KEY }}
76+
- uses: ./.github/actions/build_example_nativelink
77+
with:
78+
NATIVELINK_HEADER_RW_KEY_SECRET: ${{ secrets.NATIVELINK_HEADER_RW_KEY_SECRET }}
7679
- uses: ./.github/actions/setup_reindeer
7780
- uses: ./.github/actions/build_bootstrap
7881
windows-build-examples:

examples/remote_execution/nativelink/platforms/defs.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def _platforms(ctx):
2121
# Set those up based on what workers you've registered with NativeLink.
2222
remote_execution_properties = {
2323
"OSFamily": "linux",
24-
"container-image": "docker://buck2-github:latest",
24+
"container-image": "docker://nativelink-toolchain-buck2:latest",
2525
},
2626
remote_execution_use_case = "buck2-default",
2727
remote_output_paths = "output_paths",

0 commit comments

Comments
 (0)