Add windows msvc support #84
Workflow file for this run
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
name: build | |
on: [pull_request, workflow_dispatch] | |
jobs: | |
build-ubuntu: | |
name: Build Ubuntu and Test | |
runs-on: ubuntu-latest | |
container: | |
image: ubuntu:latest | |
env: | |
TZ: America/New_York | |
DEBIAN_FRONTEND: noninteractive | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: apt | |
run: | | |
apt-get update | |
apt-get -y upgrade | |
apt install -y build-essential software-properties-common | |
add-apt-repository ppa:ubuntu-toolchain-r/test | |
apt-get install -y \ | |
cmake \ | |
git \ | |
ninja-build \ | |
g++ \ | |
clang | |
- name: build-release-g++ | |
run: | | |
mkdir build-release-g++ | |
cd build-release-g++ | |
cmake \ | |
-GNinja \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_C_COMPILER=gcc \ | |
-DCMAKE_CXX_COMPILER=g++ \ | |
.. | |
ninja | |
- name: build-release-clang | |
run: | | |
mkdir build-release-clang | |
cd build-release-clang | |
cmake \ | |
-GNinja \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_C_COMPILER=clang \ | |
-DCMAKE_CXX_COMPILER=clang++ \ | |
.. | |
ninja | |
- name: test-release-g++ | |
run: | | |
cd build-release-g++ | |
ctest -VV | |
- name: test-release-clang | |
run: | | |
cd build-release-clang | |
ctest -VV | |
build-fedora: | |
name: Build Fedora and Test | |
runs-on: ubuntu-latest | |
container: | |
image: fedora:latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: dnf | |
run: | | |
sudo dnf install -y \ | |
git \ | |
cmake \ | |
ninja-build \ | |
g++ \ | |
clang \ | |
lcov | |
- name: build-debug-g++ | |
run: | | |
mkdir build-debug-g++ | |
cd build-debug-g++ | |
cmake \ | |
-GNinja \ | |
-DCAPPUCCINO_CODE_COVERAGE=ON \ | |
-DCMAKE_BUILD_TYPE=Debug \ | |
-DCMAKE_C_COMPILER=gcc \ | |
-DCMAKE_CXX_COMPILER=g++ \ | |
.. | |
ninja | |
- name: build-release-g++ | |
run: | | |
mkdir build-release-g++ | |
cd build-release-g++ | |
cmake \ | |
-GNinja \ | |
-DCAPPUCCINO_CODE_COVERAGE=ON \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_C_COMPILER=gcc \ | |
-DCMAKE_CXX_COMPILER=g++ \ | |
.. | |
ninja | |
- name: build-release-clang | |
run: | | |
mkdir build-release-clang | |
cd build-release-clang | |
cmake \ | |
-GNinja \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_C_COMPILER=clang \ | |
-DCMAKE_CXX_COMPILER=clang++ \ | |
.. | |
ninja | |
- name: test-release-g++ | |
run: | | |
cd build-release-g++ | |
ctest -VV | |
- name: test-release-clang | |
run: | | |
cd build-release-clang | |
ctest -VV | |
- name: Build coverage info | |
run: | | |
cd build-debug-g++ | |
ctest -VV | |
gcov -o ./test/CMakeFiles/libcappuccino_tests.dir/main.cpp.o ./test/libcappuccino_tests | |
lcov --include "*/inc/cappuccino/*" --include "*/src/*" --exclude "test/*" -o libcappuccino_tests.info -c -d . | |
- name: Coveralls GitHub Action | |
uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: build-debug-g++/libcappuccino_tests.info | |
build-windows: | |
name: windows | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: build-release-cl | |
run: | | |
mkdir build-release-cl | |
cd build-release-cl | |
cmake .. | |
cmake --build . --config Release | |
- name: test-release-cl | |
run: | | |
cd build-release-cl | |
ctest --build-config Release -VV |