Skip to content

Commit

Permalink
Support remote build execution on main and read-only remote cache on PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
bclark8923 committed Aug 23, 2024
1 parent 5903a8e commit 8b95970
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
1 change: 1 addition & 0 deletions .container
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
299166832260.dkr.ecr.us-east-2.amazonaws.com/nativelink-rbe:v0.3 HASH
20 changes: 13 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: CI

# Controls when the workflow will run.
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
Expand All @@ -19,8 +20,10 @@ jobs:
nativelink-dot-com-build-on-main-test:
runs-on: ubuntu-22.04
environment: production
# Only run on main branch.
if: github.ref == 'refs/heads/main'
env:
NL_COM_API_KEY: ${{ secrets.NATIVELINK_COM_API_HEADER || '065f02f53f26a12331d5cfd00a778fb243bfb4e857b8fcd4c99273edfb15deae' }}
NL_COM_RO_FLAGS: ${{ github.ref == 'refs/heads/main' && ' ' || '--nogenerate_json_trace_profile --remote_upload_local_results=false' }}
NL_COM_RE_FLAGS: ${{ github.ref == 'refs/heads/main' && '--remote_executor=grpcs://scheduler-tracemachina-shared.build-faster.nativelink.net:443 --remote_default_exec_properties=container-image=docker://default' || ' ' }}
steps:
- name: Checkout
uses: >- # v4.1.1
Expand All @@ -34,12 +37,15 @@ jobs:
shell: bash
run: |
bazel test \
--remote_cache=${{ vars.NATIVELINK_COM_REMOTE_CACHE_URL }} \
--remote_header=${{ secrets.NATIVELINK_COM_API_HEADER }} \
--bes_backend=${{ vars.NATIVELINK_COM_BES_URL }} \
--bes_header=${{ secrets.NATIVELINK_COM_API_HEADER }} \
--bes_results_url=${{ vars.NATIVELINK_COM_BES_RESULTS_URL }} \
--remote_cache=grpcs://cas-tracemachina-shared.build-faster.nativelink.net \
--remote_header=x-nativelink-api-key=${NL_COM_API_KEY} \
--remote_instance_name=main \
--bes_backend=grpcs://bes-tracemachina-shared.build-faster.nativelink.net \
--bes_header=x-nativelink-api-key=${NL_COM_API_KEY} \
--bes_results_url=https://app.nativelink.com/a/e3b1e0e0-4b73-45d6-85bc-5cb7b02edea5/build \
--remote_header=x-nativelink-project=nativelink-ci \
${NL_COM_RE_FLAGS} \
${NL_COM_RO_FLAGS} \
//...
docker-compose-compiles-nativelink:
Expand Down

0 comments on commit 8b95970

Please sign in to comment.