Skip to content

Commit 8ff5c3e

Browse files
committed
ci: update all actions to current, update vcpkg
Most versions are trivial mostly revising the underlying node version required. Artifact uploading is changed significantly but not in any way that affect us. chore: update vcpkg to master (2024-07-11) Update vcpkg and the matching registry override to master as previous instabilities seem to have been addressed by now. 2024.06.15 isn't good enough as Abseil fails to build there. fix: omit debug DLLs for release-only triplet When building in CI with a `x64-windows-release` triplet to cut down on binary cache size and build times, the logic in the CMake script needs to not search for debug DLLs as no such files exist. (cherry picked from commit c1ed5b6)
1 parent 2b943bc commit 8ff5c3e

File tree

4 files changed

+45
-42
lines changed

4 files changed

+45
-42
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,58 +10,59 @@ jobs:
1010
triplet: x64-windows
1111
runs-on: ${{ matrix.os }}
1212
env:
13-
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
13+
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}-release
14+
VCPKG_TARGET_TRIPLET: ${{ matrix.triplet }}-release
1415
VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed/
1516
DEPS_DIR: ${{ github.workspace }}/vcpkg_installed/${{ matrix.triplet }}
1617
INST_DIR: ${{ github.workspace }}/install-prefix
1718
steps:
1819
- name: Checkout
19-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
2021
with:
2122
submodules: "recursive"
2223

2324
- name: run-vcpkg
24-
uses: lukka/run-vcpkg@v10
25+
uses: lukka/run-vcpkg@v11
2526
with:
2627
vcpkgJsonGlob: "./vcpkg.json"
2728
runVcpkgInstall: true
2829

2930
- name: Setup MSBuild
30-
uses: microsoft/setup-msbuild@v1
31+
uses: microsoft/setup-msbuild@v2
3132

3233
- name: Obtain and run CMake
3334
uses: threeal/[email protected]
3435
with:
3536
source-dir: "."
3637
build-dir: "build"
3738
generator: "Visual Studio 17 2022"
38-
options: CMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake CMAKE_INSTALL_PREFIX="${{ env.INST_DIR }}"
39+
options: CMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake CMAKE_INSTALL_PREFIX="${{ env.INST_DIR }}" VCPKG_TARGET_TRIPLET="${{ env.VCPKG_TARGET_TRIPLET }}"
3940

4041
- name: Build DLL
4142
run: "cmake --build build --config Release -t INSTALL"
4243

4344
- name: Archive DLL
44-
uses: actions/upload-artifact@v3
45+
uses: actions/upload-artifact@v4
4546
with:
4647
name: SimpleGraphic-${{ matrix.triplet }}.dll
4748
path: "${{ env.INST_DIR }}/SimpleGraphic.dll"
4849

4950
- name: Archive DLL symbols
50-
uses: actions/upload-artifact@v3
51+
uses: actions/upload-artifact@v4
5152
with:
5253
name: SimpleGraphic-${{ matrix.triplet }}.pdb
5354
path: "${{ github.workspace }}/build/Release/SimpleGraphic.pdb"
5455

5556
- name: Archive dependency DLLs
56-
uses: actions/upload-artifact@v3
57+
uses: actions/upload-artifact@v4
5758
with:
5859
name: SimpleGraphic-${{ matrix.triplet }}-deps.dll
5960
path: |
6061
${{ env.INST_DIR }}/*.dll
6162
!${{ env.INST_DIR }}/SimpleGraphic.dll
6263
6364
- name: Archive dependency DLL symbols
64-
uses: actions/upload-artifact@v3
65+
uses: actions/upload-artifact@v4
6566
with:
6667
name: SimpleGraphic-${{ matrix.triplet }}-deps.pdb
6768
path: |

CMakeLists.txt

Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,17 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
162162
endif ()
163163

164164
if (WIN32)
165+
target_compile_options(SimpleGraphic
166+
PRIVATE
167+
"/EHa"
168+
)
169+
target_compile_definitions(SimpleGraphic
170+
PRIVATE
171+
"_CRT_SECURE_NO_DEPRECATE=1"
172+
"_CRT_SECURE_NO_WARNINGS=1"
173+
"_SCL_SECURE_NO_DEPRECATE=1"
174+
"_SCL_SECURE_NO_WARNINGS=1"
175+
)
165176
target_link_libraries(SimpleGraphic
166177
PRIVATE
167178
"winmm.lib"
@@ -198,39 +209,30 @@ install(TARGETS SimpleGraphic RUNTIME DESTINATION ".")
198209
if (WIN32)
199210
set(DEPS_DIR "${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}")
200211

201-
find_file(LuaJIT_DLL_DEBUG
202-
NAMES "lua51.dll"
203-
PATHS "${DEPS_DIR}"
204-
PATH_SUFFIXES "debug/bin"
205-
REQUIRED
206-
NO_DEFAULT_PATH
207-
)
208-
find_file(LuaJIT_DLL_RELEASE
209-
NAMES "lua51.dll"
210-
PATHS "${DEPS_DIR}"
211-
PATH_SUFFIXES "bin"
212-
REQUIRED
213-
NO_DEFAULT_PATH
214-
)
215-
find_file(ZLIB_DLL_DEBUG
216-
NAMES "zlibd1.dll"
217-
PATHS "${DEPS_DIR}"
218-
PATH_SUFFIXES "debug/bin"
219-
REQUIRED
220-
NO_DEFAULT_PATH
221-
)
222-
find_file(ZLIB_DLL_RELEASE
223-
NAMES "zlib1.dll"
224-
PATHS "${DEPS_DIR}"
225-
PATH_SUFFIXES "bin"
226-
REQUIRED
227-
NO_DEFAULT_PATH
212+
if (NOT VCPKG_TARGET_TRIPLET MATCHES "-release")
213+
find_file(LuaJIT_DLL_DEBUG NAMES "lua51.dll"
214+
PATHS "${DEPS_DIR}" PATH_SUFFIXES "debug/bin" REQUIRED NO_DEFAULT_PATH)
215+
find_file(ZLIB_DLL_DEBUG NAMES "zlibd1.dll"
216+
PATHS "${DEPS_DIR}" PATH_SUFFIXES "debug/bin" REQUIRED NO_DEFAULT_PATH)
217+
218+
install(FILES
219+
${LuaJIT_DLL_DEBUG}
220+
${ZLIB_DLL_DEBUG}
221+
DESTINATION "."
222+
CONFIGURATIONS Debug
223+
)
224+
endif ()
225+
226+
find_file(LuaJIT_DLL_RELEASE NAMES "lua51.dll"
227+
PATHS "${DEPS_DIR}" PATH_SUFFIXES "bin" REQUIRED NO_DEFAULT_PATH)
228+
find_file(ZLIB_DLL_RELEASE NAMES "zlib1.dll"
229+
PATHS "${DEPS_DIR}" PATH_SUFFIXES "bin" REQUIRED NO_DEFAULT_PATH
228230
)
229231

230-
install(FILES ${LuaJIT_DLL_DEBUG} ${ZLIB_DLL_DEBUG} DESTINATION "."
231-
CONFIGURATIONS Debug
232-
)
233-
install(FILES ${LuaJIT_DLL_RELEASE} ${ZLIB_DLL_RELEASE} DESTINATION "."
232+
install(FILES
233+
${LuaJIT_DLL_RELEASE}
234+
${ZLIB_DLL_RELEASE}
235+
DESTINATION "."
234236
CONFIGURATIONS Release MinSizeRel RelWithDebInfo
235237
)
236238
endif ()

vcpkg

Submodule vcpkg updated 3942 files

vcpkg-configuration.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"default-registry": {
33
"kind": "builtin",
4-
"baseline": "836a2d684dac6b543563e53ab30a1a5b8afaf97b"
4+
"baseline": "3d72d8c930e1b6a1b2432b262c61af7d3287dcd0"
55
},
66
"registries": [
77
{

0 commit comments

Comments
 (0)