-
Notifications
You must be signed in to change notification settings - Fork 4
66 lines (54 loc) · 1.7 KB
/
macos-ci.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# NOTE: Currently disabled. Due to symlinking errors (`link already exists`)
# when building Cython during Pynini compilation.
name: "macos"
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-test-macos:
name: Build and Test (macOS)
runs-on: macos-latest
env:
BAZEL: bazelisk-darwin-amd64
USE_BAZEL_VERSION: 6.4.0
CC: gcc
CXX: g++
steps:
- uses: actions/checkout@v3
- name: Update environment variables
run: |
echo "USER=${USER}" >> ${GITHUB_ENV}
- name: Mount bazel cache
uses: actions/cache@v3
with:
# See https://docs.bazel.build/versions/master/output_directories.html
path: /private/var/tmp/_bazel_${{ env.USER }}
key: ${{ runner.os }}-bazel-${{ hashFiles('WORKSPACE.bazel') }}
restore-keys: ${{ runner.os }}-bazel
- name: Install bazelisk
run: |
curl -sLO "https://github.com/bazelbuild/bazelisk/releases/latest/download/$BAZEL"
chmod +x $BAZEL
- name: Install requirements
run: |
brew install --display-times python || true
pip install --upgrade pip
pip install -r ./requirements.txt
- name: Environment variables (debug dump)
run: |
echo "====== gcc version:"
gcc --version
echo "====== Requested gcc:"
${CC} --version
echo "====== g++ version:"
g++ --version
echo "====== Requested g++:"
${CXX} --version
- name: Build
run: |
./$BAZEL run //:requirements.update
./$BAZEL build -c opt //...
- name: Test
run: ./$BAZEL test -c opt --test_size_filters=-large,-enormous --test_output=errors //nisaba/...