-
-
Notifications
You must be signed in to change notification settings - Fork 47
47 lines (39 loc) · 1.24 KB
/
cmake-ubuntu.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
name: CMake for Ubuntu platform
on:
push:
tags:
- '*' # any tag
branches:
- master
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
build_type: [Release]
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
echo "build-version=${{ github.ref_name == 'master' && '0.0.0' || github.ref_name }}" >> "$GITHUB_OUTPUT"
echo "cpu-count=$(nproc)" >> "$GITHUB_OUTPUT"
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y qt6-base-dev libusb-1.0-0-dev zlib1g-dev libgl1-mesa-dev
- name: Configure project
run: |
cmake \
-S ${{ github.workspace }} \
-B ${{ steps.strings.outputs.build-dir }} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DBUILD_PROJECT_VERSION="${{ steps.strings.outputs.build-version }}"
- name: Build project
run: |
cmake --build ${{ steps.strings.outputs.build-dir }} --target nfc-spy --parallel ${{ steps.strings.outputs.cpu-count }}