This repository was archived by the owner on Aug 14, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (69 loc) · 2.33 KB
/
Copy pathci.yaml
File metadata and controls
71 lines (69 loc) · 2.33 KB
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
67
68
69
70
71
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
strategy:
matrix:
platform: [macos-latest, ubuntu-latest]
include:
- platform: macos-latest
os: darwin
- platform: ubuntu-latest
os: linux
runs-on: ${{ matrix.platform }}
steps:
- id: log_platform_info_macos
if: contains(matrix.platform, 'macos')
name: Log platform information (Mac OS)
run: sw_vers -productVersion
- id: log_platform_info_ubuntu
if: contains(matrix.platform, 'ubuntu')
name: Log platform information (Ubuntu)
run: lsb_release -a
- id: add_github_workspace_bin_to_path
name: Add ${GITHUB_WORKSPACE}/bin to path
run: echo "::add-path::/${GITHUB_WORKSPACE}/bin"
- id: checkout
name: Checkout
uses: actions/checkout@v1
- id: check_bazel
name: Check for Bazel
continue-on-error: true
run: bazel version
- id: check_cmake
name: Check for CMake
continue-on-error: false
run: cmake --version
- id: check_envsubst
name: Check for envsubst
continue-on-error: true
run: envsubst --version
- id: install_bazel
name: Install Bazel(isk)
if: steps.check_bazel.outcome == 'failure'
run: |
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.4.0/bazelisk-${{ matrix.os }}-amd64"
mkdir -p "${GITHUB_WORKSPACE}/bin/"
mv bazelisk-${{ matrix.os }}-amd64 "${GITHUB_WORKSPACE}/bin/bazel"
chmod +x "${GITHUB_WORKSPACE}/bin/bazel"
"${GITHUB_WORKSPACE}/bin/bazel" version
- id: install_envsubst_macos
name: Install envsubst (Mac OS)
if: steps.check_envsubst.outcome == 'failure' && contains(matrix.platform, 'macos')
run: |
brew install gettext
brew link --force gettext
- id: install_envsubst_ubuntu
name: Install envsubst (Ubuntu)
if: steps.check_envsubst.outcome == 'failure' && contains(matrix.platform, 'ubuntu')
run: sudo apt-get install envsubst
- id: build_all
name: Build all sources and tests
run: bazel build ...
- id: test_all
name: Run all tests
run: bazel test ... --test_output=all