-
Notifications
You must be signed in to change notification settings - Fork 16
46 lines (36 loc) · 1.19 KB
/
build.yml
File metadata and controls
46 lines (36 loc) · 1.19 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
name: Build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
BUILD_TYPE: Debug
jobs:
cmake-build:
runs-on: ubuntu-latest
strategy:
matrix:
compiler: ["gcc", "clang"]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libczmq-dev libpfm4-dev libjson-c-dev libmongoc-dev
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=${{matrix.compiler}} -DCMAKE_C_CLANG_TIDY=clang-tidy
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
container-build:
runs-on: ubuntu-latest
steps:
- name: Setup Docker buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- name: Build image
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
push: false
provenance: false
load: true
tags: localbuild/hwpc-sensor:sha-${{ github.sha }}