|
| 1 | +name: CMake |
| 2 | + |
| 3 | +on: workflow_dispatch |
| 4 | + |
| 5 | +jobs: |
| 6 | + build_Windows: |
| 7 | + name: Build vcpkg on Windows |
| 8 | + runs-on: windows-latest |
| 9 | + steps: |
| 10 | + - uses: actions/checkout@v2 |
| 11 | + |
| 12 | + - name: cache vcpkg curl |
| 13 | + uses: actions/cache@v2 |
| 14 | + id: cache-primes |
| 15 | + with: |
| 16 | + path: ${{github.workspace}}/vcpkg |
| 17 | + key: windows-build- |
| 18 | + |
| 19 | + - name: vcpkg curl Windows |
| 20 | + if: startsWith(runner.os, 'Windows') && steps.cache-primes.outputs.cache-hit != 'true' |
| 21 | + shell: bash |
| 22 | + run: | |
| 23 | + git clone https://github.com/microsoft/vcpkg.git |
| 24 | + ./vcpkg/bootstrap-vcpkg.bat |
| 25 | + ./vcpkg/vcpkg install curl[tool]:x64-windows-static |
| 26 | + ./vcpkg/vcpkg integrate install |
| 27 | + echo Installed vcpkg and Curl |
| 28 | + |
| 29 | + - name: Build Windows |
| 30 | + shell: bash |
| 31 | + run: | |
| 32 | + mkdir build |
| 33 | + cd build |
| 34 | + cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static |
| 35 | + cmake --build . --config Release |
| 36 | + ls . |
| 37 | + echo Built Yuki |
| 38 | + |
| 39 | + - name: yuki Windows |
| 40 | + shell: bash |
| 41 | + run: | |
| 42 | + cd build |
| 43 | + cd Release |
| 44 | + ls . |
| 45 | + ./yuki.exe -h |
| 46 | + |
| 47 | + build_Linux: |
| 48 | + name: Build vcpkg on Linux |
| 49 | + runs-on: ubuntu-latest |
| 50 | + steps: |
| 51 | + - uses: actions/checkout@v2 |
| 52 | + |
| 53 | + - name: cache vcpkg curl |
| 54 | + uses: actions/cache@v2 |
| 55 | + id: cache-primes |
| 56 | + with: |
| 57 | + path: ${{github.workspace}}/vcpkg |
| 58 | + key: linux-build- |
| 59 | + |
| 60 | + - name: vcpkg curl Linux |
| 61 | + if: startsWith(runner.os, 'Linux') && steps.cache-primes.outputs.cache-hit != 'true' |
| 62 | + shell: bash |
| 63 | + run: | |
| 64 | + git clone https://github.com/microsoft/vcpkg.git |
| 65 | + ./vcpkg/bootstrap-vcpkg.sh |
| 66 | + ./vcpkg/vcpkg install curl[tool]:x64-linux |
| 67 | + ./vcpkg/vcpkg integrate install |
| 68 | + echo Installed vcpkg and Curl |
| 69 | + |
| 70 | + - name: Build Linux |
| 71 | + shell: bash |
| 72 | + run: | |
| 73 | + mkdir build |
| 74 | + cd build |
| 75 | + cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-linux |
| 76 | + cmake --build . --config Release |
| 77 | + ls . |
| 78 | + echo Built Yuki |
| 79 | + |
| 80 | + - name: yuki |
| 81 | + shell: bash |
| 82 | + run: | |
| 83 | + cd build |
| 84 | + ls . |
| 85 | + ./yuki -h |
0 commit comments