This repository has been archived by the owner on Aug 4, 2022. It is now read-only.
forked from bsamseth/cpp-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Github Actions for CI (bsamseth#19)
The current workflow does less than Travis/Appveyor, but serves as a nice and simple way to do CI with zero setup. Can/should be expanded to do more.
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 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,51 @@ | ||
name: CI | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build-ubuntu: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Checkout submodules | ||
shell: bash | ||
run: | | ||
auth_header="$(git config --local --get http.https://github.com/.extraheader)" | ||
git submodule sync --recursive | ||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 | ||
- name: configure | ||
run: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=debug .. | ||
- name: build | ||
run: cmake --build build | ||
- name: test | ||
run: cd build && ctest | ||
|
||
|
||
build-windows: | ||
|
||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Checkout submodules | ||
shell: bash | ||
run: | | ||
auth_header="$(git config --local --get http.https://github.com/.extraheader)" | ||
git submodule sync --recursive | ||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 | ||
- name: configure | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake .. | ||
- name: build | ||
run: cmake --build build | ||
- name: test | ||
run: | | ||
cd build | ||
set CTEST_OUTPUT_ON_FAILURE=1 | ||
ctest -C Debug |