-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8e93b80
commit 02b7ab4
Showing
5 changed files
with
82 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: CMake Build Matrix | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
env: | ||
BUILD_TYPE: Release | ||
BUILD_DIR: ${{ github.workspace }}/build | ||
|
||
jobs: | ||
build: | ||
name: ${{ matrix.config.name }} | ||
runs-on: ${{ matrix.config.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- { | ||
name: "Windows Latest", | ||
os: "windows-latest", | ||
cc: "cl", | ||
cxx: "cl", | ||
} | ||
- { | ||
name: "Ubuntu 22.04 GCC", | ||
os: "ubuntu-22.04", | ||
cc: "gcc", | ||
cxx: "g++", | ||
} | ||
- { | ||
name: "Ubuntu 22.04 Clang", | ||
os: "ubuntu-22.04", | ||
cc: "clang-14", | ||
cxx: "clang++-14", | ||
} | ||
- { | ||
name: "MacOS Latest", | ||
os: "macos-latest", | ||
cc: "clang", | ||
cxx: "clang++", | ||
} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Print env | ||
run: | | ||
echo github.event.action: ${{ github.event.action }} | ||
echo github.event_name: ${{ github.event_name }} | ||
- name: Configure CMake | ||
run: > | ||
cmake -B ${{ env.BUILD_DIR }} | ||
-DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} | ||
-DCMAKE_C_COMPILER=${{ matrix.config.cc }} | ||
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} | ||
-DBUILD_TEST=ON | ||
-S ${{ github.workspace }} | ||
- name: Build | ||
run: cmake --build ${{ env.BUILD_DIR }} --config ${{env.BUILD_TYPE}} | ||
|
||
- name: Check Tests | ||
working-directory: ${{ env.BUILD_DIR }} | ||
run: ctest --build-config ${{ env.BUILD_TYPE }} --rerun-failed --output-on-failure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
cmake-* | ||
|
||
.DS_Store | ||
build | ||
build-* | ||
log | ||
*.log | ||
.idea | ||
log.txt | ||
.vscode | ||
|
||
.vs | ||
gh-md-toc.exe | ||
gh-md-toc | ||
auto_clean.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters