Skip to content

chore: creating version 2.13 #84

chore: creating version 2.13

chore: creating version 2.13 #84

Workflow file for this run

name: Test
on:
push:
branches:
- '*'
- '*/**'
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- 'LICENSE'
- 'doc/**'
- 'tools/**'
env:
BUILD_TYPE: Release
NDK_VER: 21.3.6528147
NDK_ARCH: x86_64
NDK_API: 29
jobs:
desktop:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
- os: windows-latest
- os: ubuntu-latest
cc: gcc-11
cxx: g++-11
- os: ubuntu-latest
cc: gcc-12
cxx: g++-12
- os: ubuntu-latest
cc: gcc-13
cxx: g++-13
# See https://github.com/actions/runner-images/issues/8659
# - os: ubuntu-latest
# cc: clang-13
# cxx: clang++-13
# - os: ubuntu-latest
# cc: clang-14
# cxx: clang++-14
- os: ubuntu-latest
cc: clang-15
cxx: clang++-15
steps:
- name: Checkout
uses: actions/checkout@v3
- name: System Setup
shell: bash
run: |
if [[ '${{ matrix.os }}' == 'ubuntu-latest' ]]; then
if [[ '${{ matrix.cc }}' == 'clang-15' ]]; then
sudo apt-get update
sudo apt-get install -y clang-15 clang++-15
fi
if [[ '${{ matrix.cc }}' == 'gcc-12' ]]; then
sudo apt-get update
sudo apt-get install -y gcc-12 g++-12
fi
if [[ '${{ matrix.cc }}' == 'gcc-13' ]]; then
sudo apt-get update
sudo apt-get install -y gcc-13 g++-13
fi
fi
- name: Configure
shell: bash
run: |
if [[ '${{ matrix.cc }}' != '' ]]; then
export CC=${{ matrix.cc }}
fi
if [[ '${{ matrix.cxx }}' != '' ]]; then
export CXX=${{ matrix.cxx }}
fi
cmake -S . -B out -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build and Test
shell: bash
run: cmake --build out --config $BUILD_TYPE --target run-test
android:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: AVD cache
uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{env.NDK_VER}}-${{env.NDK_ARCH}}-${{env.NDK_API}}
- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{env.NDK_API}}
arch: ${{env.NDK_ARCH}}
target: google_apis
ndk: ${{env.NDK_VER}}
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."
- name: Configure, Build and Test
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{env.NDK_API}}
arch: ${{env.NDK_ARCH}}
target: google_apis
ndk: ${{env.NDK_VER}}
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: |
echo "::group::Configure"
cmake -S . -B out -DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE:FILEPATH=$ANDROID_SDK_ROOT/ndk/$NDK_VER/build/cmake/android.toolchain.cmake -DANDROID_ABI:STRING=$NDK_ARCH -DANDROID_PLATFORM:STRING=19 -DANDROID_STL:STRING=c++_static
echo "::endgroup::"
echo "::group::Build and Test"
cmake --build out --config $BUILD_TYPE --target run-test
echo "::endgroup::"
emscripten:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Up Emscripten
uses: mymindstorm/setup-emsdk@v12
with:
version: 3.1.26
actions-cache-folder: 'emsdk-cache'
- name: Configure
shell: bash
run: cmake -S . -B out -DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build and Test
shell: bash
run: cmake --build out --config $BUILD_TYPE --target run-test