-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (37 loc) · 1.09 KB
/
main.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
name: CI
on: [push]
jobs:
lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Check Clang Format
uses: DoozyX/clang-format-lint-action@v0.10
with:
source: '.'
exclude: './third_party'
extensions: 'h,cpp'
clangFormatVersion: 10
style: file
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install prerequisites
run: >
sudo apt install -y
libx11-dev libxinerama-dev libxi-dev libxcursor-dev libxrandr-dev xvfb
mesa-common-dev libpthread-stubs0-dev
- name: Install bazelisk
run: |
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.3.0/bazelisk-linux-amd64"
mkdir -p "${GITHUB_WORKSPACE}/bin/"
mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazel"
chmod +x "${GITHUB_WORKSPACE}/bin/bazel"
- name: Build
run: |
bazel build //...
- name: Test
run: |
Xvfb :99 -screen 0 1024x768x16 &
bazel test --test_output=errors --test_env=DISPLAY=:99 //...