-
Notifications
You must be signed in to change notification settings - Fork 4
79 lines (71 loc) · 2.77 KB
/
main.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# the docker image is build for linux/amd64 and pushed to docker hub:
# docker buildx build --platform linux/amd64 . -t those90/ci-image:1.0
# docker push those90/ci-image:1.0
name: CI
on:
push:
branches: [ "**" ]
jobs:
gcc:
runs-on: ubuntu-latest
container: those90/ci-image:1.0
env:
HOME: /root
steps:
- name: checkout repo
uses: actions/checkout@v3
- name: build
run: |
conan install . -of ./build_gcc --build missing
cmake -S . -B ./build_gcc -DCMAKE_TOOLCHAIN_FILE=./build_gcc/conan_toolchain.cmake -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc
cmake --build ./build_gcc -j12
- name: unittests
run: ./build_gcc/bin/unittests
- name: example
run: ./build_gcc/bin/example ./examples
Clang:
runs-on: ubuntu-latest
container: those90/ci-image:1.0
env:
HOME: /root
steps:
- name: checkout repo
uses: actions/checkout@v3
- name: build
run: |
conan install . -of ./build_clang --build missing -pr clang
cmake -S . -B ./build_clang -DCMAKE_TOOLCHAIN_FILE=./build_clang/conan_toolchain.cmake -DCMAKE_CXX_COMPILER=clang++-17 -DCMAKE_C_COMPILER=clang-17
cmake --build ./build_clang -j12
- name: unittests
run: ./build_clang/bin/unittests
- name: examples
run: ./build_clang/bin/example ./examples
MSVC:
runs-on: windows-latest
steps:
- name: checkout repo
uses: actions/checkout@v2
- name: set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12'
- name: install pip tools
run: |
python -m pip install --upgrade pip
pip install cmake conan
- name: conan
run: |
conan --version
conan profile detect
powershell -Command "(gc C:\Users\runneradmin\.conan2\profiles\default) -replace 'compiler.cppstd=14', 'compiler.cppstd=20' | Out-File -encoding ASCII C:\Users\runneradmin\.conan2\profiles\default"
powershell -Command "(gc C:\Users\runneradmin\.conan2\profiles\default) -replace 'compiler.runtime=dynamic', 'compiler.runtime=static' | Out-File -encoding ASCII C:\Users\runneradmin\.conan2\profiles\default"
conan profile show
- name: build
run: |
conan install . -of build --build missing
cmake -S . -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=".\build\conan_toolchain.cmake" -DMSVC_STATIC=ON
cmake --build ./build --config Release -j12
- name: unittests
run: .\build\bin\Release\unittests.exe
- name: example
run: .\build\bin\Release\example.exe ./examples