CI #1
This file contains hidden or 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: CI | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| windows: | |
| name: Windows | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| config: [Debug, Release] | |
| arch: [x64, Win32] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure CMake | |
| run: | | |
| cmake -B Build -A ${{ matrix.arch }} | |
| - name: Build | |
| run: | | |
| cmake --build Build --config ${{ matrix.config }} | |
| - name: Test | |
| working-directory: Build | |
| run: | | |
| ctest -C ${{ matrix.config }} --output-on-failure --verbose | |
| macos: | |
| name: macOS | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| config: [Debug, Release] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure CMake | |
| run: | | |
| cmake -B Build -G Xcode | |
| - name: Build | |
| run: | | |
| cmake --build Build --config ${{ matrix.config }} | |
| - name: Test | |
| working-directory: Build | |
| run: | | |
| ctest -C ${{ matrix.config }} --output-on-failure --verbose | |
| ios: | |
| name: iOS | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| config: [Debug, Release] | |
| platform: [iphoneos, iphonesimulator] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure CMake for iOS | |
| run: | | |
| cmake -B Build -G Xcode \ | |
| -DCMAKE_SYSTEM_NAME=iOS \ | |
| -DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 \ | |
| -DCMAKE_XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH=NO \ | |
| -DCMAKE_IOS_INSTALL_COMBINED=YES | |
| - name: Build for ${{ matrix.platform }} | |
| run: | | |
| cmake --build Build --config ${{ matrix.config }} -- -sdk ${{ matrix.platform }} | |
| android: | |
| name: Android | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| config: [Debug, Release] | |
| abi: [armeabi-v7a, arm64-v8a, x86, x86_64] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Android NDK | |
| uses: nttld/setup-ndk@v1 | |
| with: | |
| ndk-version: r25c | |
| add-to-path: false | |
| - name: Configure CMake for Android | |
| run: | | |
| cmake -B Build \ | |
| -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake \ | |
| -DANDROID_ABI=${{ matrix.abi }} \ | |
| -DANDROID_PLATFORM=android-21 \ | |
| -DCMAKE_BUILD_TYPE=${{ matrix.config }} | |
| env: | |
| ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }} | |
| - name: Build | |
| run: | | |
| cmake --build Build --config ${{ matrix.config }} | |
| linux: | |
| name: Linux | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| config: [Debug, Release] | |
| compiler: [gcc-11, clang-14] | |
| include: | |
| - compiler: gcc-11 | |
| cc: gcc-11 | |
| cxx: g++-11 | |
| - compiler: clang-14 | |
| cc: clang-14 | |
| cxx: clang++-14 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ${{ matrix.cc }} ${{ matrix.cxx }} | |
| - name: Configure CMake | |
| run: | | |
| cmake -B Build \ | |
| -DCMAKE_BUILD_TYPE=${{ matrix.config }} \ | |
| -DCMAKE_C_COMPILER=${{ matrix.cc }} \ | |
| -DCMAKE_CXX_COMPILER=${{ matrix.cxx }} | |
| - name: Build | |
| run: | | |
| cmake --build Build --config ${{ matrix.config }} | |
| - name: Test | |
| working-directory: Build | |
| run: | | |
| ctest -C ${{ matrix.config }} --output-on-failure --verbose |