forked from pinterest/tulsi
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (49 loc) · 1.4 KB
/
macos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
on:
workflow_call:
inputs:
name:
type: string
bazel:
type: string
default: latest
xcode_version:
type: string
default: "13.2.1"
build_targets:
type: string
default: //:tulsi
test_flags:
type: string
default: --nocheck_visibility --sandbox_writable_path=/Users/runner/Library/Application\ Support
test_targets:
type: string
default: //:tests
shell_commands:
type: string
default: ""
jobs:
macos:
runs-on: macos-11
env:
USE_BAZEL_VERSION: ${{ inputs.bazel }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install bazelisk
run: mv -f `which bazelisk` `which bazel`
- name: Shell commands
run: ${{ inputs.shell_commands }}
- name: Xcode select
run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode_version }}.app/Contents/Developer
- name: Build
run: bazel build -- ${{ inputs.build_targets }}
- name: Test
run: bazel test ${{ inputs.test_flags }} --test_env=USE_BAZEL_VERSION -- ${{ inputs.test_targets }}
- name: Copy testlogs
run: rsync -rmL --include "*/" --include "test.log" --exclude "*" bazel-testlogs testlogs
if: failure()
- uses: actions/upload-artifact@v2
if: failure()
with:
name: testlogs-${{ inputs.name }}
path: testlogs/