-
Notifications
You must be signed in to change notification settings - Fork 27
104 lines (89 loc) · 3.3 KB
/
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: C/C++ and Bazel CI
on: [push, pull_request]
# Not using 'inputs' here, since we take no inputs at this time -- just the 'github' context.
run-name: Run CI with ${{ github.ref_name }} by @${{ github.actor }}
jobs:
checkout:
uses: ./.github/workflows/checkout.yml
apt_deps:
uses: ./.github/workflows/apt_deps.yml
cpp:
runs-on: ubuntu-latest
needs: [checkout, apt_deps]
steps:
- name: install glict
run: cd vendor/github.com/ivucica/glict/glict && ./autogen.sh && ./configure && make && sudo make install
- name: autogen
run: ./autogen.sh
- name: configure
run: ./configure
- name: make
run: make
- name: make check
run: make check
#- name: make distcheck
# run: make distcheck
bazel:
runs-on: ubuntu-latest
needs: [checkout, apt_deps]
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, which is the CWD for
# the rest of the steps
- uses: actions/checkout@v1
# Caches and restores the bazel build directory.
- name: Cache bazel build results
uses: actions/cache@v3
env:
cache-name: bazel-cache
with:
path: ~/.cache/bazel
key: bazel-${{ runner.os }}-${{ env.cache-name }}-${{ github.ref }}
restore-keys: |
bazel-${{ runner.os }}-${{ env.cache-name }}-${{ github.ref }}
bazel-${{ runner.os }}-${{ env.cache-name }}-master
bazel-${{ runner.os }}-${{ env.cache-name }}-
bazel-${{ runner.os }}-
${{ runner.os }}-${{ env.cache-name }}-${{ github.ref }}
${{ runner.os }}-${{ env.cache-name }}-master
- if: ${{ steps.bazel-cache.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
run: echo Stub action merely printing a notice that there was a cache miss
# More useful with e.g. npm.
- name: bazel build
run: bazel build //:yatc
- name: bazel test
run: bazel test //:util_test
bazel-buildbuddy:
runs-on: ubuntu-latest
needs: checkout
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, which is the CWD for
# the rest of the steps
- uses: actions/checkout@v1
# Caches and restores the bazel build directory.
- name: Cache bazel build results
uses: actions/cache@v3
env:
cache-name: bazel-cache
with:
path: ~/.cache/bazel
key: bazel-${{ runner.os }}-${{ env.cache-name }}-${{ github.ref }}
restore-keys: |
bazel-${{ runner.os }}-${{ env.cache-name }}-${{ github.ref }}
bazel-${{ runner.os }}-${{ env.cache-name }}-master
bazel-${{ runner.os }}-${{ env.cache-name }}-
bazel-${{ runner.os }}-
${{ runner.os }}-${{ env.cache-name }}-${{ github.ref }}
${{ runner.os }}-${{ env.cache-name }}-master
- if: ${{ steps.bazel-cache.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
run: echo Stub action merely printing a notice that there was a cache miss
# More useful with e.g. npm.
- name: Checkout submodules
run: git submodule init && git submodule update
- name: rbe bazel build
run: bazel build --config=remote //:yatc
- name: rbe bazel test
run: bazel test --config=remote //:util_test