Skip to content

build and run tests #192

build and run tests

build and run tests #192

Workflow file for this run

name: build and run tests
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
schedule:
- cron: '0 0 * * 0'
jobs:
linux:
runs-on: ${{ matrix.os }}
env:
CC: ${{ matrix.compiler }}
strategy:
matrix:
include:
- os: ubuntu-22.04
compiler: gcc-9
- os: ubuntu-22.04
compiler: gcc-10
- os: ubuntu-22.04
compiler: gcc-11
- os: ubuntu-22.04
compiler: clang-13
- os: ubuntu-22.04
compiler: clang-14
- os: ubuntu-22.04
compiler: clang-15
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: install dependencies
run: sudo apt-get update && sudo apt-get install -yq ninja-build cppcheck flawfinder binutils-gold libgl1-mesa-dev libegl1-mesa-dev libgles2-mesa-dev libx11-dev libwayland-dev libxcb1-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev libxcb-ewmh-dev libxcb-icccm4-dev libxcb-randr0-dev libxcb-util0-dev
- name: run ctest
run: ctest -VV -S ci-tools/run_ctest.cmake
emscripten:
runs-on: ubuntu-latest
container: emscripten/emsdk:latest
env:
CC: emcc
CMAKE_TOOLCHAIN_FILE: /emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: install dependencies
run: sudo apt-get update && sudo apt-get install -yq python3 ninja-build
- name: install cmake
run: python3 ci-tools/install_cmake.py
- name: run ctest
run: python3 ci-tools/run_ctest.py
macos:
runs-on: macos-latest
env:
CC: clang
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: install dependencies
run: brew update && brew install ninja cppcheck flawfinder
- name: run ctest
run: ctest -VV -S ci-tools/run_ctest.cmake
windows:
runs-on: windows-latest
env:
CC: cl
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ilammy/msvc-dev-cmd@v1
- name: install dependencies
shell: cmd
run: choco install --ignore-package-exit-codes ninja curl opencppcoverage cppcheck && refreshenv
- name: run ctest
shell: cmd
run: ctest -VV -S ci-tools/run_ctest.cmake
android:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
CC: clang
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: install dependencies
run: sudo apt-get update && sudo apt-get install -yq ninja-build
- name: enable kvm
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: run ctest
continue-on-error: true
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
arch: x86_64
script: CMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_LATEST_HOME}/build/cmake/android-legacy.toolchain.cmake CMAKE_ANDROID_ARCH_ABI=x86_64 ctest -VV -S ci-tools/run_ctest.cmake
android-examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: gradle/actions/wrapper-validation@v4
- name: build android examples
run: cd example/android && ./gradlew build
- name: upload debug apk
uses: actions/upload-artifact@v4
with:
name: app
path: example/android/app/build/outputs/apk/**/*.apk