Skip to content

Commit 6bb41f2

Browse files
committed
Add cmakelists
1 parent 835bd33 commit 6bb41f2

File tree

5 files changed

+491
-0
lines changed

5 files changed

+491
-0
lines changed

.github/workflows/cmake.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: CMake Build
2+
3+
on:
4+
push:
5+
branches: [ '**' ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
runs-on: [ubuntu-latest, macos-latest, windows-latest]
15+
runs-on: ${{ matrix.runs-on }}
16+
steps:
17+
- uses: actions/checkout@v3
18+
with:
19+
submodules: recursive
20+
fetch-depth: 0
21+
- uses: lukka/get-cmake@latest
22+
with:
23+
cmakeVersion: latest
24+
ninjaVersion: latest
25+
26+
- name: CMake - Configure ${{ matrix.targets }}
27+
run: cmake -B build -DFACIL_TESTS_BUILD=ON -DFACIL_EXAMPLES_BUILD=ON
28+
29+
- name: CMake - Build ${{ matrix.targets }}
30+
run: cmake --build build --parallel
31+
32+
msys2-mingw:
33+
runs-on: windows-latest
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
include:
38+
- { sys: mingw64, env: x86_64 } # msvcrt + libstdc++
39+
- { sys: ucrt64, env: ucrt-x86_64 } # ucrt + libstdc++
40+
- { sys: clang64, env: clang-x86_64 } # ucrt + libc++
41+
steps:
42+
- uses: actions/checkout@v3
43+
with:
44+
path: temp
45+
submodules: recursive
46+
fetch-depth: 0
47+
- uses: goto-bus-stop/setup-zig@v2
48+
with:
49+
version: master
50+
- uses: msys2/setup-msys2@v2
51+
with:
52+
msystem: ${{ matrix.sys }}
53+
path-type: inherit
54+
location: D:\
55+
install: git mingw-w64-${{matrix.env}}-cmake mingw-w64-${{matrix.env}}-toolchain
56+
update: true
57+
58+
- name: Move Checkout
59+
run: |
60+
Copy-Item -Path ".\temp" -Destination "C:\_" -Recurse
61+
62+
- name: CMake - Configure
63+
shell: msys2 {0}
64+
run: |
65+
cd /C/_
66+
cmake -B build -DFACIL_TESTS_BUILD=ON -DFACIL_EXAMPLES_BUILD=ON
67+
68+
- name: CMake - Build C++ client
69+
shell: msys2 {0}
70+
run: |
71+
cd /C/_
72+
cmake --build build --parallel

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
tmp/*
33
.DS_Store
44
*.pem
5+
6+
build/

0 commit comments

Comments
 (0)