Merge pull request #10 from Deledrius/ci_update #12
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: CI-Build | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macOS-latest] | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - name: Install dependencies (Ubuntu) | |
| if: contains(matrix.os, 'ubuntu') | |
| run: | | |
| sudo apt update | |
| sudo apt install libsdl2-dev libglm-dev | |
| - name: Install dependencies (macOS) | |
| if: contains(matrix.os, 'macOS') | |
| run: brew install sdl2 glm | |
| - name: Build string_theory | |
| run: | | |
| mkdir -p build_deps && cd build_deps | |
| git clone https://github.com/zrax/string_theory | |
| mkdir -p string_theory/build && cd string_theory/build | |
| cmake -DCMAKE_BUILD_TYPE=Debug -DST_BUILD_TESTS=OFF \ | |
| -DCMAKE_INSTALL_PREFIX="${GITHUB_WORKSPACE}/build_deps/prefix" .. | |
| make -j2 && make install | |
| - name: Build imaginaryMyst | |
| run: | | |
| mkdir -p build && cd build | |
| cmake -DCMAKE_BUILD_TYPE=Debug \ | |
| -DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/build_deps/prefix" .. | |
| make -j2 | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - name: Install dependencies | |
| shell: powershell | |
| run: | | |
| Set-Location "${Env:VCPKG_INSTALLATION_ROOT}" | |
| Set-Content -Path triplets/x86-windows-static-dyncrt.cmake ` | |
| -Value "set(VCPKG_TARGET_ARCHITECTURE x86)`nset(VCPKG_CRT_LINKAGE dynamic)`nset(VCPKG_LIBRARY_LINKAGE static)`n" | |
| git pull | |
| vcpkg install sdl2[core] glm zlib string-theory --triplet x86-windows-static-dyncrt | |
| - name: Build imaginaryMyst | |
| shell: powershell | |
| run: | | |
| mkdir build | Out-Null | |
| cd build | |
| cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_BUILD_TYPE=Debug ` | |
| -DCMAKE_TOOLCHAIN_FILE="${Env:VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" ` | |
| -DVCPKG_TARGET_TRIPLET=x86-windows-static-dyncrt .. | |
| cmake --build . |