Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

Commit

Permalink
dont import action from wfa@actions
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenwarejones committed May 20, 2021
1 parent f07a319 commit fc15b7b
Showing 1 changed file with 34 additions and 5 deletions.
39 changes: 34 additions & 5 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,38 @@ jobs:
- name: Check out revision
uses: actions/checkout@v2

- name: Bazel build and test
uses: world-federation-of-advertisers/actions/bazel-build-test@v1
- name: Set execroot hash
run: |
execroot_hash="$(
bazelisk info execution_root | tr -d '\n' | git hash-object --stdin
)"
echo "execroot_hash=${execroot_hash}" >> $GITHUB_ENV
- name: Set output base path
run: echo "output_base_path=$(bazelisk info output_base)" >> $GITHUB_ENV

- name: Set tree hash
run: echo "tree_hash=$(git rev-parse HEAD:)" >> $GITHUB_ENV

- name: Set up build cache
uses: actions/cache@v2
with:
path: ${{ env.output_base_path }}
key: bazel-${{ env.execroot_hash }}-${{ env.tree_hash }}
restore-keys: |
bazel-${{ env.execroot_hash }}-
- name: Build
run: bazelisk build --keep_going //...

- name: Test
run: bazelisk test --keep_going //...

- name: Copy test logs
if: failure()
run: cp -Lr "$(bazelisk info bazel-testlogs)" "$HOME/bazel-testlogs"

- name: Upload test logs
if: failure()
uses: actions/upload-artifact@v2
with:
workspace-path: .
build-options: |
--host_platform=//build/platforms:ubuntu_18_04
name: bazel-testlogs
path: ~/bazel-testlogs/

0 comments on commit fc15b7b

Please sign in to comment.