-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (48 loc) · 1.41 KB
/
ubuntu.yml
File metadata and controls
59 lines (48 loc) · 1.41 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
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Ubuntu
on:
push:
branches:
- master
pull_request:
types:
- opened
- reopened
permissions:
contents: read
env:
DEBIAN_FRONTEND: noninteractive
TZ: Europe/Oslo
jobs:
ubuntu:
strategy:
matrix:
release: ["16.04", "18.04", "20.04", "22.04"]
runs-on: ubuntu-latest
container:
image: ubuntu:${{ matrix.release }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: |
apt-get update
apt-get install -y --no-install-recommends clang build-essential \
cmake libyaml-dev libcmocka-dev
- name: Run CMake (GCC)
run: |
mkdir build-gcc && cd build-gcc
CC=gcc cmake -DCMAKE_BUILD_TYPE=Debug -DSCONF_BUILD_EXAMPLES=on \
-DSCONF_ENABLE_TESTS=on -Werror=dev ..
- name: Run CMake (Clang)
run: |
mkdir build-clang && cd build-clang
CC=clang cmake -DCMAKE_BUILD_TYPE=Debug -DSCONF_BUILD_EXAMPLES=on \
-DSCONF_ENABLE_TESTS=on -Werror=dev ..
- name: Build code (GCC)
run: cmake --build build-gcc
- name: Build code (clang)
run: cmake --build build-clang
- name: Run tests (GCC)
run: cmake --build build-gcc --target test
- name: Run tests (clang)
run: cmake --build build-clang --target test