Skip to content

Commit a62f783

Browse files
committed
Set up GitHub Actions CI.
PiperOrigin-RevId: 609411485
1 parent 587e80f commit a62f783

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/build.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build
2+
3+
# Trigger on push or via manual dispath.
4+
on: [push, workflow_dispatch]
5+
6+
jobs:
7+
build:
8+
runs-on: ${{matrix.os}}
9+
name: ${{ matrix.os }} ${{ matrix.type }}
10+
timeout-minutes: 30
11+
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
type: ['Release']
16+
os: ['ubuntu-latest']
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: true
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
# Set up ccache
26+
- name: ccache
27+
uses: hendrikmuhs/ccache-action@v1.2
28+
29+
# Install CMake
30+
- uses: lukka/get-cmake@latest
31+
32+
# Build via CMake
33+
# Reference: https://github.com/lukka/run-cmake/blob/v3/action.yml
34+
- name: Build via cmake
35+
uses: lukka/run-cmake@v3
36+
with:
37+
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
38+
cmakeAppendedArgs: >
39+
-D CMAKE_C_COMPILER_LAUNCHER=ccache
40+
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache
41+
buildWithCMake: true
42+
# Explicitly list build targets here.
43+
# Building "all" includes test executables and takes much longer.
44+
buildWithCMakeArgs: "-- gemma"
45+
buildDirectory: '${{ github.workspace }}/build'

0 commit comments

Comments
 (0)