Skip to content

Commit

Permalink
Set up GitHub Actions CI.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 609411485
  • Loading branch information
dan-zheng committed Feb 22, 2024
1 parent 587e80f commit a62f783
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build

# Trigger on push or via manual dispath.
on: [push, workflow_dispatch]

jobs:
build:
runs-on: ${{matrix.os}}
name: ${{ matrix.os }} ${{ matrix.type }}
timeout-minutes: 30

strategy:
fail-fast: false
matrix:
type: ['Release']
os: ['ubuntu-latest']

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v4

# Set up ccache
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2

# Install CMake
- uses: lukka/get-cmake@latest

# Build via CMake
# Reference: https://github.com/lukka/run-cmake/blob/v3/action.yml
- name: Build via cmake
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeAppendedArgs: >
-D CMAKE_C_COMPILER_LAUNCHER=ccache
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache
buildWithCMake: true
# Explicitly list build targets here.
# Building "all" includes test executables and takes much longer.
buildWithCMakeArgs: "-- gemma"
buildDirectory: '${{ github.workspace }}/build'

0 comments on commit a62f783

Please sign in to comment.