feat #34: add screen capturer files for macOS #78
Workflow file for this run
This file contains 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
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform. | |
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml | |
name: ci-pr-on-main | |
on: | |
pull_request: | |
branches: [ "main", "dev" ] | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Debug | |
TEST_TIMEOUT: 300 # 5 minutes | |
jobs: | |
# Build on Ubuntu for linux | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '1' | |
lfs: 'true' | |
submodules: 'true' | |
- name: Set reusable strings | |
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file. | |
id: strings | |
shell: bash | |
run: | | |
echo "build-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
echo "build-output-dir=${{ github.workspace }}/bin" >> "$GITHUB_OUTPUT" | |
- name: Build | |
shell: bash | |
run: > | |
bash scripts/build.sh -p linux -a x86_64 | |
-t ${{env.BUILD_TYPE}} | |
-f ${{ steps.strings.outputs.build-dir }} | |
-b ${{ steps.strings.outputs.build-output-dir }} | |
-U ON | |
-S ON | |
- name: Unit Test | |
working-directory: ${{ steps.strings.outputs.build-dir }}/linux/x86_64/tests/unit_test | |
run: ASAN_OPTIONS=detect_leaks=1 ctest --build-config ${{env.BUILD_TYPE}} --output-on-failure --timeout ${{env.TEST_TIMEOUT}} | |
- name: Smoke Test | |
working-directory: ${{ steps.strings.outputs.build-dir }}/linux/x86_64/tests/smoke_test | |
run: ctest --build-config ${{env.BUILD_TYPE}} --output-on-failure --timeout ${{env.TEST_TIMEOUT}} | |
# Build on Windows for windows | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '1' | |
lfs: 'true' | |
submodules: 'true' | |
- name: Set reusable strings | |
id: strings | |
shell: bash | |
run: | | |
echo "build-output-dir=${{ github.workspace }}\\build" >> "$GITHUB_OUTPUT" | |
echo "build-dir=${{ github.workspace }}\\build" >> "$GITHUB_OUTPUT" | |
- name: Build | |
run: > | |
.\\scripts\\build.bat -a x64 | |
-t ${{env.BUILD_TYPE}} | |
-f ${{ steps.strings.outputs.build-dir }} | |
-b ${{ steps.strings.outputs.build-output-dir }} | |
-U ON | |
-S ON | |
- name: Unit Test | |
working-directory: ${{ steps.strings.outputs.build-dir }}\\x64\\tests/unit_test | |
run: ctest --build-config ${{env.BUILD_TYPE}} --output-on-failure --timeout ${{env.TEST_TIMEOUT}} | |
- name: Smoke Test | |
working-directory: ${{ steps.strings.outputs.build-dir }}\\x64\\tests\\smoke_test | |
run: ctest --build-config ${{env.BUILD_TYPE}} --output-on-failure --timeout ${{env.TEST_TIMEOUT}} | |
# Build on macOS for MAC_UNIVERSAL | |
build-macOS: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '1' | |
lfs: 'true' | |
submodules: 'true' | |
- name: Set reusable strings | |
id: strings | |
shell: bash | |
run: | | |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
echo "build-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
- name: Build | |
run: > | |
sh scripts/build.sh -p macos | |
-t ${{env.BUILD_TYPE}} | |
-f ${{ steps.strings.outputs.build-dir }} | |
-b ${{ steps.strings.outputs.build-output-dir }} | |
-U ON | |
-S ON | |
- name: Unit Test | |
working-directory: ${{ steps.strings.outputs.build-dir }}/macos/tests/unit_test | |
run: ctest --build-config ${{env.BUILD_TYPE}} --output-on-failure --timeout ${{env.TEST_TIMEOUT}} | |
- name: Smoke Test | |
working-directory: ${{ steps.strings.outputs.build-dir }}/macos/tests/smoke_test | |
run: ctest --build-config ${{env.BUILD_TYPE}} --output-on-failure --timeout ${{env.TEST_TIMEOUT}} | |
# Build on macOS for OS64COMBINED | |
build-iOS: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '1' | |
lfs: 'true' | |
submodules: 'true' | |
- name: Set reusable strings | |
id: strings | |
shell: bash | |
run: | | |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
echo "build-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
- name: Build | |
run: > | |
sh scripts/build.sh -p ios | |
-t ${{env.BUILD_TYPE}} | |
-f ${{ steps.strings.outputs.build-dir }} | |
-b ${{ steps.strings.outputs.build-output-dir }} | |
# Build on macOS for VISIONOSCOMBINED | |
build-xrOS: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '1' | |
lfs: 'true' | |
submodules: 'true' | |
- name: Set reusable strings | |
id: strings | |
shell: bash | |
run: | | |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
echo "build-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
- name: Build | |
run: > | |
sh scripts/build.sh -p xros | |
-t ${{env.BUILD_TYPE}} | |
-f ${{ steps.strings.outputs.build-dir }} | |
-b ${{ steps.strings.outputs.build-output-dir }} | |
# Build on Ubuntu for android | |
build-android: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '1' | |
lfs: 'true' | |
submodules: 'true' | |
- name: Set reusable strings | |
id: strings | |
shell: bash | |
run: | | |
echo "build-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
echo "build-output-dir=${{ github.workspace }}/bin" >> "$GITHUB_OUTPUT" | |
# The part of the most complex build script for android | |
# 1. Set up Java | |
# 2. Set up Android SDK | |
# 3. Build for android | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
cache: 'gradle' | |
cache-dependency-path: | | |
projects/android/.gradle | |
- uses: android-actions/setup-android@v3 | |
- uses: nttld/setup-ndk@v1.5.0 | |
with: | |
ndk-version: r21e | |
local-cache: true | |
- name: Build for android | |
shell: bash | |
run: > | |
bash scripts/build.sh -p android | |
-t ${{ env.BUILD_TYPE }} | |
-f ${{ steps.strings.outputs.build-dir }} | |
-b ${{ steps.strings.outputs.build-output-dir }} |