diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-01-03 00:20:26 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-01-03 00:20:54 +0100 |
commit | 0a629d060b000b5c2fc44581b07533fe582c3292 (patch) | |
tree | 8785b9161f09c5f197f1ba5a41420490f240920e /.github | |
parent | dd44f41d8716881ad4e60adf7dcbf0f8d90896ce (diff) |
github ci: hard way it is
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/build-windows.bat | 3 | ||||
-rw-r--r-- | .github/workflows/cmake.yml | 17 |
2 files changed, 14 insertions, 6 deletions
diff --git a/.github/workflows/build-windows.bat b/.github/workflows/build-windows.bat new file mode 100644 index 00000000..c01b0f60 --- /dev/null +++ b/.github/workflows/build-windows.bat @@ -0,0 +1,3 @@ +set path=C:\Program Files\PowerShell\7;D:\a\opentrack\opentrack\ninja-build;C:\Program Files (x86)\pipx_bin;C:\hostedtoolcache\windows\Python\3.7.9\x64\Scripts;C:\hostedtoolcache\windows\Python\3.7.9\x64;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\CMake\bin;C:\Program Files\Git\cmd;C:\Users\runneradmin\AppData\Local\Microsoft\WindowsApps;%GITHUB_WORKSPACE%/ninja-build +"C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat" && %* +exit /b %ERRORLEVEL% diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 45439eeb..3cca4ca9 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -26,6 +26,7 @@ jobs: steps: - uses: actions/checkout@v2 + - uses: seanmiddleditch/gha-setup-ninja@master - name: Install Linux Dependencies run: sudo apt update && sudo apt install libprocps-dev libopencv-dev libopencv-dev @@ -46,15 +47,19 @@ jobs: - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -S ${{github.workspace}}/ -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + run: cmake -G "Ninja Multi-Config" -S ${{github.workspace}}/ -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + if: matrix.os != 'windows-latest' - name: Build - # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - - - name: Build install - # Build your program with the given configuration run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target install + if: matrix.os != 'windows-latest' + + - name: Configure win32 + run: "${{github.workspace}}/.github/workflows/build-windows.bat" cmake -G "Ninja Multi-Config" -S ${{github.workspace}}/ -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + if: matrix.os == 'windows-latest' + + - name: Build win32 + run: "${{github.workspace}}/.github/workflows/build-windows.bat" cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target install - name: Upload build uses: actions/upload-artifact@v2.2.4 |