Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[build] Add Windows CMake CI #5516

Merged
merged 38 commits into from
Sep 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f1d43f3
Don't enforce WITH_FLAT_INSTALL with MSVC
autoantwort Aug 6, 2023
9df45ca
Revert "[ci] Remove the Windows cmake job (#4425)"
autoantwort Aug 6, 2023
eb5c99e
Reduce needed disk space
autoantwort Aug 6, 2023
6f55980
Run vcpkg via the toolchain
autoantwort Aug 6, 2023
1ab05c4
Less code
autoantwort Aug 6, 2023
45a1889
Set host and target triplet to reduce disk space usage
autoantwort Aug 6, 2023
8e03152
Dumb me used wrong triplet
autoantwort Aug 6, 2023
c9501cc
Merge branch 'main' into windows-cmake-ci
autoantwort Aug 7, 2023
fac3919
Don't enforce WITH_FLAT_INSTALL with MSVC missing parts
autoantwort Aug 7, 2023
cc3d2a4
Merge branch 'dont-force-flat-install-with-msvc' into windows-cmake-ci
autoantwort Aug 7, 2023
56bb024
Use newer VS version
autoantwort Aug 7, 2023
b783886
Try suggestion from https://github.com/wpilibsuite/allwpilib/issues/5…
autoantwort Aug 9, 2023
d89a794
Don't build tests
autoantwort Aug 16, 2023
838df6d
Use Ninja on windows
autoantwort Aug 16, 2023
9a4e9d3
Merge branch 'main' into windows-cmake-ci
autoantwort Aug 16, 2023
6b45eec
Still use MSVC
autoantwort Aug 16, 2023
7a7542a
Revert back to default generator
autoantwort Aug 16, 2023
b3cd680
Try to workaround opencv debug guard link error
autoantwort Aug 17, 2023
7d668fb
Build release
autoantwort Aug 17, 2023
a5a4a10
No warnings as errors
autoantwort Aug 17, 2023
d8f4eba
fix format
autoantwort Sep 7, 2023
9ca94ce
Merge branch 'main' into windows-cmake-ci
autoantwort Sep 7, 2023
38a0f42
disable only specific warning
autoantwort Sep 7, 2023
94937cd
Merge branch 'main' into windows-cmake-ci
autoantwort Sep 7, 2023
e7db79a
ignore more warnings
autoantwort Sep 7, 2023
a56e281
Merge branch 'main' into windows-cmake-ci
autoantwort Sep 12, 2023
cb14e67
Use fmt, eigen and libuv from vcpkg
autoantwort Sep 12, 2023
e2ea6a4
Ignore more warnings from external projects
autoantwort Sep 12, 2023
8e2f4bc
Ignore warnings from fmt
autoantwort Sep 12, 2023
3fcf7d4
Revert "Ignore more warnings from external projects"
autoantwort Sep 12, 2023
05778d8
Target name
autoantwort Sep 12, 2023
1b73d58
test
autoantwort Sep 12, 2023
878b751
test
autoantwort Sep 12, 2023
b115c48
try Ninja
autoantwort Sep 12, 2023
e3fb407
try Ninja
autoantwort Sep 12, 2023
58556ec
multicore
autoantwort Sep 12, 2023
9cad181
remove debug message
autoantwort Sep 13, 2023
dc80014
no faster ci
autoantwort Sep 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,29 @@ jobs:
- name: test
working-directory: build
run: ctest --output-on-failure

build-windows:
name: "Build - Windows"
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- uses: ilammy/msvc-dev-cmd@v1

- name: Install CMake
uses: lukka/get-cmake@v3.23.0

- name: Run vcpkg
uses: lukka/run-vcpkg@v11.1
with:
vcpkgDirectory: ${{ runner.workspace }}/vcpkg
vcpkgGitCommitId: 78b61582c9e093fda56a01ebb654be15a0033897 # HEAD on 2023-08-6

- name: Install jinja
run: python -m pip install jinja2

- name: configure
run: cmake -S . -B build -G "Ninja Multi-Config" -DWITH_JAVA=OFF -DWITH_TESTS=OFF -DUSE_SYSTEM_FMTLIB=ON -DUSE_SYSTEM_LIBUV=ON -DUSE_SYSTEM_EIGEN=ON -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
working-directory: build
run: cmake --build . --parallel $(nproc) --config Release
2 changes: 1 addition & 1 deletion apriltag/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ target_compile_features(apriltag PUBLIC cxx_std_20)
wpilib_target_warnings(apriltag)
# disable warnings that apriltaglib can't handle
if (MSVC)
target_compile_options(apriltag PRIVATE /wd4018)
target_compile_options(apriltag PRIVATE /wd4018 /wd4005 /wd4996)
else()
target_compile_options(apriltag PRIVATE -Wno-sign-compare -Wno-gnu-zero-variadic-macro-arguments)
endif()
Expand Down
5 changes: 4 additions & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"name": "main",
"version-string": "latest",
"dependencies": [
"opencv"
"opencv",
"eigen3",
"fmt",
"libuv"
]
}
7 changes: 7 additions & 0 deletions wpiutil/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@ if (NOT USE_SYSTEM_FMTLIB)
else()
find_package(fmt CONFIG REQUIRED)
target_link_libraries(wpiutil fmt::fmt)
if(MSVC)
get_target_property(fmt_includes fmt::fmt INTERFACE_INCLUDE_DIRECTORIES)
foreach(dir ${fmt_includes})
target_compile_options(wpiutil PUBLIC /external:I "${dir}")
endforeach()
target_compile_options(wpiutil PUBLIC /external:W0)
endif()
endif()

if (MSVC)
Expand Down
Loading