Skip to content

Commit

Permalink
Merge pull request #71 from tweag/cg/use_config_bazel_remote_cache_auth
Browse files Browse the repository at this point in the history
chore: update to use `tweag/configure-bazel-remote-cache-auth`
  • Loading branch information
mergify[bot] authored Nov 29, 2023
2 parents 1e6c7ad + 6ad97ec commit a81ee7f
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,12 @@ jobs:
- uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=./nixpkgs.nix
- uses: tweag/configure-bazel-remote-cache-auth@v0
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 @@ -58,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 a81ee7f

Please sign in to comment.