Skip to content

Commit

Permalink
Add cmakelists
Browse files Browse the repository at this point in the history
  • Loading branch information
kassane committed Sep 28, 2023
1 parent 835bd33 commit 6bb41f2
Show file tree
Hide file tree
Showing 5 changed files with 491 additions and 0 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: CMake Build

on:
push:
branches: [ '**' ]
pull_request:
branches: [ master ]

jobs:
build:
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- uses: lukka/get-cmake@latest
with:
cmakeVersion: latest
ninjaVersion: latest

- name: CMake - Configure ${{ matrix.targets }}
run: cmake -B build -DFACIL_TESTS_BUILD=ON -DFACIL_EXAMPLES_BUILD=ON

- name: CMake - Build ${{ matrix.targets }}
run: cmake --build build --parallel

msys2-mingw:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- { sys: mingw64, env: x86_64 } # msvcrt + libstdc++
- { sys: ucrt64, env: ucrt-x86_64 } # ucrt + libstdc++
- { sys: clang64, env: clang-x86_64 } # ucrt + libc++
steps:
- uses: actions/checkout@v3
with:
path: temp
submodules: recursive
fetch-depth: 0
- uses: goto-bus-stop/setup-zig@v2
with:
version: master
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.sys }}
path-type: inherit
location: D:\
install: git mingw-w64-${{matrix.env}}-cmake mingw-w64-${{matrix.env}}-toolchain
update: true

- name: Move Checkout
run: |
Copy-Item -Path ".\temp" -Destination "C:\_" -Recurse
- name: CMake - Configure
shell: msys2 {0}
run: |
cd /C/_
cmake -B build -DFACIL_TESTS_BUILD=ON -DFACIL_EXAMPLES_BUILD=ON
- name: CMake - Build C++ client
shell: msys2 {0}
run: |
cd /C/_
cmake --build build --parallel
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
tmp/*
.DS_Store
*.pem

build/
Loading

0 comments on commit 6bb41f2

Please sign in to comment.