Create dependabot.yml #40
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 | |
| # Runs on PRs and pushes to main when source/build files change. | |
| # GitHub natively supports [skip ci] in commit messages to skip a run. | |
| on: | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: | |
| - '**.md' | |
| - 'LICENSE' | |
| - '.gitignore' | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - '**.md' | |
| - 'LICENSE' | |
| - '.gitignore' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Desktop: Release on all platforms, Debug on Linux only (catches asserts + debug iterators) | |
| desktop: | |
| name: ${{ matrix.os }} (${{ matrix.build_type }}) | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| build_type: [Release] | |
| include: | |
| - os: ubuntu-latest | |
| build_type: Debug | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install dependencies (Ubuntu) | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get install -y uuid-dev | |
| - name: Cache FetchContent dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: build/_deps | |
| key: ${{ matrix.os }}-deps-${{ hashFiles('tests/CMakeLists.txt') }} | |
| - name: Configure | |
| run: > | |
| cmake -B build | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
| -DMAU_UUID_BUILD_TESTS=ON | |
| -DMAU_UUID_BUILD_EXAMPLE=ON | |
| - name: Build | |
| run: cmake --build build --config ${{ matrix.build_type }} | |
| - name: Test | |
| run: ctest --test-dir build -C ${{ matrix.build_type }} --output-on-failure | |
| # Android: cross-compile with NDK (build only — no device to run tests) | |
| android: | |
| name: Android (${{ matrix.abi }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| abi: [arm64-v8a, armeabi-v7a, x86_64] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Cache FetchContent dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: build/_deps | |
| key: android-${{ matrix.abi }}-deps-${{ hashFiles('tests/CMakeLists.txt') }} | |
| - name: Configure | |
| run: > | |
| cmake -B build | |
| -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake | |
| -DANDROID_ABI=${{ matrix.abi }} | |
| -DANDROID_PLATFORM=android-24 | |
| -DCMAKE_BUILD_TYPE=Release | |
| -DMAU_UUID_BUILD_EXAMPLE=ON | |
| -DMAU_UUID_BUILD_TESTS=ON | |
| - name: Build | |
| run: cmake --build build | |
| # iOS: cross-compile with Xcode toolchain (build only — no device to run tests) | |
| ios: | |
| name: iOS (${{ matrix.arch }}) | |
| runs-on: macos-latest | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: [arm64, x86_64] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Cache FetchContent dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: build/_deps | |
| key: ios-${{ matrix.arch }}-deps-${{ hashFiles('tests/CMakeLists.txt') }} | |
| - name: Configure | |
| run: > | |
| cmake -B build | |
| -G Xcode | |
| -DCMAKE_SYSTEM_NAME=iOS | |
| -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} | |
| -DCMAKE_OSX_DEPLOYMENT_TARGET=15.0 | |
| -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO | |
| -DMAU_UUID_BUILD_EXAMPLE=ON | |
| -DMAU_UUID_BUILD_TESTS=ON | |
| - name: Build | |
| run: cmake --build build --config Release |