Skip to content

Commit

Permalink
Fix wasm and windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kunitoki committed Dec 16, 2024
1 parent 72addfb commit 647fb74
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 34 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/build_wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ jobs:
working-directory: ${{runner.workspace}}/build
run: emcmake cmake $GITHUB_WORKSPACE -G "Ninja Multi-Config" -DYUP_ENABLE_TESTS=ON -DYUP_ENABLE_EXAMPLES=ON

- name: Build SDL2
run: |
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: Cache Configure
id: cache-build
uses: actions/cache/save@v4
Expand Down
117 changes: 88 additions & 29 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ concurrency:
cancel-in-progress: true

jobs:
test:
configure:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- uses: seanmiddleditch/gha-setup-ninja@master

- name: Create Build Environment
Expand All @@ -41,36 +40,96 @@ jobs:
working-directory: ${{runner.workspace}}/build
run: cmake ${{ github.workspace }} -DYUP_ENABLE_TESTS=ON -DYUP_ENABLE_EXAMPLES=ON

- name: Build Tests Debug
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config Debug --parallel 4 --target yup_tests
- name: Build SDL2
run: |
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: Execute Tests Debug
working-directory: ${{runner.workspace}}/build/tests/Debug
- name: Cache Configure
id: cache-build
uses: actions/cache/save@v4
with:
path: ${{runner.workspace}}/build
key: ${{ runner.os }}-build-${{ github.sha }}

build_tests:
runs-on: windows-latest
needs: [configure]
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@master
- uses: actions/cache/restore@v4
with:
path: ${{runner.workspace}}/build
key: ${{ runner.os }}-build-${{ github.sha }}
- run: cmake --build ${{runner.workspace}}/build --config Debug --parallel 4 --target yup_tests
- working-directory: ${{runner.workspace}}/build/tests/Debug
run: ./yup_tests.exe
- run: cmake --build ${{runner.workspace}}/build --config Release --parallel 4 --target yup_tests
- working-directory: ${{runner.workspace}}/build/tests/Release
run: ./yup_tests.exe

- name: Build Tests Release
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config Release --parallel 4 --target yup_tests
build_console:
runs-on: windows-latest
needs: [configure]
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@master
- uses: actions/cache/restore@v4
with:
path: ${{runner.workspace}}/build
key: ${{ runner.os }}-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: Execute Tests Release
working-directory: ${{runner.workspace}}/build/tests/Release
run: ./yup_tests.exe
build_app:
runs-on: windows-latest
needs: [configure]
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@master
- uses: actions/cache/restore@v4
with:
path: ${{runner.workspace}}/build
key: ${{ runner.os }}-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

- name: Build Examples Debug
working-directory: ${{runner.workspace}}/build
run: |
cmake --build . --config Debug --parallel 4 --target example_console
cmake --build . --config Debug --parallel 4 --target example_app
cmake --build . --config Debug --parallel 4 --target example_graphics
cmake --build . --config Debug --parallel 4 --target example_render
cmake --build . --config Debug --parallel 4 --target example_plugin
build_graphics:
runs-on: windows-latest
needs: [configure]
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@master
- uses: actions/cache/restore@v4
with:
path: ${{runner.workspace}}/build
key: ${{ runner.os }}-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

- name: Build Examples Release
working-directory: ${{runner.workspace}}/build
run: |
cmake --build . --config Release --parallel 4 --target example_console
cmake --build . --config Release --parallel 4 --target example_app
cmake --build . --config Release --parallel 4 --target example_graphics
cmake --build . --config Release --parallel 4 --target example_render
cmake --build . --config Release --parallel 4 --target example_plugin
build_render:
runs-on: windows-latest
needs: [configure]
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@master
- uses: actions/cache/restore@v4
with:
path: ${{runner.workspace}}/build
key: ${{ runner.os }}-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

build_plugin:
runs-on: windows-latest
needs: [configure]
steps:
- uses: actions/checkout@v4
- uses: seanmiddleditch/gha-setup-ninja@master
- uses: actions/cache/restore@v4
with:
path: ${{runner.workspace}}/build
key: ${{ runner.os }}-build-${{ github.sha }}
- run: cmake --build ${{runner.workspace}}/build --config Debug --parallel 4 --target example_plugin
- run: cmake --build ${{runner.workspace}}/build --config Release --parallel 4 --target example_plugin

0 comments on commit 647fb74

Please sign in to comment.