Skip to content

Commit aad1200

Browse files
committed
Update github actions
1 parent bb51830 commit aad1200

7 files changed

Lines changed: 31 additions & 25 deletions

File tree

.github/workflows/multi-os-build.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
# Space-separated list of packages to install using apt-get. Will only run if on ubuntu.
2121
apt-get: libssl-dev cmake binutils-mingw-w64-i686 gcc-mingw-w64-i686 g++-mingw-w64-i686
2222
- name: Checkout with submodules
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@v6
2424
- name: config shared=${{ matrix.shared }}
2525
run: >-
2626
cmake
@@ -35,30 +35,27 @@ jobs:
3535
runs-on: macos-latest
3636
steps:
3737
- name: Checkout with submodules
38-
uses: actions/checkout@v4
38+
uses: actions/checkout@v6
3939
- name: config
4040
run: >-
4141
cmake
4242
-Bbuild
4343
-DENABLE_TESTS=Off
4444
- name: Compile
4545
run: cmake --build build
46-
# - name: Compile
47-
# run: CFLAGS="-I$(brew --prefix openssl@1.1)/include/" LDFLAGS="-L$(brew --prefix openssl@1.1)/lib/" make
4846

49-
build-win64:
47+
build-win64-cygwin:
5048
runs-on: windows-latest
5149
steps:
5250
- name: Install Cygwin
5351
# You may pin to the exact commit or the version.
5452
# uses: egor-tensin/setup-cygwin@4f96f9fecb8c952fa32ff791b0a77d93d5191bb4
5553
uses: egor-tensin/setup-cygwin@v4
5654
with:
57-
platform: x64 # optional, default is x64
5855
install-dir: c:\tools\cygwin # optional, default is C:\tools\cygwin
5956
packages: gcc-core gcc-g++ binutils make ninja zip libssl-devel cmake # optional
6057
- name: Checkout with submodules
61-
uses: actions/checkout@v4
58+
uses: actions/checkout@v6
6259
- name: Config
6360
run: >-
6461
cmake
@@ -69,8 +66,17 @@ jobs:
6966
run: cmake --build build
7067
- name: Pack
7168
run: cd build && cpack -G CygwinBinary
72-
# - name: Compile
73-
# run: make
74-
# - name: Compile Windows-only tools and create a ZIP package
75-
# run: make zip
7669

70+
build-win64-msvc:
71+
runs-on: windows-latest
72+
steps:
73+
- uses: actions/checkout@v4
74+
- uses: ilammy/msvc-dev-cmd@v1
75+
- name: Install OpenSSL
76+
run: vcpkg install --triplet x64-windows
77+
- name: Build with CL.EXE
78+
run: |
79+
cmake -G "NMake Makefiles" -B build -DENABLE_TESTS=Off
80+
cmake --build build
81+
- name: Package
82+
run: cd build && cpack -G ZIP

CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,11 @@ if(MSVC)
3535
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux")
3636
include(cmake/toolchains/msvc-wine.cmake)
3737

38-
# My wine installation of msvc does not like my CRT
39-
add_definitions(
40-
-D_CRT_SECURE_NO_WARNINGS
41-
)
42-
4338
set(OPENSSL_ROOT_DIR ${VCPKG_ROOT}/installed/x64-windows)
4439
endif()
4540

4641
add_definitions(
42+
-D_CRT_SECURE_NO_WARNINGS
4743
-D_SLURP_EXECUTABLE
4844
)
4945

cmake/dependencies.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,7 @@ list(APPEND content uthash)
3131
FetchContent_MakeAvailable(${content})
3232

3333
add_library(uthash INTERFACE)
34-
target_include_directories(uthash INTERFACE ${uthash_SOURCE_DIR}/include)
35-
34+
target_include_directories(uthash INTERFACE SYSTEM ${uthash_SOURCE_DIR}/src)
35+
set_target_properties(uthash PROPERTIES
36+
INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${uthash_SOURCE_DIR}/src"
37+
)

include/libpe/resources.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ char *
8989
pe_resource_parse_string_u(pe_ctx_t *ctx, char *output, size_t output_size,
9090
const IMAGE_RESOURCE_DATA_STRING_U *data_string_ptr);
9191
void pe_resources_dealloc(pe_resources_t *obj);
92-
const VS_FIXEDFILEINFO *pe_resource_get_fixedfileinfo(const pe_ctx_t *ctx, const pe_resource_node_t *node, void **child_out);
92+
PEAPI const VS_FIXEDFILEINFO *
93+
pe_resource_get_fixedfileinfo(const pe_ctx_t *ctx,
94+
const pe_resource_node_t *node, void **child_out);
9395

9496
#ifdef __cplusplus
9597
} // extern "C"

lib/compat/asprintf.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@
4848
#include <stdio.h>
4949
#include <stdlib.h>
5050

51-
#define USE_MY_ASPRINTF
52-
5351
#ifdef __cplusplus
5452
extern "C" {
5553
#endif

lib/libpe/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,11 @@ if(LIBPE_LINK_SSDEEP)
6060
)
6161
endif()
6262

63-
target_include_directories(pe SYSTEM PRIVATE
64-
"${uthash_INCLUDE_DIR}"
65-
)
63+
# target_include_directories(pe SYSTEM PRIVATE
64+
# "${uthash_INCLUDE_DIR}"
65+
# "${uthash_SOURCE_DIR}/include"
66+
# )
67+
6668
target_include_directories(pe PRIVATE
6769
"${CMAKE_SOURCE_DIR}/include"
6870
)

lib/libpe/error.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ void pe_error_print(FILE *stream, pe_err_e error)
135135
#elif defined(_GNU_SOURCE) // GNU-specific
136136
const char *errmsg_ptr = strerror_r(errno, errmsg, sizeof errmsg);
137137
#elif defined(_MSC_VER) // C11
138-
int ret = strerror_s(errmsg, sizeof(errmsg), errno);
138+
/* int ret = */ strerror_s(errmsg, sizeof(errmsg), errno);
139139
const char *errmsg_ptr = errmsg;
140140
#else // Fallback to XSI-compliant
141141
/* int ret = */ strerror_r(errno, errmsg, sizeof errmsg);

0 commit comments

Comments
 (0)