-
Notifications
You must be signed in to change notification settings - Fork 625
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] Merge Windows into CMake matrix
Signed-off-by: Jade Turner <[email protected]>
- Loading branch information
1 parent
f82e1c9
commit 89eb431
Showing
1 changed file
with
21 additions
and
33 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,10 @@ jobs: | |
container: "" | ||
env: "PATH=\"/opt/homebrew/opt/protobuf@3/bin:$PATH\"" | ||
flags: "--preset sccache -DCMAKE_BUILD_TYPE=Release -DWITH_JAVA=OFF -DWITH_EXAMPLES=ON -DCMAKE_LIBRARY_PATH=/opt/homebrew/opt/protobuf@3/lib -DProtobuf_INCLUDE_DIR=/opt/homebrew/opt/protobuf@3/include -DProtobuf_PROTOC_EXECUTABLE=/opt/homebrew/opt/protobuf@3/bin/protoc" | ||
- os: windows-2022 | ||
name: Windows | ||
container: "" | ||
flags: "--preset sccache -DCMAKE_BUILD_TYPE=Release -DWITH_JAVA=OFF -DWITH_EXAMPLES=ON -DUSE_SYSTEM_FMTLIB=ON -DUSE_SYSTEM_LIBUV=ON -DUSE_SYSTEM_EIGEN=OFF -DCMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_INSTALL_OPTIONS=--clean-after-build -DVCPKG_TARGET_TRIPLET=x64-windows-release -DVCPKG_HOST_TRIPLET=x64-windows-release" | ||
|
||
name: "Build - ${{ matrix.name }}" | ||
runs-on: ${{ matrix.os }} | ||
|
@@ -38,49 +42,27 @@ jobs: | |
run: brew install opencv protobuf@3 ninja | ||
if: runner.os == 'macOS' | ||
|
||
- name: Install sccache | ||
uses: mozilla-actions/[email protected] | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: configure | ||
run: cmake ${{ matrix.flags }} | ||
env: | ||
SCCACHE_WEBDAV_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} | ||
SCCACHE_WEBDAV_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} | ||
|
||
- name: build | ||
run: cmake --build build-cmake --parallel $(nproc) | ||
env: | ||
SCCACHE_WEBDAV_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} | ||
SCCACHE_WEBDAV_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} | ||
|
||
- name: test | ||
working-directory: build-cmake | ||
run: ctest --output-on-failure | ||
|
||
build-windows: | ||
name: "Build - Windows" | ||
runs-on: windows-2022 | ||
steps: | ||
- uses: ilammy/[email protected] | ||
if: runner.os == 'Windows' | ||
|
||
- name: Install CMake | ||
- name: Install CMake (Windows only) | ||
uses: lukka/[email protected] | ||
if: runner.os == 'Windows' | ||
|
||
- name: Run sccache-cache | ||
uses: mozilla-actions/[email protected] | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: Run vcpkg | ||
- name: Run vcpkg (Windows only) | ||
if: runner.os == 'Windows' | ||
uses: lukka/[email protected] | ||
with: | ||
vcpkgDirectory: ${{ runner.workspace }}/vcpkg | ||
vcpkgGitCommitId: 37c3e63a1306562f7f59c4c3c8892ddd50fdf992 # HEAD on 2024-02-24 | ||
|
||
- name: Install sccache | ||
uses: mozilla-actions/[email protected] | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: configure | ||
run: cmake --preset sccache -DCMAKE_BUILD_TYPE=Release -DWITH_JAVA=OFF -DWITH_EXAMPLES=ON -DUSE_SYSTEM_FMTLIB=ON -DUSE_SYSTEM_LIBUV=ON -DUSE_SYSTEM_EIGEN=OFF -DCMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_INSTALL_OPTIONS=--clean-after-build -DVCPKG_TARGET_TRIPLET=x64-windows-release -DVCPKG_HOST_TRIPLET=x64-windows-release | ||
run: cmake ${{ matrix.flags }} | ||
env: | ||
SCCACHE_WEBDAV_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} | ||
SCCACHE_WEBDAV_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} | ||
|
@@ -92,6 +74,12 @@ jobs: | |
SCCACHE_WEBDAV_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} | ||
|
||
- name: test | ||
working-directory: build-cmake | ||
run: ctest --output-on-failure | ||
if: runner.os != 'Windows' | ||
|
||
- name: test (windows) | ||
working-directory: build-cmake | ||
# UnitTest_test segfaults on exit occasionally | ||
run: ctest --output-on-failure -E 'UnitTest' | ||
if: runner.os == 'Windows' |