This repository was archived by the owner on Feb 27, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (58 loc) · 2.07 KB
/
linux.yml
File metadata and controls
71 lines (58 loc) · 2.07 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
60
61
62
63
64
65
66
67
68
69
70
71
name: Linux-gcc
on:
push:
branches: [ "main" ]
paths:
- 'src/**'
- 'include/**'
- 'application/**'
- 'CMakeLists.txt'
- 'conanfile.py'
- 'cmake/**'
- '.github/workflows/linux.yml'
pull_request:
branches: [ "main" ]
paths:
- 'src/**'
- 'include/**'
- 'application/**'
- 'CMakeLists.txt'
- 'conanfile.py'
- 'cmake/**'
- '.github/workflows/linux.yml'
env:
CPM_SOURCE_CACHE: ${{ github.workspace }}/.cpm_modules
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install conan to system
run: |
sudo apt-get update
sudo apt-get install -y python3-pip ccache
pip3 install conan
- name: create CPM cache
id: cache-cpm
uses: actions/cache@v3
with:
path: ${{env.CPM_SOURCE_CACHE}}
key: ${{ runner.os }}-cpm-${{ hashFiles('cmake/CPM.cmake') }}
- name: create Conan cache
id: cache-conan
uses: actions/cache@v3
with:
path: /home/runner/.conan2
key: ${{ runner.os }}-conan-${{ hashFiles('conanfile.py') }}
- if: ${{ steps.cache-conan.outputs.cache-hit != 'true' }}
name: Conan profile detect --force
run: conan profile detect --force
- name: Conan profile show
run: conan profile show
- name: install Conan dependencies
run: conan install . -s build_type=${{env.BUILD_TYPE}} -s compiler.cppstd=20 -of=${{github.workspace}}/build/application/default/debug -pr default -b=missing -c tools.system.package_manager:mode=install -c tools.system.package_manager:sudo=true
- name: CMake configure
run: cmake -B ${{github.workspace}}/build/application/default/debug -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_LIBRARY=ON -DBUILD_APPLICATION=ON
- name: CMake build
run: cmake --build ${{github.workspace}}/build/application/default/debug --config ${{env.BUILD_TYPE}}