Skip to content

Commit

Permalink
Add ios
Browse files Browse the repository at this point in the history
  • Loading branch information
kunitoki committed Dec 16, 2024
1 parent 6d26145 commit 5dc0613
Showing 1 changed file with 73 additions and 19 deletions.
92 changes: 73 additions & 19 deletions .github/workflows/build_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
DEVELOPER_DIR: /Applications/Xcode_15.1.app/Contents/Developer

jobs:
test:
configure:
runs-on: macos-latest
env:
DEVELOPER_DIR: /Applications/Xcode_15.1.app/Contents/Developer

steps:
- uses: actions/checkout@v4
Expand All @@ -36,24 +37,77 @@ jobs:

- name: Configure
working-directory: ${{runner.workspace}}/build
run: |
cmake ${{ github.workspace }} -G Xcode -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/ios.cmake -DPLATFORM=OS64 \
-DYUP_ENABLE_TESTS=ON -DYUP_ENABLE_EXAMPLES=OFF
run: cmake ${{ github.workspace }} -G Xcode -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/ios.cmake -DPLATFORM=OS64 \
-DYUP_ENABLE_TESTS=ON -DYUP_ENABLE_EXAMPLES=ON

- name: Build Debug
working-directory: ${{runner.workspace}}/build
- name: Build SDL2
run: |
cmake --build . --config Debug --parallel 4 --target yup_tests
cmake --build ${{runner.workspace}}/build --config Debug --parallel 4 --target SDL2-static
cmake --build ${{runner.workspace}}/build --config Release --parallel 4 --target SDL2-static
#- name: Test Debug
# working-directory: ${{runner.workspace}}/build/tests/Debug
# run: ./yup_tests
- name: Cache Configure
id: cache-build
uses: actions/cache/save@v4
with:
path: ${{runner.workspace}}/build
key: ios-build-${{ github.sha }}

- name: Build Release
working-directory: ${{runner.workspace}}/build
run: |
cmake --build . --config Release --parallel 4 --target yup_tests
build_tests:
runs-on: macos-latest
needs: [configure]
steps:
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
with:
path: ${{runner.workspace}}/build
key: ios-build-${{ github.sha }}
- run: cmake --build ${{runner.workspace}}/build --config Debug --parallel 4 --target yup_tests
- run: cmake --build ${{runner.workspace}}/build --config Release --parallel 4 --target yup_tests

build_console:
runs-on: macos-latest
needs: [configure]
steps:
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
with:
path: ${{runner.workspace}}/build
key: ios-build-${{ github.sha }}
- run: cmake --build ${{runner.workspace}}/build --config Debug --parallel 4 --target example_console
- run: cmake --build ${{runner.workspace}}/build --config Release --parallel 4 --target example_console

#- name: Test Release
# working-directory: ${{runner.workspace}}/build/tests/Release
# run: ./yup_tests
build_app:
runs-on: macos-latest
needs: [configure]
steps:
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
with:
path: ${{runner.workspace}}/build
key: ios-build-${{ github.sha }}
- run: cmake --build ${{runner.workspace}}/build --config Debug --parallel 4 --target example_app
- run: cmake --build ${{runner.workspace}}/build --config Release --parallel 4 --target example_app

build_graphics:
runs-on: macos-latest
needs: [configure]
steps:
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
with:
path: ${{runner.workspace}}/build
key: ios-build-${{ github.sha }}
- run: cmake --build ${{runner.workspace}}/build --config Debug --parallel 4 --target example_graphics
- run: cmake --build ${{runner.workspace}}/build --config Release --parallel 4 --target example_graphics

build_render:
runs-on: macos-latest
needs: [configure]
steps:
- uses: actions/checkout@v4
- uses: actions/cache/restore@v4
with:
path: ${{runner.workspace}}/build
key: ios-build-${{ github.sha }}
- run: cmake --build ${{runner.workspace}}/build --config Debug --parallel 4 --target example_render
- run: cmake --build ${{runner.workspace}}/build --config Release --parallel 4 --target example_render

0 comments on commit 5dc0613

Please sign in to comment.