New scenegraph keyword #129
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: Builds | |
on: | |
# Do it on every push or PR on these branches | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# Do build on demand | |
workflow_dispatch: | |
jobs: | |
build: | |
# The CMake configure and build commands are platform agnostic and should work equally | |
# well on Windows or Mac. You can convert this to a matrix build if you need | |
# cross-platform coverage. | |
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
name: "${{matrix.title}} (${{matrix.cc}}, ${{matrix.arch}}, ${{matrix.build_type}})" | |
runs-on: ${{matrix.os}} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { title: "Linux", os: "ubuntu-latest", cc: "clang", arch: "x64", build_type: "Release", package_type: "x64-linux", script: "sh" } | |
- { title: "Linux", os: "ubuntu-latest", cc: "clang", arch: "x64", build_type: "Debug", package_type: "x64-linux", script: "sh" } | |
- { title: "Linux", os: "ubuntu-latest", cc: "gcc", cxx: "g++", arch: "x64", build_type: "Release", package_type: "x64-linux", script: "sh" } | |
- { title: "Linux", os: "ubuntu-latest", cc: "gcc", cxx: "g++", arch: "x64", build_type: "Debug", package_type: "x64-linux", script: "sh" } | |
- { title: "Windows", os: "windows-latest", cc: "vs2022", arch: "x64", build_type: "Release", package_type: "x64-windows-static-md", script: "bat" } | |
- { title: "Windows", os: "windows-latest", cc: "vs2022", arch: "x64", build_type: "Debug", package_type: "x64-windows-static-md", script: "bat" } | |
- { title: "Mac", os: "macos-latest", cc: "clang", cxx: "clang++", arch: "x64", build_type: "Release", package_type: "x64-osx", script: "sh" } | |
- { title: "Mac", os: "macos-latest", cc: "clang", cxx: "clang++", arch: "x64", build_type: "Debug", package_type: "x64-osx", script: "sh" } | |
#- { title: "Coverage", os: "ubuntu-latest", cc: "clang", cxx: "clang++", arch: "x64", build_type: "Coverage", package_type: "x64-linux", script: "sh" } | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies on ubuntu | |
run: | | |
sudo apt-get update | |
sudo apt-get install cmake | |
cmake --version | |
gcc --version | |
if: matrix.title == 'Linux' | |
- name: Install dependencies on macos | |
run: | | |
brew install cmake | |
cmake --version | |
if: matrix.title == 'Mac' | |
- name: Install GL | |
env: | |
CC: ${{ matrix.cc}} | |
run: | | |
sudo apt-get install freeglut3-dev | |
sudo apt-get install lcov | |
if: matrix.os == 'ubuntu-latest' | |
- name: Build | |
working-directory: ${{github.workspace}} | |
run: | | |
git submodule update --init | |
./prebuild.${{matrix.script}} | |
mkdir build | |
cd build | |
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
cmake --build . --config ${{ matrix.build_type }} | |
if: matrix.build_type != 'Coverage' | |
- name: Build (Coverage) | |
working-directory: ${{github.workspace}} | |
run: | | |
git submodule update --init | |
./prebuild.${{matrix.script}} | |
mkdir build | |
cd build | |
cmake .. -DENABLE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug | |
cmake --build . --config Debug | |
if: matrix.build_type == 'Coverage' | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
run: ctest -C ${{ matrix.build_type }} | |
- name: Coverage | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
if: matrix.build_type == 'Coverage' | |
env: | |
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
run: | | |
bash <(curl -s https://codecov.io/bash) | |
find .. -name *.gcno | xargs gcov | |
lcov -c -d .. -o coverage.info | |
lcov --remove coverage.info '/usr/local/include/*' '/usr/include/*' 'build' 'm3rdparty' 'cmake' 'scripts' -o coverage.info | |
genhtml coverage.info | |
bash <(curl -Ls https://coverage.codacy.com/get.sh) report -r coverage.info | |
- name: Archive Coverage HTML | |
uses: actions/upload-artifact@v2 | |
if: matrix.build_type == 'Coverage' | |
with: | |
name: Coverag_Report | |
path: | | |
${{github.workspace}}/build/**/*.html | |
${{github.workspace}}/build/**/*.css | |
- name: Archive Binary | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Archive_${{matrix.title}}_${{matrix.build_type}} | |
path: | | |
!${{github.workspace}}/**/CMakeFiles/** | |
${{github.workspace}}/build/**/*.exe | |
${{github.workspace}}/build/**/*.app | |
${{github.workspace}}/build/**/ZepDemo | |
${{github.workspace}}/build/**/ZepDemo-qt | |
${{github.workspace}}/build/**/unittests | |