feat: supports iOS platform #639
Workflow file for this run
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: zero | |
| on: [ push ] | |
| jobs: | |
| linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install LLVM | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 19 | |
| sudo apt install -y libc++abi-19-dev libc++-19-dev | |
| - name: Setup vcpkg | |
| uses: lukka/run-vcpkg@v11 | |
| env: | |
| VCPKG_BINARY_SOURCES: default,rw | |
| - name: Setup vcpkg binary cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} | |
| key: ${{ runner.os }}-vcpkg-binary-cache-${{ hashFiles('vcpkg*.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-vcpkg-binary-cache- | |
| - name: Build and test | |
| uses: lukka/run-cmake@v10 | |
| with: | |
| configurePreset: debug-asan | |
| configurePresetAdditionalArgs: "['-DVCPKG_TARGET_TRIPLET=x64-linux-dynamic']" | |
| buildPreset: debug-asan | |
| testPreset: debug-asan | |
| env: | |
| CC: clang-19 | |
| CXX: clang++-19 | |
| CXXFLAGS: -stdlib=libc++ | |
| linux-static: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install musl toolchains | |
| run: curl -fsSL https://github.com/Hackerl/musl-cross-make/releases/download/gcc-15.2.0/x86_64-linux-musl-native-gcc15.2.0.tar.gz | tar -xz -C /opt | |
| - name: Setup vcpkg | |
| uses: lukka/run-vcpkg@v11 | |
| env: | |
| VCPKG_BINARY_SOURCES: default,rw | |
| - name: Setup vcpkg binary cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} | |
| key: ${{ runner.os }}-vcpkg-binary-cache-${{ hashFiles('vcpkg*.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-vcpkg-binary-cache- | |
| - name: Build and test | |
| uses: lukka/run-cmake@v10 | |
| with: | |
| configurePreset: debug | |
| configurePresetAdditionalArgs: "['-DCMAKE_EXE_LINKER_FLAGS=-static-pie']" | |
| buildPreset: debug | |
| testPreset: debug | |
| env: | |
| CC: /opt/x86_64-linux-musl-native-gcc15.2.0/bin/x86_64-linux-musl-gcc | |
| CXX: /opt/x86_64-linux-musl-native-gcc15.2.0/bin/x86_64-linux-musl-g++ | |
| windows: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup vcpkg | |
| uses: lukka/run-vcpkg@v11 | |
| env: | |
| VCPKG_BINARY_SOURCES: default,rw | |
| - name: Setup vcpkg binary cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} | |
| key: ${{ runner.os }}-vcpkg-binary-cache-${{ hashFiles('vcpkg*.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-vcpkg-binary-cache- | |
| - name: Create custom triplet | |
| run: | | |
| Set-Content x64-windows-sanitizer.cmake @" | |
| set(VCPKG_TARGET_ARCHITECTURE x64) | |
| set(VCPKG_CRT_LINKAGE dynamic) | |
| set(VCPKG_LIBRARY_LINKAGE dynamic) | |
| set(VCPKG_C_FLAGS "-fsanitize=address") | |
| set(VCPKG_CXX_FLAGS "-fsanitize=address") | |
| "@ | |
| - name: Build and test | |
| uses: lukka/run-cmake@v10 | |
| with: | |
| configurePreset: debug-asan | |
| configurePresetAdditionalArgs: "[String.raw`-DVCPKG_OVERLAY_TRIPLETS=${{ github.workspace }}`, '-DVCPKG_TARGET_TRIPLET=x64-windows-sanitizer']" | |
| buildPreset: debug-asan | |
| testPreset: debug-asan | |
| windows-32: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup vcpkg | |
| uses: lukka/run-vcpkg@v11 | |
| env: | |
| VCPKG_BINARY_SOURCES: default,rw | |
| - name: Setup vcpkg binary cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} | |
| key: ${{ runner.os }}-vcpkg-binary-cache-${{ hashFiles('vcpkg*.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-vcpkg-binary-cache- | |
| - name: Create custom triplet | |
| run: | | |
| Set-Content x86-windows-sanitizer.cmake @" | |
| set(VCPKG_TARGET_ARCHITECTURE x86) | |
| set(VCPKG_CRT_LINKAGE dynamic) | |
| set(VCPKG_LIBRARY_LINKAGE dynamic) | |
| set(VCPKG_C_FLAGS "-fsanitize=address") | |
| set(VCPKG_CXX_FLAGS "-fsanitize=address") | |
| "@ | |
| - name: Build and test | |
| uses: lukka/run-cmake@v10 | |
| with: | |
| configurePreset: debug-asan | |
| configurePresetAdditionalArgs: "['-A Win32', String.raw`-DVCPKG_OVERLAY_TRIPLETS=${{ github.workspace }}`, '-DVCPKG_TARGET_TRIPLET=x86-windows-sanitizer']" | |
| buildPreset: debug-asan | |
| testPreset: debug-asan | |
| env: | |
| VCPKG_DEFAULT_TRIPLET: x86-windows | |
| macos: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup vcpkg | |
| uses: lukka/run-vcpkg@v11 | |
| env: | |
| VCPKG_BINARY_SOURCES: default,rw | |
| - name: Setup vcpkg binary cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} | |
| key: ${{ runner.os }}-vcpkg-binary-cache-${{ hashFiles('vcpkg*.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-vcpkg-binary-cache- | |
| - name: Build and test | |
| uses: lukka/run-cmake@v10 | |
| with: | |
| configurePreset: debug-asan | |
| configurePresetAdditionalArgs: "['-DVCPKG_TARGET_TRIPLET=arm64-osx-dynamic']" | |
| buildPreset: debug-asan | |
| testPreset: debug-asan | |
| env: | |
| SDKROOT: macosx | |
| ios: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup vcpkg | |
| uses: lukka/run-vcpkg@v11 | |
| env: | |
| VCPKG_BINARY_SOURCES: default,rw | |
| - name: Setup vcpkg binary cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} | |
| key: ${{ runner.os }}-vcpkg-binary-cache-${{ hashFiles('vcpkg*.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-vcpkg-binary-cache- | |
| - name: Build | |
| uses: lukka/run-cmake@v10 | |
| with: | |
| configurePreset: debug-asan | |
| configurePresetAdditionalArgs: "['-DCMAKE_SYSTEM_NAME=iOS', '-DCMAKE_CATCH_DISCOVER_TESTS_DISCOVERY_MODE=PRE_TEST']" | |
| buildPreset: debug-asan | |
| env: | |
| SDKROOT: iphoneos | |
| android: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| api: [ 28, 34 ] | |
| platform: | |
| - abi: arm64-v8a | |
| triplet: arm64-android | |
| - abi: armeabi-v7a | |
| triplet: arm-neon-android | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup NDK | |
| uses: nttld/setup-ndk@v1 | |
| id: setup-ndk | |
| with: | |
| ndk-version: r27c | |
| - name: Setup vcpkg | |
| uses: lukka/run-vcpkg@v11 | |
| env: | |
| VCPKG_BINARY_SOURCES: default,rw | |
| - name: Setup vcpkg binary cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }} | |
| key: ${{ runner.os }}-vcpkg-binary-cache-${{ hashFiles('vcpkg*.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-vcpkg-binary-cache- | |
| - name: Build | |
| uses: lukka/run-cmake@v10 | |
| with: | |
| configurePreset: debug-asan | |
| configurePresetAdditionalArgs: "['-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake', '-DVCPKG_TARGET_TRIPLET=${{ matrix.platform.triplet }}', '-DANDROID_ABI=${{ matrix.platform.abi }}', '-DANDROID_PLATFORM=android-${{ matrix.api }}', '-DCMAKE_CATCH_DISCOVER_TESTS_DISCOVERY_MODE=PRE_TEST']" | |
| buildPreset: debug-asan | |
| env: | |
| ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} |