Skip to content

Commit

Permalink
chore: update to use tweag/configure-bazel-remote-cache-auth
Browse files Browse the repository at this point in the history
  • Loading branch information
cgrindel committed Nov 27, 2023
1 parent 07e2ac7 commit c118f45
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,14 @@ jobs:
- uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=./nixpkgs.nix
# DO NOT MERGE!!!
# TODO: Update with the correct tagged release.
- uses: tweag/configure-bazel-remote-cache-auth@fix_output
with:
buildbuddy_api_key: ${{ secrets.BUILDBUDDY_API_KEY }}
bazelrc_path: .bazelrc.local
- name: Configure
env:
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
run: |
if [ -z "$BUILDBUDDY_API_KEY" ]; then
cache_setting='--noremote_upload_local_results'
else
cache_setting="--remote_header=x-buildbuddy-api-key=$BUILDBUDDY_API_KEY"
fi
# Convert "ghc_X_Y_Z" to "X.Y.Z".
GHC_VERSION="$(sed 's/^ghc_//;s/_/./g' <<<"${{ matrix.ghc-version }}")"
Expand All @@ -56,12 +54,11 @@ jobs:
sed -i.bak 's/^GHC_VERSION = .*$/GHC_VERSION = "'"$GHC_VERSION"'"/g' example/MODULE.bazel
fi
cat >.bazelrc.local <<EOF
cat >>.bazelrc.local <<EOF
build --host_platform=@rules_nixpkgs_core//platforms:host
build --bes_results_url=https://app.buildbuddy.io/invocation/
build --bes_backend=grpcs://cloud.buildbuddy.io
build --remote_cache=grpcs://cloud.buildbuddy.io
build $cache_setting
build --remote_timeout=600
build --keep_backend_build_event_connections_alive=false
build --repository_cache=~/repo-cache/
Expand Down

0 comments on commit c118f45

Please sign in to comment.