Skip to content

chore(ci): update darwin runner #1450

chore(ci): update darwin runner

chore(ci): update darwin runner #1450

Workflow file for this run

name: CI Test
on:
pull_request:
branches:
- main
paths:
- '.github/workflows/ci.yml'
- '.github/workflows/size-check.yml'
- '.github/workflows/size-report.yml'
- 'tools/size_report.py'
- '.github/actions/**'
- 'include/**'
- 'src/**'
- 'module/**'
- 'test/**'
- 'cmake/**'
- 'patches/**'
- 'CMakeLists.txt'
- 'platform/**'
- 'harness/**'
push:
branches:
- main
paths:
- '.github/workflows/ci.yml'
- '.github/workflows/size-check.yml'
- '.github/workflows/size-report.yml'
- 'tools/size_report.py'
- '.github/actions/**'
- 'include/**'
- 'src/**'
- 'module/**'
- 'test/**'
- 'cmake/**'
- 'patches/**'
- 'CMakeLists.txt'
- 'platform/**'
- 'harness/**'
jobs:
unittest_test:
runs-on: lynx-ubuntu-22.04-medium
timeout-minutes: 30
permissions:
issues: write
steps:
- name: Python Setup
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Download Source
uses: actions/checkout@v4.2.2
- name: Sync Dependencies
uses: ./.github/actions/sync-deps
- name: Compile Code
run: |
export PATH=$PWD/buildtools/llvm/bin:$PATH
cmake -B out/cmake_host_build -DSKITY_TEST=ON -DSKITY_TEST_UT=ON -DSKITY_TEST_BENCH=OFF -DSKITY_TEST_GOLDEN=OFF -DSKITY_TEST_TSAN=ON -DSKITY_VK_BACKEND=ON -DSKITY_TEST_COVERAGE=OFF -DSKITY_CODEC_MODULE=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_FLAGS="-fPIC"
cmake --build out/cmake_host_build --target skity_unit_test skity_vulkan_unit_test
- name: Unit Test
run: |
cd out/cmake_host_build/test/ut/
ctest --output-junit test.xml --rerun-failed --output-on-failure
- name: Vulkan Unit Test
env:
VK_ICD_FILENAMES: ${{ github.workspace }}/third_party/libSwiftShader/vk_swiftshader_icd.json
run: |
cd out/cmake_host_build/test/ut/
ctest --output-junit vk_test.xml -R skity_vulkan_unit_test --rerun-failed --output-on-failure
unittest_coverage:
runs-on: ubuntu-22.04
timeout-minutes: 30
permissions:
issues: write
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y lcov
- name: Python Setup
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Download Source
uses: actions/checkout@v4.2.2
- name: Sync Dependencies
uses: ./.github/actions/sync-deps
- name: Compile Code
run: |
export PATH=$PWD/buildtools/llvm/bin:$PATH
cmake -B out/cmake_host_build -DSKITY_TEST=ON -DSKITY_VK_BACKEND=ON -DSKITY_TEST_COVERAGE=ON -DSKITY_CODEC_MODULE=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_FLAGS="-fPIC"
cmake --build out/cmake_host_build --target skity_unit_test skity_vulkan_unit_test
- name: Test and Generate Coverage Report
env:
VK_ICD_FILENAMES: ${{ github.workspace }}/third_party/libSwiftShader/vk_swiftshader_icd.json
run: |
cd out/cmake_host_build/test/ut/
ctest --output-junit test.xml --rerun-failed --output-on-failure
ctest --output-junit vk_test.xml -R skity_vulkan_unit_test --rerun-failed --output-on-failure
cd ../../
lcov --capture --directory . --output-file coverage.info
lcov --remove coverage.info '/usr/**/*' 'test/ut/**/*' 'third_party/**/*' 'Library/*' '**/clipper2/*' --output-file coverage.filtered.info
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
disable_search: true
files: out/cmake_host_build/coverage.filtered.info
- name: Upload test results to Codecov
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: "out/cmake_host_build/test/ut"
files: out/cmake_host_build/test/ut/test.xml out/cmake_host_build/test/ut/vk_test.xml
android_build_check:
runs-on: lynx-ubuntu-22.04-medium
timeout-minutes: 30
steps:
- name: Python Setup
uses: actions/setup-python@v5
with:
python-version: '3.13'
- uses: actions/setup-java@v4
with:
distribution: 'jetbrains'
java-version: '21'
- name: Download Source
uses: actions/checkout@v4.2.2
- name: Sync Dependencies
uses: ./.github/actions/sync-deps
with:
target: module,ci
- name: Android Build Check
uses: ./.github/actions/pack-android-aar
ios_build_check:
runs-on: lynx-darwin-15.6.1-medium
timeout-minutes: 30
steps:
- name: Download Source
uses: actions/checkout@v4.2.2
- name: Install Common Dependencies
uses: ./.github/actions/sync-deps
with:
cache-backend: 'lynx-infra'
- name: Run iOS build
run: |
export PATH=$PATH:$PWD/buildtools/cmake/CMake.app/Contents/bin
echo "PATH=$PATH" >> "$GITHUB_ENV"
# capi ships inside the static skity_framework (see gen-xcframework
# below). The standalone libskity-capi dylib is not built on iOS:
# skity does not export symbols there (SKITY_DLL is off on iOS),
# so linking the dylib fails with undefined symbols.
cmake -B out/cmake_ios_release -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DCMAKE_SYSTEM_NAME=iOS -DSKITY_MTL_BACKEND=ON -DSKITY_CT_FONT=ON -DSKITY_CODEC_MODULE=OFF -DSKITY_CAPI_MODULE=OFF
cmake --build out/cmake_ios_release
- name: check build xcframework
uses: ./.github/actions/gen-xcframework
with:
version_suffix: '-test'
wasm_build_check:
runs-on: lynx-ubuntu-22.04-medium
timeout-minutes: 30
steps:
- name: Download Source
uses: actions/checkout@v4.2.2
- name: Sync Dependencies
run: |
./tools/hab sync -f
- name: Install emscripten
uses: ./.github/actions/install-emsdk
with:
emsdk-version-file: './.github/actions/install-emsdk/emsdk-version.txt'
- name: Run Build
run: |
emcmake cmake -B out/cmake_wasm -DSKITY_EXAMPLE=OFF -DSKITY_TEST=OFF -DSKITY_CODEC_MODULE=OFF -DSKITY_LOG=ON
cd out/cmake_wasm
emmake make skity
windows_build_check:
runs-on: lynx-windows-2022-large
timeout-minutes: 30
steps:
- name: Download Source
uses: actions/checkout@v4.2.2
- name: Sync Dependencies
run: |
powershell -File "./tools/hab.ps1" sync -f --target dev,module,ci
- name: Print Windows SDK Versions
run: |
Write-Host "Installed Windows SDK Include versions:"
Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\Include" -Directory | Select-Object -ExpandProperty Name
Write-Host "Installed Windows SDK Lib versions:"
Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\Lib" -Directory | Select-Object -ExpandProperty Name
Write-Host "Installed Windows SDK bin versions:"
Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\bin" -Directory | Select-Object -ExpandProperty Name
- name: Run Build
run: |
$WindowsSdkVersion = Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\Include" -Directory | Where-Object { $_.Name -match '^\d+\.\d+\.\d+\.\d+$' } | Sort-Object { [version]$_.Name } -Descending | Select-Object -First 1 -ExpandProperty Name
Write-Host "Using Windows SDK version: $WindowsSdkVersion"
./buildtools/cmake/bin/cmake -B out/cmake_host_build -DCMAKE_SYSTEM_VERSION=$WindowsSdkVersion -DSKITY_EXAMPLE=ON -DCMAKE_BUILD_TYPE=Debug -DSKITY_CODEC_MODULE=ON -DSKITY_TEST=ON -DWGX_SPIRV_BACKEND=ON -DCMAKE_POLICY_VERSION_MINIMUM='3.5'
Select-String -Path out/cmake_host_build/skity.vcxproj -Pattern "WindowsTargetPlatformVersion"
./buildtools/cmake/bin/cmake --build out/cmake_host_build --target skity_unit_test
cd out/cmake_host_build/Debug
./skity_unit_test --gtest_color=no --gtest_print_time=1
osx_metal_golden_test:
runs-on: lynx-darwin-15.6.1-medium
timeout-minutes: 30
env:
ANGLE_DEFAULT_PLATFORM: "swiftshader"
steps:
- name: Download Source
uses: actions/checkout@v4.2.2
- name: Install Common Dependencies
uses: ./.github/actions/sync-deps
with:
cache-backend: 'lynx-infra'
- name: Set Up Environment
run: |
if [ -z "$DYLD_LIBRARY_PATH" ]; then
NEW_DYLD="$GITHUB_WORKSPACE/third_party/libSwAngle/lib"
else
NEW_DYLD="$DYLD_LIBRARY_PATH:$GITHUB_WORKSPACE/third_party/libSwAngle/lib"
fi
echo "DYLD_LIBRARY_PATH=$NEW_DYLD" >> $GITHUB_ENV
- name: Build And Test
run: |
export PATH=$PATH:$PWD/buildtools/cmake/CMake.app/Contents/bin
cmake -B out/cmake_golden_test -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DSKITY_MTL_BACKEND=ON -DSKITY_VK_BACKEND=ON -DSKITY_TEST=ON -DSKITY_GOLDEN_GUI=OFF -DSKITY_VK_TEST_USE_SYSTEM_LOADER=OFF
cmake --build out/cmake_golden_test --target skity_golden_test_shape skity_golden_test_text
export MTL_DEBUG_LAYER=1
export METAL_DEBUG_ERROR_MODE=1
./out/cmake_golden_test/test/golden/skity_golden_test_shape
./out/cmake_golden_test/test/golden/skity_golden_test_text
- name: Run Experimental GL Golden Test
run: |
./out/cmake_golden_test/test/golden/skity_golden_test_shape --backend gl
- name: Run Vulkan Golden Test
run: |
./out/cmake_golden_test/test/golden/skity_golden_test_shape --backend vulkan
./out/cmake_golden_test/test/golden/skity_golden_test_text --backend vulkan
osx_metal_golden_test_ct:
runs-on: lynx-darwin-15.6.1-medium
timeout-minutes: 30
env:
ANGLE_DEFAULT_PLATFORM: "swiftshader"
steps:
- name: Download Source
uses: actions/checkout@v4.2.2
- name: Install Common Dependencies
uses: ./.github/actions/sync-deps
with:
cache-backend: 'lynx-infra'
- name: Set Up Environment
run: |
if [ -z "$DYLD_LIBRARY_PATH" ]; then
NEW_DYLD="$GITHUB_WORKSPACE/third_party/libSwAngle/lib"
else
NEW_DYLD="$DYLD_LIBRARY_PATH:$GITHUB_WORKSPACE/third_party/libSwAngle/lib"
fi
echo "DYLD_LIBRARY_PATH=$NEW_DYLD" >> $GITHUB_ENV
- name: Build And Test
run: |
export PATH=$PATH:$PWD/buildtools/cmake/CMake.app/Contents/bin
cmake -B out/cmake_golden_test -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DSKITY_MTL_BACKEND=ON -DSKITY_TEST=ON -DSKITY_GOLDEN_GUI=OFF -DSKITY_CT_FONT=ON
cmake --build out/cmake_golden_test --target skity_golden_test_text
export MTL_DEBUG_LAYER=1
export METAL_DEBUG_ERROR_MODE=1
python3 tools/test-runner.py --suite=golden-text --build-dir out/cmake_golden_test --run-only
- name: Upload CoreText Golden Failure Artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: coretext-golden-failures
path: out/cmake_golden_test/golden_failures/