From 884e8a547b3bb1d680c96a8779914ee4954f5b8e Mon Sep 17 00:00:00 2001 From: Hanicef Date: Tue, 23 Jan 2024 22:16:04 +0100 Subject: [PATCH 01/44] Add -noipv4 flag --- src/netcode/http-mserv.c | 104 ++++++++++++++++++++++++++------------- src/netcode/i_tcp.c | 77 ++++++++++++++++------------- 2 files changed, 111 insertions(+), 70 deletions(-) diff --git a/src/netcode/http-mserv.c b/src/netcode/http-mserv.c index 2b52380cf..cd3e353dc 100644 --- a/src/netcode/http-mserv.c +++ b/src/netcode/http-mserv.c @@ -63,7 +63,9 @@ consvar_t cv_masterserver_token = CVAR_INIT static int hms_started; +static boolean hms_args_checked; static boolean hms_allow_ipv6; +static boolean hms_allow_ipv4; static char *hms_api; #ifdef HAVE_THREADS @@ -134,6 +136,16 @@ HMS_on_read (char *s, size_t _1, size_t n, void *userdata) return n; } +static void HMS_check_args_once(void) +{ + if (hms_args_checked) + return; + + hms_allow_ipv6 = !M_CheckParm("-noipv6"); + hms_allow_ipv4 = !M_CheckParm("-noipv4"); + hms_args_checked = true; +} + static struct HMS_buffer * HMS_connect (int proto, const char *format, ...) { @@ -152,7 +164,6 @@ HMS_connect (int proto, const char *format, ...) if (! hms_started) { - hms_allow_ipv6 = !M_CheckParm("-noipv6"); if (curl_global_init(CURL_GLOBAL_ALL) != 0) { Contact_error(); @@ -234,9 +245,9 @@ HMS_connect (int proto, const char *format, ...) curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); #ifndef NO_IPV6 - if (proto == PROTO_V6) + if (proto == PROTO_V6 || (proto == PROTO_ANY && !hms_allow_ipv4)) curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6); - if (proto == PROTO_V4) + if (proto == PROTO_V4 || (proto == PROTO_ANY && !hms_allow_ipv6)) #endif curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); @@ -326,6 +337,8 @@ HMS_fetch_rooms (int joining, int query_id) (void)query_id; + HMS_check_args_once(); + hms = HMS_connect(PROTO_ANY, "rooms"); if (! hms) @@ -420,18 +433,15 @@ int HMS_register (void) { struct HMS_buffer *hms; - int ok; + int ok = 0; char post[256]; char *title; - hms = HMS_connect(PROTO_V4, "rooms/%d/register", ms_RoomId); + HMS_check_args_once(); - if (! hms) - return 0; - - title = curl_easy_escape(hms->curl, cv_servername.string, 0); + title = curl_easy_escape(NULL, cv_servername.string, 0); snprintf(post, sizeof post, "port=%d&" @@ -447,16 +457,24 @@ HMS_register (void) curl_free(title); - curl_easy_setopt(hms->curl, CURLOPT_POSTFIELDS, post); - - ok = HMS_do(hms); - - if (ok) + if (hms_allow_ipv4) { - hms_server_token = strdup(strtok(hms->buffer, "\n")); - } + hms = HMS_connect(PROTO_V4, "rooms/%d/register", ms_RoomId); - HMS_end(hms); + if (! hms) + return 0; + + curl_easy_setopt(hms->curl, CURLOPT_POSTFIELDS, post); + + ok = HMS_do(hms); + + if (ok) + { + hms_server_token = strdup(strtok(hms->buffer, "\n")); + } + + HMS_end(hms); + } #ifndef NO_IPV6 if (!hms_allow_ipv6) @@ -486,20 +504,25 @@ int HMS_unlist (void) { struct HMS_buffer *hms; - int ok; + int ok = 0; - hms = HMS_connect(PROTO_V4, "servers/%s/unlist", hms_server_token); + HMS_check_args_once(); - if (! hms) - return 0; + if (hms_server_token && hms_allow_ipv4) + { + hms = HMS_connect(PROTO_V4, "servers/%s/unlist", hms_server_token); - curl_easy_setopt(hms->curl, CURLOPT_POST, 1); - curl_easy_setopt(hms->curl, CURLOPT_POSTFIELDSIZE, 0); + if (! hms) + return 0; - ok = HMS_do(hms); - HMS_end(hms); + curl_easy_setopt(hms->curl, CURLOPT_POST, 1); + curl_easy_setopt(hms->curl, CURLOPT_POSTFIELDSIZE, 0); - free(hms_server_token); + ok = HMS_do(hms); + HMS_end(hms); + + free(hms_server_token); + } #ifndef NO_IPV6 if (hms_server_token_ipv6 && hms_allow_ipv6) @@ -526,18 +549,15 @@ int HMS_update (void) { struct HMS_buffer *hms; - int ok; + int ok = 0; char post[256]; char *title; - hms = HMS_connect(PROTO_V4, "servers/%s/update", hms_server_token); + HMS_check_args_once(); - if (! hms) - return 0; - - title = curl_easy_escape(hms->curl, cv_servername.string, 0); + title = curl_easy_escape(NULL, cv_servername.string, 0); snprintf(post, sizeof post, "title=%s", @@ -546,10 +566,18 @@ HMS_update (void) curl_free(title); - curl_easy_setopt(hms->curl, CURLOPT_POSTFIELDS, post); + if (hms_server_token && hms_allow_ipv4) + { + hms = HMS_connect(PROTO_V4, "servers/%s/update", hms_server_token); - ok = HMS_do(hms); - HMS_end(hms); + if (! hms) + return 0; + + curl_easy_setopt(hms->curl, CURLOPT_POSTFIELDS, post); + + ok = HMS_do(hms); + HMS_end(hms); + } #ifndef NO_IPV6 if (hms_server_token_ipv6 && hms_allow_ipv6) @@ -577,6 +605,8 @@ HMS_list_servers (void) char *list; char *p; + HMS_check_args_once(); + hms = HMS_connect(PROTO_ANY, "servers"); if (! hms) @@ -622,6 +652,8 @@ HMS_fetch_servers (msg_server_t *list, int room_number, int query_id) int i; + HMS_check_args_once(); + (void)query_id; if (room_number > 0) @@ -733,6 +765,8 @@ HMS_compare_mod_version (char *buffer, size_t buffer_size) char *version; char *version_name; + HMS_check_args_once(); + hms = HMS_connect(PROTO_ANY, "versions/%d", MODID); if (! hms) diff --git a/src/netcode/i_tcp.c b/src/netcode/i_tcp.c index 6d9a2725a..86cf83d02 100644 --- a/src/netcode/i_tcp.c +++ b/src/netcode/i_tcp.c @@ -908,6 +908,7 @@ static boolean UDP_Socket(void) #ifdef HAVE_IPV6 const INT32 b_ipv6 = !M_CheckParm("-noipv6"); #endif + const INT32 b_ipv4 = !M_CheckParm("-noipv4"); const char *serv; @@ -929,11 +930,34 @@ static boolean UDP_Socket(void) else serv = clientport_name; - if (M_CheckParm("-bindaddr")) + if (b_ipv4) { - while (M_IsNextParm()) + if (M_CheckParm("-bindaddr")) { - gaie = I_getaddrinfo(M_GetNextParm(), serv, &hints, &ai); + while (M_IsNextParm()) + { + gaie = I_getaddrinfo(M_GetNextParm(), serv, &hints, &ai); + if (gaie == 0) + { + runp = ai; + while (runp != NULL && s < MAXNETNODES+1) + { + mysockets[s] = UDP_Bind(runp->ai_family, runp->ai_addr, (socklen_t)runp->ai_addrlen); + if (mysockets[s] != (SOCKET_TYPE)ERRSOCKET) + { + FD_SET(mysockets[s], &masterset); + myfamily[s] = hints.ai_family; + s++; + } + runp = runp->ai_next; + } + I_freeaddrinfo(ai); + } + } + } + else + { + gaie = I_getaddrinfo("0.0.0.0", serv, &hints, &ai); if (gaie == 0) { runp = ai; @@ -945,6 +969,13 @@ static boolean UDP_Socket(void) FD_SET(mysockets[s], &masterset); myfamily[s] = hints.ai_family; s++; +#ifdef HAVE_MINIUPNPC + if (UPNP_support) + { + I_UPnP_rem(serverport_name, "UDP"); + I_UPnP_add(NULL, serverport_name, "UDP"); + } +#endif } runp = runp->ai_next; } @@ -952,33 +983,6 @@ static boolean UDP_Socket(void) } } } - else - { - gaie = I_getaddrinfo("0.0.0.0", serv, &hints, &ai); - if (gaie == 0) - { - runp = ai; - while (runp != NULL && s < MAXNETNODES+1) - { - mysockets[s] = UDP_Bind(runp->ai_family, runp->ai_addr, (socklen_t)runp->ai_addrlen); - if (mysockets[s] != (SOCKET_TYPE)ERRSOCKET) - { - FD_SET(mysockets[s], &masterset); - myfamily[s] = hints.ai_family; - s++; -#ifdef HAVE_MINIUPNPC - if (UPNP_support) - { - I_UPnP_rem(serverport_name, "UDP"); - I_UPnP_add(NULL, serverport_name, "UDP"); - } -#endif - } - runp = runp->ai_next; - } - I_freeaddrinfo(ai); - } - } #ifdef HAVE_IPV6 if (b_ipv6) { @@ -1045,11 +1049,14 @@ static boolean UDP_Socket(void) s = 0; - // setup broadcast adress to BROADCASTADDR entry - broadcastaddress[s].any.sa_family = AF_INET; - broadcastaddress[s].ip4.sin_port = htons(atoi(DEFAULTPORT)); - broadcastaddress[s].ip4.sin_addr.s_addr = htonl(INADDR_BROADCAST); - s++; + if (b_ipv4) + { + // setup broadcast adress to BROADCASTADDR entry + broadcastaddress[s].any.sa_family = AF_INET; + broadcastaddress[s].ip4.sin_port = htons(atoi(DEFAULTPORT)); + broadcastaddress[s].ip4.sin_addr.s_addr = htonl(INADDR_BROADCAST); + s++; + } #ifdef HAVE_IPV6 if (b_ipv6) From 8cbcbf8cf9b412947568c229c8ddb99d894a2b6e Mon Sep 17 00:00:00 2001 From: Hanicef Date: Sun, 26 Jan 2025 12:16:01 +0100 Subject: [PATCH 02/44] Fix address resolution failure in certain circumstances --- src/netcode/i_tcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/netcode/i_tcp.c b/src/netcode/i_tcp.c index 256d9992e..00e50186e 100644 --- a/src/netcode/i_tcp.c +++ b/src/netcode/i_tcp.c @@ -1129,7 +1129,7 @@ static SINT8 SOCK_NetMakeNodewPort(const char *address, const char *port) DEBFILE(va("Creating new node: %s@%s\n", address, port)); memset (&hints, 0x00, sizeof (hints)); - hints.ai_flags = 0; + hints.ai_flags = AI_ADDRCONFIG; hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_DGRAM; hints.ai_protocol = IPPROTO_UDP; @@ -1159,7 +1159,7 @@ static SINT8 SOCK_NetMakeNodewPort(const char *address, const char *port) } } - if (i < mysocketses) + if (i >= mysocketses) runp = runp->ai_next; else break; From aee50849ad5983ec4ce66ad42a390b186a173bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= Date: Wed, 29 Jan 2025 18:51:53 +0100 Subject: [PATCH 03/44] Fix port collision on IPv6 connections --- src/netcode/i_tcp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/netcode/i_tcp.c b/src/netcode/i_tcp.c index 256d9992e..fbe7ec4d2 100644 --- a/src/netcode/i_tcp.c +++ b/src/netcode/i_tcp.c @@ -456,6 +456,8 @@ static boolean SOCK_cmpipv6(mysockaddr_t *a, mysockaddr_t *b, UINT8 mask) { UINT8 bitmask; I_Assert(mask <= 128); + if (mask == 0) + mask = 128; if (memcmp(&a->ip6.sin6_addr.s6_addr, &b->ip6.sin6_addr.s6_addr, mask / 8) != 0) return false; if (mask % 8 == 0) From a203f4e5536e3ec4b4e3c7748897398ba614949c Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 1 Feb 2025 11:00:02 -0500 Subject: [PATCH 04/44] Update i_tcp.c Add checks for return code for ioctl(), setsockopt(), getsockopt() and getsockname() Also show errno and strerror for failed calls --- src/netcode/i_tcp.c | 89 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 70 insertions(+), 19 deletions(-) diff --git a/src/netcode/i_tcp.c b/src/netcode/i_tcp.c index 256d9992e..89cee2a6c 100644 --- a/src/netcode/i_tcp.c +++ b/src/netcode/i_tcp.c @@ -1,7 +1,7 @@ // SONIC ROBO BLAST 2 //----------------------------------------------------------------------------- // Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2024 by Sonic Team Junior. +// Copyright (C) 1999-2025 by Sonic Team Junior. // // This program is free software distributed under the // terms of the GNU General Public License, version 2. @@ -695,7 +695,7 @@ static void SOCK_Send(void) { int e = errno; // save error code so it can't be modified later if (!ALLOWEDERROR(e)) - I_Error("SOCK_Send, error sending to node %d (%s) #%u: %s", doomcom->remotenode, + I_Error("SOCK_Send, error sending to node %d (%s) #%u, %s", doomcom->remotenode, SOCK_GetNodeAddress(doomcom->remotenode), e, strerror(e)); } } @@ -726,6 +726,8 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen { SOCKET_TYPE s = socket(family, SOCK_DGRAM, IPPROTO_UDP); int opt; + int rc; + int e = 0; // save error code so it can't be modified later code socklen_t opts; #ifdef FIONBIO unsigned long trueval = true; @@ -740,12 +742,17 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen #ifdef USE_WINSOCK2 DWORD dwBytesReturned = 0; BOOL bfalse = FALSE; - WSAIoctl(s, SIO_UDP_CONNRESET, &bfalse, sizeof(bfalse), + rc = WSAIoctl(s, SIO_UDP_CONNRESET, &bfalse, sizeof(bfalse), NULL, 0, &dwBytesReturned, NULL, NULL); #else unsigned long falseval = false; - ioctl(s, SIO_UDP_CONNRESET, &falseval); + rc = ioctl(s, SIO_UDP_CONNRESET, &falseval); #endif + if (rc == -1) + { + e = errno; + I_OutputMsg("SIO_UDP_CONNRESET failed: #%u, %s\n", e, strerror(e)); + } } #endif @@ -758,14 +765,22 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen { opt = true; opts = (socklen_t)sizeof(opt); - setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, opts); + rc = setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, opts); + if (rc <= -1) + { + e = errno; + I_OutputMsg("setting SO_REUSEADDR failed: #%u, %s\n", e, strerror(e)); + } } // make it broadcastable opt = true; opts = (socklen_t)sizeof(opt); - if (setsockopt(s, SOL_SOCKET, SO_BROADCAST, (char *)&opt, opts)) + rc = setsockopt(s, SOL_SOCKET, SO_BROADCAST, (char *)&opt, opts); + if (rc <= -1) { + e = errno; CONS_Alert(CONS_WARNING, M_GetText("Could not get broadcast rights\n")); // I do not care anymore + I_OutputMsg("setting SO_BROADCAST failed: #%u, %s\n", e, strerror(e)); } } #ifdef HAVE_IPV6 @@ -775,24 +790,34 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen { opt = true; opts = (socklen_t)sizeof(opt); - setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, opts); + rc = setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&opt, opts); + if (rc <= -1) + { + e = errno; + I_OutputMsg("setting SO_REUSEADDR failed: #%u, %s\n", e, strerror(e)); + } } #ifdef IPV6_V6ONLY // make it IPv6 ony opt = true; opts = (socklen_t)sizeof(opt); - if (setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&opt, opts)) + rc = setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&opt, opts); + if (rc <= -1) { + e = errno; CONS_Alert(CONS_WARNING, M_GetText("Could not limit IPv6 bind\n")); // I do not care anymore + I_OutputMsg("setting IPV6_V6ONLY failed: #%u, %s\n", e, strerror(e)); } #endif } #endif - if (bind(s, addr, addrlen) == ERRSOCKET) + rc = bind(s, addr, addrlen); + if (rc == ERRSOCKET) { + e = errno; close(s); - I_OutputMsg("Binding failed\n"); + I_OutputMsg("Binding failed: #%u, %s\n", e, strerror(e)); return (SOCKET_TYPE)ERRSOCKET; } @@ -806,9 +831,12 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen inet_pton(AF_INET6, IPV6_MULTICAST_ADDRESS, &maddr.ipv6mr_multiaddr); maddr.ipv6mr_interface = 0; - if (setsockopt(s, IPPROTO_IPV6, IPV6_JOIN_GROUP, (const char *)&maddr, sizeof(maddr)) != 0) + rc = setsockopt(s, IPPROTO_IPV6, IPV6_JOIN_GROUP, (const char *)&maddr, sizeof(maddr)); + if (rc <= -1) { + e = errno; CONS_Alert(CONS_WARNING, M_GetText("Could not register multicast address\n")); + I_OutputMsg("setting IPV6_JOIN_GROUP failed: #%u, %s \n", e, strerror(e)); } } } @@ -816,33 +844,56 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen #ifdef FIONBIO // make it non blocking - opt = true; - if (ioctl(s, FIONBIO, &trueval) != 0) + rc = ioctl(s, FIONBIO, &trueval); + if (rc == -1) { + e = errno; close(s); - I_OutputMsg("Seting FIOBIO on failed\n"); + I_OutputMsg("FIOBIO failed: #%u, %s\n", e, strerror(e)); return (SOCKET_TYPE)ERRSOCKET; } #endif + opt = 0; opts = (socklen_t)sizeof(opt); - getsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&opt, &opts); + rc = getsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&opt, &opts); + if (rc <= -1) + { + e = errno; + I_OutputMsg("getting SO_RCVBUF failed: #%u, %s\n", e, strerror(e)); + } CONS_Printf(M_GetText("Network system buffer: %dKb\n"), opt>>10); if (opt < 64<<10) // 64k { opt = 64<<10; opts = (socklen_t)sizeof(opt); - setsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&opt, opts); - getsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&opt, &opts); - if (opt < 64<<10) + rc = setsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&opt, opts); + if (rc <= -1) + { + e = errno; + I_OutputMsg("setting SO_RCVBUF failed: #%u, %s\n", e, strerror(e)); + } + opt = 0; + rc = getsockopt(s, SOL_SOCKET, SO_RCVBUF, (char *)&opt, &opts); + if (rc <= -1) + { + e = errno; + I_OutputMsg("getting SO_RCVBUF failed: #%u, %s\n", e, strerror(e)); + } + if (opt <= 64<<10) CONS_Alert(CONS_WARNING, M_GetText("Can't set buffer length to 64k, file transfer will be bad\n")); else CONS_Printf(M_GetText("Network system buffer set to: %dKb\n"), opt>>10); } - if (getsockname(s, &straddr.any, &len) == -1) + rc = getsockname(s, &straddr.any, &len); + if (rc != 0) + { + e = errno; CONS_Alert(CONS_WARNING, M_GetText("Failed to get port number\n")); + I_OutputMsg("getsockname failed: #%u, %s\n", e, strerror(e)); + } else { if (family == AF_INET) From 4596f20b71b10d330cc26cc657741b1b3607f274 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sat, 1 Feb 2025 11:00:44 -0500 Subject: [PATCH 05/44] Check for ENODEV for hosts with IPv6 disabled while running in IPv6 mode --- src/netcode/i_tcp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/netcode/i_tcp.c b/src/netcode/i_tcp.c index 89cee2a6c..282b2ce94 100644 --- a/src/netcode/i_tcp.c +++ b/src/netcode/i_tcp.c @@ -836,6 +836,12 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen { e = errno; CONS_Alert(CONS_WARNING, M_GetText("Could not register multicast address\n")); + if (e == ENODEV) + { + close(s); + I_OutputMsg("Binding failed: no IPv6 device\n"); + return (SOCKET_TYPE)ERRSOCKET; + } I_OutputMsg("setting IPV6_JOIN_GROUP failed: #%u, %s \n", e, strerror(e)); } } From 4bb8183e6f915bb0155f647c0c77e8a60277404a Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Feb 2025 12:43:05 -0500 Subject: [PATCH 06/44] Show in log if IPv6 support is disabled fixup --- src/netcode/i_tcp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/netcode/i_tcp.c b/src/netcode/i_tcp.c index 282b2ce94..c0a606ba1 100644 --- a/src/netcode/i_tcp.c +++ b/src/netcode/i_tcp.c @@ -936,6 +936,13 @@ static boolean UDP_Socket(void) hints.ai_socktype = SOCK_DGRAM; hints.ai_protocol = IPPROTO_UDP; +#ifdef HAVE_IPV6 + if (!b_ipv6) + I_OutputMsg("Disabling IPv6 support at runtime\n"); +#else + I_OutputMsg("Compiled without IPv6 support\n"); +#endif + if (serverrunning) serv = serverport_name; else From 1ebac1ed40da053fe6bf8e077cbab1b8d135e7d1 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Feb 2025 12:44:35 -0500 Subject: [PATCH 07/44] Avoid calling WSAGetLastError() (via errno/h_error) more then once with Winsock2 --- src/netcode/i_tcp.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/netcode/i_tcp.c b/src/netcode/i_tcp.c index c0a606ba1..58fb921d6 100644 --- a/src/netcode/i_tcp.c +++ b/src/netcode/i_tcp.c @@ -386,6 +386,7 @@ static const char *SOCK_AddrToStr(mysockaddr_t *sk) int v6 = 0; #endif void *addr; + int e = 0; // save error code so it can't be modified later code and avoid calling WSAGetLastError() more then once if(sk->any.sa_family == AF_INET) addr = &sk->ip4.sin_addr; @@ -399,7 +400,10 @@ static const char *SOCK_AddrToStr(mysockaddr_t *sk) if(addr == NULL) sprintf(s, "No address"); else if(inet_ntop(sk->any.sa_family, addr, &s[v6], sizeof (s) - v6) == NULL) - sprintf(s, "Unknown family type, error #%u", errno); + { + e = errno; + sprintf(s, "Unknown family type, error #%u: %s", e, strerror(e)); + } #ifdef HAVE_IPV6 else if(sk->any.sa_family == AF_INET6) { @@ -655,6 +659,7 @@ static inline ssize_t SOCK_SendToAddr(SOCKET_TYPE socket, mysockaddr_t *sockaddr static void SOCK_Send(void) { ssize_t c = ERRSOCKET; + int e = 0; // save error code so it can't be modified later code and avoid calling WSAGetLastError() more then once if (!nodeconnected[doomcom->remotenode]) return; @@ -668,8 +673,12 @@ static void SOCK_Send(void) if (myfamily[i] == broadcastaddress[j].any.sa_family) { c = SOCK_SendToAddr(mysockets[i], &broadcastaddress[j]); - if (c == ERRSOCKET && !ALLOWEDERROR(errno)) - break; + if (c == ERRSOCKET) + { + e = errno; + if (!ALLOWEDERROR(e)) + break; + } } } } @@ -681,8 +690,12 @@ static void SOCK_Send(void) if (myfamily[i] == clientaddress[doomcom->remotenode].any.sa_family) { c = SOCK_SendToAddr(mysockets[i], &clientaddress[doomcom->remotenode]); - if (c == ERRSOCKET && !ALLOWEDERROR(errno)) - break; + if (c == ERRSOCKET) + { + e = errno; + if (!ALLOWEDERROR(e)) + break; + } } } } @@ -693,7 +706,6 @@ static void SOCK_Send(void) if (c == ERRSOCKET) { - int e = errno; // save error code so it can't be modified later if (!ALLOWEDERROR(e)) I_Error("SOCK_Send, error sending to node %d (%s) #%u, %s", doomcom->remotenode, SOCK_GetNodeAddress(doomcom->remotenode), e, strerror(e)); @@ -727,7 +739,7 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen SOCKET_TYPE s = socket(family, SOCK_DGRAM, IPPROTO_UDP); int opt; int rc; - int e = 0; // save error code so it can't be modified later code + int e = 0; // save error code so it can't be modified later code and avoid calling WSAGetLastError() more then once socklen_t opts; #ifdef FIONBIO unsigned long trueval = true; From 1278bc5727073dab26238ce9ab354ac4702bba4e Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 3 Feb 2025 01:02:57 +0000 Subject: [PATCH 08/44] Update i_tcp.c Do not error out if we don't have a socket for an address family we have disabled --- src/netcode/i_tcp.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/netcode/i_tcp.c b/src/netcode/i_tcp.c index 18c90582e..63d232f0c 100644 --- a/src/netcode/i_tcp.c +++ b/src/netcode/i_tcp.c @@ -655,6 +655,7 @@ static inline ssize_t SOCK_SendToAddr(SOCKET_TYPE socket, mysockaddr_t *sockaddr static void SOCK_Send(void) { ssize_t c = ERRSOCKET; + int e = -1; // save error code so it can't be modified later code and avoid calling WSAGetLastError() more then once if (!nodeconnected[doomcom->remotenode]) return; @@ -668,8 +669,12 @@ static void SOCK_Send(void) if (myfamily[i] == broadcastaddress[j].any.sa_family) { c = SOCK_SendToAddr(mysockets[i], &broadcastaddress[j]); - if (c == ERRSOCKET && !ALLOWEDERROR(errno)) - break; + if (c == ERRSOCKET) + { + e = errno; + if (!ALLOWEDERROR(e)) + break; + } } } } @@ -681,19 +686,26 @@ static void SOCK_Send(void) if (myfamily[i] == clientaddress[doomcom->remotenode].any.sa_family) { c = SOCK_SendToAddr(mysockets[i], &clientaddress[doomcom->remotenode]); - if (c == ERRSOCKET && !ALLOWEDERROR(errno)) - break; + if (c == ERRSOCKET) + { + e = errno; + if (!ALLOWEDERROR(e)) + break; + } } } } else { c = SOCK_SendToAddr(nodesocket[doomcom->remotenode], &clientaddress[doomcom->remotenode]); + if (c == ERRSOCKET) + { + e = errno; + } } - if (c == ERRSOCKET) + if (c == ERRSOCKET && e != -1) // -1 means no socket for the address family was found { - int e = errno; // save error code so it can't be modified later if (!ALLOWEDERROR(e)) I_Error("SOCK_Send, error sending to node %d (%s) #%u: %s", doomcom->remotenode, SOCK_GetNodeAddress(doomcom->remotenode), e, strerror(e)); From 0fe8c7a57afa84fba92772b22cf42025ddd18b07 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Feb 2025 22:29:23 -0500 Subject: [PATCH 09/44] Update m_menu.c Add check netgame check if someone use both -noipv4 and -noipv6 --- src/m_menu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/m_menu.c b/src/m_menu.c index 37d191a0d..be1b421f7 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -3892,6 +3892,9 @@ void M_Ticker(void) M_SetupScreenshotMenu(); #if defined (MASTERSERVER) && defined (HAVE_THREADS) + if (!netgame) + return; + I_lock_mutex(&ms_ServerList_mutex); { if (ms_ServerList) From 598307f33851d5c1bcc148118686838d0e1c909e Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Feb 2025 22:50:17 -0500 Subject: [PATCH 10/44] Only check for -noipv6 on IPv6 builds in HTTP code --- src/netcode/http-mserv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/netcode/http-mserv.c b/src/netcode/http-mserv.c index 5f3490cac..0c96561ef 100644 --- a/src/netcode/http-mserv.c +++ b/src/netcode/http-mserv.c @@ -64,7 +64,9 @@ consvar_t cv_masterserver_token = CVAR_INIT static int hms_started; static boolean hms_args_checked; +#ifndef NO_IPV6 static boolean hms_allow_ipv6; +#endif static boolean hms_allow_ipv4; static char *hms_api; @@ -141,7 +143,9 @@ static void HMS_check_args_once(void) if (hms_args_checked) return; +#ifndef NO_IPV6 hms_allow_ipv6 = !M_CheckParm("-noipv6"); +#endif hms_allow_ipv4 = !M_CheckParm("-noipv4"); hms_args_checked = true; } From ebfea6de0cfc6d98b1a69b7a2b72cd818b1e82fa Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Feb 2025 22:50:59 -0500 Subject: [PATCH 11/44] use -bindaddr6 for mserv PROTO_V6 calls --- src/netcode/http-mserv.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/netcode/http-mserv.c b/src/netcode/http-mserv.c index 0c96561ef..0fe1e9934 100644 --- a/src/netcode/http-mserv.c +++ b/src/netcode/http-mserv.c @@ -240,20 +240,27 @@ HMS_connect (int proto, const char *format, ...) curl_easy_setopt(curl, CURLOPT_STDERR, logstream); } - if (M_CheckParm("-bindaddr") && M_IsNextParm()) - { - curl_easy_setopt(curl, CURLOPT_INTERFACE, M_GetNextParm()); - } - curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); #ifndef NO_IPV6 if (proto == PROTO_V6 || (proto == PROTO_ANY && !hms_allow_ipv4)) + { curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6); + if (M_CheckParm("-bindaddr6") && M_IsNextParm()) + { + curl_easy_setopt(curl, CURLOPT_INTERFACE, M_GetNextParm()); + } + } if (proto == PROTO_V4 || (proto == PROTO_ANY && !hms_allow_ipv6)) #endif + { curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); + if (M_CheckParm("-bindaddr") && M_IsNextParm()) + { + curl_easy_setopt(curl, CURLOPT_INTERFACE, M_GetNextParm()); + } + } curl_easy_setopt(curl, CURLOPT_TIMEOUT, cv_masterserver_timeout.value); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, HMS_on_read); From 36d8d8a01ff11d7f109218dedb58c5d0f24f90a0 Mon Sep 17 00:00:00 2001 From: Logan Aerl Arias Date: Sun, 16 Feb 2025 14:10:42 -0500 Subject: [PATCH 12/44] remove gold linker everywhere remove gold linker everywhere --- .gitlab/ci/jobs/debian-stable-amd64-makefile.yml | 1 - .gitlab/ci/jobs/debian-stable-amd64.yml | 1 - .gitlab/ci/jobs/debian-stable-arm64-makefile.yml | 1 - .gitlab/ci/jobs/debian-stable-arm64.yml | 1 - .gitlab/ci/jobs/debian-testing-clang-amd64.yml | 1 - .gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml | 1 - .gitlab/ci/jobs/debian-testing-gcc-amd64.yml | 1 - 7 files changed, 7 deletions(-) diff --git a/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml b/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml index a6aebfac3..fee52c5a7 100644 --- a/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml +++ b/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml @@ -13,7 +13,6 @@ Debian stable:amd64 Makefile: variables: CC: x86_64-linux-gnu-gcc CXX: x86_64-linux-gnu-g++ - LDFLAGS: -Wl,-fuse-ld=gold OBJCOPY: x86_64-linux-gnu-objcopy OBJDUMP: x86_64-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig diff --git a/.gitlab/ci/jobs/debian-stable-amd64.yml b/.gitlab/ci/jobs/debian-stable-amd64.yml index ed1f5ce23..e58f5a112 100644 --- a/.gitlab/ci/jobs/debian-stable-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-amd64.yml @@ -13,7 +13,6 @@ Debian stable:amd64: variables: CC: x86_64-linux-gnu-gcc CXX: x86_64-linux-gnu-g++ - LDFLAGS: -Wl,-fuse-ld=gold OBJCOPY: x86_64-linux-gnu-objcopy OBJDUMP: x86_64-linux-gnu-objdump PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig diff --git a/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml b/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml index 53625138a..aa0ea3780 100644 --- a/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml +++ b/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml @@ -15,7 +15,6 @@ Debian stable:arm64 Makefile: variables: CC: aarch64-linux-gnu-gcc CXX: aarch64-linux-gnu-g++ - LDFLAGS: -Wl,-fuse-ld=gold OBJCOPY: aarch64-linux-gnu-objcopy OBJDUMP: aarch64-linux-gnu-objdump LD: aarch64-linux-gnu-ld diff --git a/.gitlab/ci/jobs/debian-stable-arm64.yml b/.gitlab/ci/jobs/debian-stable-arm64.yml index b0f02dd39..135d87aa5 100644 --- a/.gitlab/ci/jobs/debian-stable-arm64.yml +++ b/.gitlab/ci/jobs/debian-stable-arm64.yml @@ -15,7 +15,6 @@ Debian stable:arm64: variables: CC: aarch64-linux-gnu-gcc CXX: aarch64-linux-gnu-g++ - LDFLAGS: -Wl,-fuse-ld=gold OBJCOPY: aarch64-linux-gnu-objcopy OBJDUMP: aarch64-linux-gnu-objdump LD: aarch64-linux-gnu-ld diff --git a/.gitlab/ci/jobs/debian-testing-clang-amd64.yml b/.gitlab/ci/jobs/debian-testing-clang-amd64.yml index dc790b397..7349f2b92 100644 --- a/.gitlab/ci/jobs/debian-testing-clang-amd64.yml +++ b/.gitlab/ci/jobs/debian-testing-clang-amd64.yml @@ -19,4 +19,3 @@ Debian testing Clang: CXX: clang WFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror -Wno-deprecated-non-prototype -Wno-single-bit-bitfield-constant-conversion CFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror -Wno-deprecated-non-prototype -Wno-single-bit-bitfield-constant-conversion - LDFLAGS: -Wl,-fuse-ld=gold diff --git a/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml b/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml index 70d71b537..1165b1fea 100644 --- a/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml +++ b/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml @@ -19,7 +19,6 @@ Debian testing GCC Makefile: variables: CC: gcc CXX: g++ - LDFLAGS: -Wl,-fuse-ld=gold script: - - | diff --git a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml index 72bfdc3e3..fc998ea47 100644 --- a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml +++ b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml @@ -19,7 +19,6 @@ Debian testing GCC: variables: CC: gcc CXX: g++ - LDFLAGS: -Wl,-fuse-ld=gold script: - - | From 646929d83dc8c4441d6eb1e3644d3f08420c284f Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 23 Feb 2025 12:21:37 -0500 Subject: [PATCH 13/44] netcode: fix runtime issues with -noipv4 --- src/netcode/i_tcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/netcode/i_tcp.c b/src/netcode/i_tcp.c index 9a261fb4e..38d4bbbaa 100644 --- a/src/netcode/i_tcp.c +++ b/src/netcode/i_tcp.c @@ -656,7 +656,7 @@ static inline ssize_t SOCK_SendToAddr(SOCKET_TYPE socket, mysockaddr_t *sockaddr return sendto(socket, (char *)&doomcom->data, doomcom->datalength, 0, &sockaddr->any, d); } -#define ALLOWEDERROR(x) ((x) == ECONNREFUSED || (x) == EWOULDBLOCK || (x) == EHOSTUNREACH || (x) == ENETUNREACH) +#define ALLOWEDERROR(x) ((x) == ECONNREFUSED || (x) == EWOULDBLOCK || (x) == EHOSTUNREACH || (x) == ENETUNREACH || (x) == EADDRNOTAVAIL) static void SOCK_Send(void) { @@ -710,7 +710,7 @@ static void SOCK_Send(void) } } - if (c == ERRSOCKET && e != -1) // -1 means no socket for the address family was found + if (c == ERRSOCKET && e != 0) // 0 means no socket for the address family was found { if (!ALLOWEDERROR(e)) I_Error("SOCK_Send, error sending to node %d (%s) #%u, %s", doomcom->remotenode, From e06eead3eb7c24f82dfc3895829b2105ca3815e0 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 26 Feb 2025 21:01:47 -0500 Subject: [PATCH 14/44] GitLab CI: no more Gold linker --- .gitlab/ci/jobs/debian-stable-clang-amd64.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml index c40998e17..0b8e6e50c 100644 --- a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml @@ -19,7 +19,6 @@ Debian stable Clang: CXX: clang WFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror CFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror - LDFLAGS: -Wl,-fuse-ld=gold script: - - | From db7508f7e43910c925e54369f2c15543d9909683 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 26 Feb 2025 21:02:48 -0500 Subject: [PATCH 15/44] GitLab CI: use "ccache --set-config" over tee on the ccache.conf file --- .gitlab/ci/jobs/alpine-3-gcc-makefile.yml | 12 +++++------- .gitlab/ci/jobs/alpine-3-gcc.yml | 12 +++++------- .gitlab/ci/templates/srb2ci.yml | 12 +++++------- 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml b/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml index 6b0b6a06f..3a17e0933 100644 --- a/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml +++ b/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml @@ -58,26 +58,24 @@ Alpine 3 GCC Makefile: - - | # ccache_config echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config" - - mkdir --parents --verbose ~/.ccache/ - - touch ~/.ccache/ccache.conf - | # cache.conf echo Adding ccache configution option - | # base_dir - echo base_dir = $PWD | tee -a ~/.ccache/ccache.conf + ccache --set-config base_dir=$CI_PROJECT_DIR - | # cache_dir - echo cache_dir = $PWD/ccache | tee -a ~/.ccache/ccache.conf + ccache --set-config cache_dir=$CI_PROJECT_DIR/build/ccache - | # compiler_check - echo compiler_check = content | tee -a ~/.ccache/ccache.conf + ccache --set-config compiler_check=content - | # stats_log - echo stats_log = $PWD/ccache_statslog | tee -a ~/.ccache/ccache.conf + ccache --set-config stats_log=$CI_PROJECT_DIR/build/ccache_statslog - | # max_size - echo max_size = 50M | tee -a ~/.ccache/ccache.conf + ccache --set-config max_size=300M - | # ccache_config echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K" diff --git a/.gitlab/ci/jobs/alpine-3-gcc.yml b/.gitlab/ci/jobs/alpine-3-gcc.yml index 72994d405..56339e332 100644 --- a/.gitlab/ci/jobs/alpine-3-gcc.yml +++ b/.gitlab/ci/jobs/alpine-3-gcc.yml @@ -58,26 +58,24 @@ Alpine 3 GCC: - - | # ccache_config echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config" - - mkdir --parents --verbose ~/.ccache/ - - touch ~/.ccache/ccache.conf - | # cache.conf echo Adding ccache configution option - | # base_dir - echo base_dir = $PWD | tee -a ~/.ccache/ccache.conf + ccache --set-config base_dir=$CI_PROJECT_DIR - | # cache_dir - echo cache_dir = $PWD/ccache | tee -a ~/.ccache/ccache.conf + ccache --set-config cache_dir=$CI_PROJECT_DIR/build/ccache - | # compiler_check - echo compiler_check = content | tee -a ~/.ccache/ccache.conf + ccache --set-config compiler_check=content - | # stats_log - echo stats_log = $PWD/ccache_statslog | tee -a ~/.ccache/ccache.conf + ccache --set-config stats_log=$CI_PROJECT_DIR/build/ccache_statslog - | # max_size - echo max_size = 50M | tee -a ~/.ccache/ccache.conf + ccache --set-config max_size=300M - | # ccache_config echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K" diff --git a/.gitlab/ci/templates/srb2ci.yml b/.gitlab/ci/templates/srb2ci.yml index bdf8a3ed6..102f5925d 100644 --- a/.gitlab/ci/templates/srb2ci.yml +++ b/.gitlab/ci/templates/srb2ci.yml @@ -93,26 +93,24 @@ - - | # ccache_config echo -e "\e[0Ksection_start:`date +%s`:ccache_config[collapsed=true]\r\e[0KSetting up ccache config" - - mkdir --parents --verbose ~/.ccache/ - - touch ~/.ccache/ccache.conf - | # cache.conf echo Adding ccache configution option - | # base_dir - echo base_dir = $CI_PROJECT_DIR | tee --append ~/.ccache/ccache.conf + ccache --set-config base_dir=$CI_PROJECT_DIR - | # cache_dir - echo cache_dir = $CI_PROJECT_DIR/build/ccache | tee --append ~/.ccache/ccache.conf + ccache --set-config cache_dir=$CI_PROJECT_DIR/build/ccache - | # compiler_check - echo compiler_check = content | tee --append ~/.ccache/ccache.conf + ccache --set-config compiler_check=content - | # stats_log - echo stats_log = $CI_PROJECT_DIR/build/ccache_statslog | tee --append ~/.ccache/ccache.conf + ccache --set-config stats_log=$CI_PROJECT_DIR/build/ccache_statslog - | # max_size - echo max_size = 300M | tee --append ~/.ccache/ccache.conf + ccache --set-config max_size=300M - | # ccache_config echo -e "\e[0Ksection_end:`date +%s`:ccache_config\r\e[0K" From fa4924bc1950a101b74d1e36dbed23e1890e0ab6 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 26 Feb 2025 21:16:20 -0500 Subject: [PATCH 16/44] GitLab CI: MacOS build does not use vcpkg --- .gitlab/ci/jobs/macos-x86_64.yml | 60 +------------------------------- 1 file changed, 1 insertion(+), 59 deletions(-) diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index d40ae65f6..3955a6a48 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -1,38 +1,13 @@ osxcross x86_64: extends: .srb2ci - stage: build - - cache: - - key: ccache-$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG - fallback_keys: - - ccache-$CI_JOB_NAME_SLUG-$CI_DEFAULT_BRANCH - - ccache-$CI_JOB_NAME_SLUG-master - paths: - - build/ccache - - build/ccache_statslog - - - key: apt-$CI_JOB_IMAGE - paths: - - build/apt-cache - unprotect: true - - - key: vcpkg-root - paths: - - build/vcpkg-root - unprotect: true - - - key: vcpkg-binary-cache-x64-osx - paths: - - build/vcpkg-binary-cache - unprotect: true + stage: osxcross artifacts: paths: - "build.x86_64/bin/" - "build.x86_64/dist/x86_64.h" - "build.x86_64/src/config.h" - expose_as: "Mac x86_64" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86_64-apple-darwin21.4" variables: @@ -40,27 +15,6 @@ osxcross x86_64: LD: x86_64-apple-darwin21.4-ld script: - - | - # vcpkg - echo -e "\e[0Ksection_start:`date +%s`:vcpkg-root[collapsed=true]\r\e[0KUpdating vcpkg" - - if [ -d "build/vcpkg-root" ]; then - pushd build/vcpkg-root - git fetch https://github.com/Microsoft/vcpkg master - git reset --hard FETCH_HEAD - popd - else - mkdir -p build - git clone https://github.com/Microsoft/vcpkg build/vcpkg-root - fi - - export VCPKG_ROOT=$(pwd)/build/vcpkg-root - export VCPKG_BINARY_SOURCES="clear;files,$(pwd)/build/vcpkg-binary-cache,readwrite" - - mkdir -p "build/vcpkg-binary-cache" - - echo -e "\e[0Ksection_end:`date +%s`:vcpkg-root\r\e[0K" - - - | # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" @@ -105,18 +59,6 @@ osxcross x86_64: # apt_clean echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" - - - | - # vcpkg_clean - echo -e "\e[0Ksection_start:`date +%s`:vcpkg_clean[collapsed=true]\r\e[0KCleaning vcpkg-root" - - if [ -d "build/vcpkg-root" ]; then - pushd "build/vcpkg-root" - git clean - popd - fi - - echo -e "\e[0Ksection_end:`date +%s`:vcpkg_clean\r\e[0K" - - - | # ccache_stats echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" From 7cbec739716f3d2fe7d5228b799342f9276b42da Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 26 Feb 2025 21:17:00 -0500 Subject: [PATCH 17/44] GitLab CI: do not checkout own copy of vcpkg, use the one that comes with the builder image --- .gitlab/ci/jobs/windows-x64.yml | 32 ++------------------------------ .gitlab/ci/jobs/windows-x86.yml | 32 ++------------------------------ 2 files changed, 4 insertions(+), 60 deletions(-) diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index 73791e82a..36f12e308 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -21,11 +21,6 @@ Windows x64: - build/apt-cache unprotect: true - - key: vcpkg-root - paths: - - build/vcpkg-root - unprotect: true - - key: vcpkg-binary-cache-x64-mingw-static paths: - build/vcpkg-binary-cache @@ -46,20 +41,9 @@ Windows x64: script: - | # vcpkg - echo -e "\e[0Ksection_start:`date +%s`:vcpkg-root[collapsed=true]\r\e[0KUpdating vcpkg" + echo -e "\e[0Ksection_start:`date +%s`:vcpkg-root[collapsed=true]\r\e[0KSetting vcpkg cache" - if [ -d "build/vcpkg-root" ]; then - pushd build/vcpkg-root - git fetch https://github.com/Microsoft/vcpkg master - git reset --hard FETCH_HEAD - popd - else - mkdir -p build - git clone https://github.com/Microsoft/vcpkg build/vcpkg-root - fi - - export VCPKG_ROOT=$(pwd)/build/vcpkg-root - export VCPKG_BINARY_SOURCES="clear;files,/opt/vcpkg.bsources,read;files,$(pwd)/build/vcpkg-binary-cache,readwrite" + export VCPKG_DEFAULT_BINARY_CACHE="$(pwd)/build/vcpkg-binary-cache" mkdir -p "build/vcpkg-binary-cache" @@ -106,18 +90,6 @@ Windows x64: # apt_clean echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" - - - | - # vcpkg_clean - echo -e "\e[0Ksection_start:`date +%s`:vcpkg_clean[collapsed=true]\r\e[0KCleaning vcpkg-root" - - if [ -d "build/vcpkg-root" ]; then - pushd "build/vcpkg-root" - git clean -f - popd - fi - - echo -e "\e[0Ksection_end:`date +%s`:vcpkg_clean\r\e[0K" - - - | # ccache_stats echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index 9a33364b2..7a298731d 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -17,11 +17,6 @@ Windows x86: - build/apt-cache unprotect: true - - key: vcpkg-root - paths: - - build/vcpkg-root - unprotect: true - - key: vcpkg-binary-cache-x86-mingw-static paths: - build/vcpkg-binary-cache @@ -42,20 +37,9 @@ Windows x86: script: - | # vcpkg - echo -e "\e[0Ksection_start:`date +%s`:vcpkg-root[collapsed=true]\r\e[0KUpdating vcpkg" + echo -e "\e[0Ksection_start:`date +%s`:vcpkg-root[collapsed=true]\r\e[0KSetting vcpkg cache" - if [ -d "build/vcpkg-root" ]; then - pushd build/vcpkg-root - git fetch https://github.com/Microsoft/vcpkg master - git reset --hard FETCH_HEAD - popd - else - mkdir -p build - git clone https://github.com/Microsoft/vcpkg build/vcpkg-root - fi - - export VCPKG_ROOT=$(pwd)/build/vcpkg-root - export VCPKG_BINARY_SOURCES="clear;files,/opt/vcpkg.bsources,read;files,$(pwd)/build/vcpkg-binary-cache,readwrite" + export VCPKG_DEFAULT_BINARY_CACHE="$(pwd)/build/vcpkg-binary-cache" mkdir -p "build/vcpkg-binary-cache" @@ -102,18 +86,6 @@ Windows x86: # apt_clean echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" - - - | - # vcpkg_clean - echo -e "\e[0Ksection_start:`date +%s`:vcpkg_clean[collapsed=true]\r\e[0KCleaning vcpkg-root" - - if [ -d "build/vcpkg-root" ]; then - pushd "build/vcpkg-root" - git clean -f - popd - fi - - echo -e "\e[0Ksection_end:`date +%s`:vcpkg_clean\r\e[0K" - - - | # ccache_stats echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" From c7801bdf6d915f80a4e3a53a746554305470a864 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 26 Feb 2025 21:55:14 -0500 Subject: [PATCH 18/44] GitLab CI: move around stages --- .gitlab-ci.yml | 8 +++++++- .gitlab/ci/jobs/alpine-3-gcc-makefile.yml | 2 +- .gitlab/ci/jobs/alpine-3-gcc.yml | 2 +- .gitlab/ci/jobs/batocera-arm64-makefile.yml | 2 ++ .gitlab/ci/jobs/batocera-arm64.yml | 2 ++ .gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml | 2 ++ .gitlab/ci/jobs/debian-oldstable-amd64.yml | 2 ++ .gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml | 2 ++ .gitlab/ci/jobs/debian-oldstable-arm64.yml | 2 ++ .gitlab/ci/jobs/debian-stable-amd64-makefile.yml | 2 +- .gitlab/ci/jobs/debian-stable-amd64.yml | 2 +- .gitlab/ci/jobs/debian-stable-arm64-makefile.yml | 2 +- .gitlab/ci/jobs/debian-stable-arm64.yml | 2 +- .gitlab/ci/jobs/debian-stable-clang-amd64.yml | 2 +- .gitlab/ci/jobs/debian-stable-i386-makefile.yml | 2 +- .gitlab/ci/jobs/debian-stable-i386.yml | 2 +- .gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml | 2 +- .gitlab/ci/jobs/debian-testing-gcc-amd64.yml | 2 +- .gitlab/ci/jobs/macos-arm64.yml | 3 +-- .gitlab/ci/jobs/windows-x64-makefile.yml | 2 +- .gitlab/ci/jobs/windows-x64.yml | 2 +- .gitlab/ci/jobs/windows-x86-makefile.yml | 2 +- .gitlab/ci/jobs/windows-x86.yml | 2 +- 23 files changed, 35 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 14c36213e..39b032df8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,7 +11,13 @@ variables: GIT_DEPTH: 20 stages: - - build + - clang + - alpine + - oldstable + - stable + - batocera + - testing + - win32 - osxcross default: diff --git a/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml b/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml index 3a17e0933..962f4fc54 100644 --- a/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml +++ b/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml @@ -1,5 +1,5 @@ Alpine 3 GCC Makefile: - stage: build + stage: alpine when: manual diff --git a/.gitlab/ci/jobs/alpine-3-gcc.yml b/.gitlab/ci/jobs/alpine-3-gcc.yml index 56339e332..30a2dee77 100644 --- a/.gitlab/ci/jobs/alpine-3-gcc.yml +++ b/.gitlab/ci/jobs/alpine-3-gcc.yml @@ -1,5 +1,5 @@ Alpine 3 GCC: - stage: build + stage: alpine when: manual diff --git a/.gitlab/ci/jobs/batocera-arm64-makefile.yml b/.gitlab/ci/jobs/batocera-arm64-makefile.yml index e02497d40..6b729195e 100644 --- a/.gitlab/ci/jobs/batocera-arm64-makefile.yml +++ b/.gitlab/ci/jobs/batocera-arm64-makefile.yml @@ -1,6 +1,8 @@ batocera:arm64 Makefile: extends: Debian stable:arm64 Makefile + stage: batocera + when: manual allow_failure: true diff --git a/.gitlab/ci/jobs/batocera-arm64.yml b/.gitlab/ci/jobs/batocera-arm64.yml index 3dcd73a0e..01bebc752 100644 --- a/.gitlab/ci/jobs/batocera-arm64.yml +++ b/.gitlab/ci/jobs/batocera-arm64.yml @@ -1,6 +1,8 @@ batocera:arm64: extends: Debian stable:arm64 + stage: batocera + when: manual allow_failure: true diff --git a/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml b/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml index bd4a92741..9f54349e0 100644 --- a/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml +++ b/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml @@ -1,6 +1,8 @@ Debian oldstable:amd64 Makefile: extends: Debian stable:amd64 Makefile + stage: oldstable + when: manual image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable diff --git a/.gitlab/ci/jobs/debian-oldstable-amd64.yml b/.gitlab/ci/jobs/debian-oldstable-amd64.yml index 231e8485d..90f6fd733 100644 --- a/.gitlab/ci/jobs/debian-oldstable-amd64.yml +++ b/.gitlab/ci/jobs/debian-oldstable-amd64.yml @@ -1,6 +1,8 @@ Debian oldstable:amd64: extends: Debian stable:amd64 + stage: oldstable + when: manual image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable diff --git a/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml b/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml index 426934bf9..4009fee3f 100644 --- a/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml +++ b/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml @@ -1,6 +1,8 @@ Debian oldstable:arm64 Makefile: extends: Debian stable:arm64 Makefile + stage: oldstable + when: manual image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable diff --git a/.gitlab/ci/jobs/debian-oldstable-arm64.yml b/.gitlab/ci/jobs/debian-oldstable-arm64.yml index 76d401309..75b563199 100644 --- a/.gitlab/ci/jobs/debian-oldstable-arm64.yml +++ b/.gitlab/ci/jobs/debian-oldstable-arm64.yml @@ -1,6 +1,8 @@ Debian oldstable:arm64: extends: Debian stable:arm64 + stage: oldstable + when: manual image: git.do.srb2.org:5050/stjr/srb2ci/srb2ci:oldstable diff --git a/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml b/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml index fee52c5a7..5d30dfe02 100644 --- a/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml +++ b/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml @@ -1,7 +1,7 @@ Debian stable:amd64 Makefile: extends: .srb2ci - stage: build + stage: stable artifacts: paths: diff --git a/.gitlab/ci/jobs/debian-stable-amd64.yml b/.gitlab/ci/jobs/debian-stable-amd64.yml index e58f5a112..7377cfe1d 100644 --- a/.gitlab/ci/jobs/debian-stable-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-amd64.yml @@ -1,7 +1,7 @@ Debian stable:amd64: extends: .srb2ci - stage: build + stage: stable artifacts: paths: diff --git a/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml b/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml index aa0ea3780..b00ebe7e0 100644 --- a/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml +++ b/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml @@ -1,7 +1,7 @@ Debian stable:arm64 Makefile: extends: .srb2ci - stage: build + stage: stable when: manual diff --git a/.gitlab/ci/jobs/debian-stable-arm64.yml b/.gitlab/ci/jobs/debian-stable-arm64.yml index 135d87aa5..d3446cd77 100644 --- a/.gitlab/ci/jobs/debian-stable-arm64.yml +++ b/.gitlab/ci/jobs/debian-stable-arm64.yml @@ -1,7 +1,7 @@ Debian stable:arm64: extends: .srb2ci - stage: build + stage: stable when: manual diff --git a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml index 0b8e6e50c..1296a3347 100644 --- a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml @@ -1,7 +1,7 @@ Debian stable Clang: extends: .srb2ci - stage: build + stage: clang when: on_success diff --git a/.gitlab/ci/jobs/debian-stable-i386-makefile.yml b/.gitlab/ci/jobs/debian-stable-i386-makefile.yml index dd572ec38..acf757556 100644 --- a/.gitlab/ci/jobs/debian-stable-i386-makefile.yml +++ b/.gitlab/ci/jobs/debian-stable-i386-makefile.yml @@ -1,7 +1,7 @@ Debian stable:i386 Makefile: extends: .srb2ci - stage: build + stage: stable when: manual diff --git a/.gitlab/ci/jobs/debian-stable-i386.yml b/.gitlab/ci/jobs/debian-stable-i386.yml index 970b92a69..ff3dbface 100644 --- a/.gitlab/ci/jobs/debian-stable-i386.yml +++ b/.gitlab/ci/jobs/debian-stable-i386.yml @@ -1,7 +1,7 @@ Debian stable:i386: extends: .srb2ci - stage: build + stage: stable when: manual diff --git a/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml b/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml index 1165b1fea..e3cc09256 100644 --- a/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml +++ b/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml @@ -1,7 +1,7 @@ Debian testing GCC Makefile: extends: .srb2ci - stage: build + stage: testing when: manual diff --git a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml index fc998ea47..fbad8dfb3 100644 --- a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml +++ b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml @@ -1,7 +1,7 @@ Debian testing GCC: extends: .srb2ci - stage: build + stage: testing when: manual diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index 1c89000c2..6067444e8 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -1,14 +1,13 @@ osxcross arm64: extends: .srb2ci - stage: build + stage: osxcross artifacts: paths: - "build.arm64/bin/" - "build.arm64/dist/arm64.h" - "build.arm64/src/config.h" - expose_as: "Mac arm64" name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-arm64-apple-darwin21.4" variables: diff --git a/.gitlab/ci/jobs/windows-x64-makefile.yml b/.gitlab/ci/jobs/windows-x64-makefile.yml index 8da30d2b9..8fdc53073 100644 --- a/.gitlab/ci/jobs/windows-x64-makefile.yml +++ b/.gitlab/ci/jobs/windows-x64-makefile.yml @@ -1,7 +1,7 @@ Windows x64 Makefile: extends: .srb2ci - stage: build + stage: win32 when: manual diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index 36f12e308..b44097044 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -1,7 +1,7 @@ Windows x64: extends: .srb2ci - stage: build + stage: win32 when: manual diff --git a/.gitlab/ci/jobs/windows-x86-makefile.yml b/.gitlab/ci/jobs/windows-x86-makefile.yml index 213342cda..d81baf2f1 100644 --- a/.gitlab/ci/jobs/windows-x86-makefile.yml +++ b/.gitlab/ci/jobs/windows-x86-makefile.yml @@ -1,7 +1,7 @@ Windows x86 Makefile: extends: .srb2ci - stage: build + stage: win32 when: on_success diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index 7a298731d..22b799cda 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -1,7 +1,7 @@ Windows x86: extends: .srb2ci - stage: build + stage: win32 cache: - key: ccache-$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG From 18d47ebbd3686a9f0f90700eee24e3f232463ba1 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 26 Feb 2025 22:49:01 -0500 Subject: [PATCH 19/44] GitLab CI: use short names like oa64/o64 so we can switch SDKs --- .gitlab/ci/jobs/macos-arm64.yml | 6 +++--- .gitlab/ci/jobs/macos-x86_64.yml | 10 +++++----- ...{osxccross-universal.yml => osxcross-universal.yml} | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) rename .gitlab/ci/jobs/{osxccross-universal.yml => osxcross-universal.yml} (98%) diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index 6067444e8..dfa258b86 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -8,11 +8,11 @@ osxcross arm64: - "build.arm64/bin/" - "build.arm64/dist/arm64.h" - "build.arm64/src/config.h" - name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-arm64-apple-darwin21.4" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-arm64-apple-darwin" variables: - OSXCROSS_HOST: arm64-apple-darwin21.4 - LD: arm64-apple-darwin21.4-ld + OSXCROSS_HOST: oa64 + LD: /opt/osxcross.arm64/ld script: - - | diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index 3955a6a48..dcdceadc6 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -8,18 +8,18 @@ osxcross x86_64: - "build.x86_64/bin/" - "build.x86_64/dist/x86_64.h" - "build.x86_64/src/config.h" - name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86_64-apple-darwin21.4" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86_64-apple-darwin" variables: - OSXCROSS_HOST: x86_64-apple-darwin21.4 - LD: x86_64-apple-darwin21.4-ld + OSXCROSS_HOST: o64 + LD: /opt/osxcross.x86_64/ld script: - - | # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - - osxcross-macports install libxmp wavpack libopenmpt opusfile || osxcross-macports install libxmp wavpack libopenmpt opusfile - - osxcross-macports install --static curl libsdl2_mixer libpng || osxcross-macports install --static curl libsdl2_mixer libpng + - osxcross-macports install libxmp wavpack libopenmpt opusfile || osxcross-macports install libxmp wavpack libopenmpt opusfile + - osxcross-macports install --static curl libsdl2_mixer libpng || osxcross-macports install --static curl libsdl2_mixer libpng - | # apt_development echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K" diff --git a/.gitlab/ci/jobs/osxccross-universal.yml b/.gitlab/ci/jobs/osxcross-universal.yml similarity index 98% rename from .gitlab/ci/jobs/osxccross-universal.yml rename to .gitlab/ci/jobs/osxcross-universal.yml index 841151f60..42bc12a57 100644 --- a/.gitlab/ci/jobs/osxccross-universal.yml +++ b/.gitlab/ci/jobs/osxcross-universal.yml @@ -15,7 +15,7 @@ osxcross universal: - "dist/bin" - "dist/src" expose_as: "Mac Universal" - name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-lipo-apple-darwin21.4" + name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-lipo-apple-darwin" script: - - | From 37043e367bdc44d0808fc4d189c9e28a2655f7e7 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 26 Feb 2025 22:50:53 -0500 Subject: [PATCH 20/44] GitLab CI: use clang++ as CXX for clang builds --- .gitlab/ci/jobs/debian-stable-clang-amd64.yml | 2 +- .gitlab/ci/jobs/debian-testing-clang-amd64.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml index 1296a3347..2a7704ed9 100644 --- a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml @@ -16,7 +16,7 @@ Debian stable Clang: variables: CC: clang - CXX: clang + CXX: clang++ WFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror CFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror diff --git a/.gitlab/ci/jobs/debian-testing-clang-amd64.yml b/.gitlab/ci/jobs/debian-testing-clang-amd64.yml index 7349f2b92..132e72642 100644 --- a/.gitlab/ci/jobs/debian-testing-clang-amd64.yml +++ b/.gitlab/ci/jobs/debian-testing-clang-amd64.yml @@ -16,6 +16,6 @@ Debian testing Clang: variables: CC: clang - CXX: clang + CXX: clang++ WFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror -Wno-deprecated-non-prototype -Wno-single-bit-bitfield-constant-conversion CFLAGS: -Wno-cast-align -Wno-implicit-const-int-float-conversion -Werror -Wno-deprecated-non-prototype -Wno-single-bit-bitfield-constant-conversion From 893db88809a10cb6da07fcf4b0192caf4959b801 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Thu, 27 Feb 2025 04:34:07 -0500 Subject: [PATCH 21/44] GitLab CI: install miniupnpc from macports --- .gitlab/ci/jobs/macos-arm64.yml | 2 +- .gitlab/ci/jobs/macos-x86_64.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index dfa258b86..775025467 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -19,7 +19,7 @@ osxcross arm64: # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - osxcross-macports install --arm64 libxmp wavpack libopenmpt opusfile || osxcross-macports install --arm64 libxmp wavpack libopenmpt opusfile - - osxcross-macports install --static --arm64 curl libsdl2_mixer libpng || osxcross-macports install --static --arm64 curl libsdl2_mixer libpng + - osxcross-macports install --static --arm64 miniupnpc libpng curl libsdl2_mixer || osxcross-macports install --static --arm64 miniupnpc libpng curl libsdl2_mixer - | # apt_development echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K" diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index dcdceadc6..5f59f5cd7 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -18,8 +18,8 @@ osxcross x86_64: - - | # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - - osxcross-macports install libxmp wavpack libopenmpt opusfile || osxcross-macports install libxmp wavpack libopenmpt opusfile - - osxcross-macports install --static curl libsdl2_mixer libpng || osxcross-macports install --static curl libsdl2_mixer libpng + - osxcross-macports install libopenmpt libxmp wavpack opusfile || osxcross-macports install libopenmpt libxmp wavpack opusfile + - osxcross-macports install --static miniupnpc curl libsdl2_mixer libpng || osxcross-macports install --static miniupnpc curl libsdl2_mixer libpng - | # apt_development echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K" From a923bf70959b8365d9cbde71c9d65718ae0e5d2c Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 17 Feb 2025 18:49:16 -0500 Subject: [PATCH 22/44] SDL_Mixer: Added newlines for mixer errors --- src/sdl/mixer_sound.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c index 8f2ca3408..0ab4ce917 100644 --- a/src/sdl/mixer_sound.c +++ b/src/sdl/mixer_sound.c @@ -135,7 +135,7 @@ static void Midiplayer_Onchange(void) if (Mix_GetMidiPlayer() != cv_midiplayer.value) { if (Mix_SetMidiPlayer(cv_midiplayer.value)) // <> 0 means error - CONS_Alert(CONS_ERROR, "Midi player error: %s", Mix_GetError()); + CONS_Alert(CONS_ERROR, "Midi player error: %s\n", Mix_GetError()); else restart = true; } @@ -143,7 +143,7 @@ static void Midiplayer_Onchange(void) if (!Mix_GetSoundFonts() || stricmp(Mix_GetSoundFonts(), cv_midisoundfontpath.string)) { if (!Mix_SetSoundFonts(cv_midisoundfontpath.string)) // == 0 means error - CONS_Alert(CONS_ERROR, "Sound font error: %s", Mix_GetError()); + CONS_Alert(CONS_ERROR, "Sound font error: %s\n", Mix_GetError()); else restart = true; } @@ -190,7 +190,7 @@ static void MidiSoundfontPath_Onchange(void) if (proceed) { if (!Mix_SetSoundFonts(cv_midisoundfontpath.string)) - CONS_Alert(CONS_ERROR, "Sound font error: %s", Mix_GetError()); + CONS_Alert(CONS_ERROR, "Sound font error: %s\n", Mix_GetError()); else S_StartEx(true); } From 75fb1cd2aa1d5563620e5713bdf6ea40ccdb4268 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 17 Feb 2025 18:50:05 -0500 Subject: [PATCH 23/44] SDL_Mixer: options for all MIDI players in SDL-Mixer-X 2.5.0+ --- src/sdl/mixer_sound.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c index 0ab4ce917..0f9983ee1 100644 --- a/src/sdl/mixer_sound.c +++ b/src/sdl/mixer_sound.c @@ -199,7 +199,18 @@ static void MidiSoundfontPath_Onchange(void) // make sure that s_sound.c does not already verify these // which happens when: defined(HAVE_MIXERX) && !defined(HAVE_MIXER) -static CV_PossibleValue_t midiplayer_cons_t[] = {{MIDI_OPNMIDI, "OPNMIDI"}, {MIDI_Fluidsynth, "Fluidsynth"}, {MIDI_Timidity, "Timidity"}, {MIDI_Native, "Native"}, {0, NULL}}; +static CV_PossibleValue_t midiplayer_cons_t[] = { + {MIDI_ADLMIDI, "ADLMIDI"}, + {MIDI_OPNMIDI, "OPNMIDI"}, + {MIDI_Timidity, "Timidity"}, + {MIDI_Fluidsynth, "Fluidsynth"}, +#if SDL_MIXER_VERSION_ATLEAST(2,6,0) + {MIDI_EDMIDI, "EDMIDI"}, +#endif + {MIDI_Native, "Native"}, + {MIDI_ANY, "Any"}, + {0, NULL} +}; consvar_t cv_midiplayer = CVAR_INIT ("midiplayer", "OPNMIDI" /*MIDI_OPNMIDI*/, CV_CALL|CV_NOINIT|CV_SAVE, midiplayer_cons_t, Midiplayer_Onchange); consvar_t cv_midisoundfontpath = CVAR_INIT ("midisoundfont", "sf2/8bitsf.SF2", CV_CALL|CV_NOINIT|CV_SAVE, NULL, MidiSoundfontPath_Onchange); consvar_t cv_miditimiditypath = CVAR_INIT ("midisoundbank", "./timidity", CV_SAVE, NULL, NULL); From 2511312504f7a3d3f3bf9d3d0ffc9e5b43dee59a Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 12 Feb 2025 09:06:41 -0500 Subject: [PATCH 24/44] vcpkg: testing compiling with x86-linux, x64-linux, arm64-linux, x86-mingw-static and x64-mingw-static --- vcpkg.json | 161 ++++++++++++++++++++++++++--------------------------- 1 file changed, 78 insertions(+), 83 deletions(-) diff --git a/vcpkg.json b/vcpkg.json index 07c4244ad..36626c3e9 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,85 +1,80 @@ { - "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", - "name": "srb2", - "version": "1.0.0", - "builtin-baseline": "c823fd3e57035b10d970a96da2796a2db55e5df5", - "dependencies": [ - "curl", - { - "name": "libgme", - "platform": "!(windows & mingw) & !native" - }, - { - "name": "libopenmpt", - "platform": "!(windows & mingw)" - }, - "libpng", - "miniupnpc", - "sdl2", - { - "name": "sdl2-mixer-ext", - "features": [ - { - "name": "cmd", - "platform": "linux" - }, - { - "name": "libflac", - "platform": "!(windows & mingw & !static)" - }, - { - "name": "libgme", - "platform": "!(windows & mingw) & !native" - }, - { - "name": "libmodplug", - "platform": "!(windows & mingw)" - }, - { - "name": "libopnmidi", - "platform": "!(windows & mingw)" - }, - { - "name": "libvorbis", - "platform": "!(windows & mingw & !static)" - }, - { - "name": "libxmp", - "platform": "!(windows & mingw)" - }, - { - "name": "mpg123", - "platform": "!(windows & mingw)" - }, - { - "name": "nativemidi", - "platform": "!(windows & mingw)" - }, - { - "name": "opusfile", - "platform": "!(windows & mingw)" - }, - { - "name": "pxtone", - "platform": "!(windows & mingw)" - }, - { - "name": "timidity", - "platform": "!(windows & mingw)" - }, - { - "name": "wavpack", - "platform": "!(windows & mingw)" - } - ] - }, - "zlib" - ], - "overrides": [ - { - "name": "sdl2", - "version": "2.28.5", - "port-version": 1 - } - ] + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", + "name": "srb2", + "version": "1.0.0", + "dependencies": [ + { + "name": "zlib" + }, + { + "name": "libpng" + }, + { + "name": "curl", + "platform": "!(osx & !native)" + }, + { + "name": "libopenmpt" + }, + { + "name": "libgme" + }, + { + "name": "miniupnpc" + }, + { + "name": "sdl2", + "default-features": false, + "features": [ + { + "name": "wayland", + "platform": "linux" + }, + { + "name": "x11", + "platform": "!windows" + } + ] + }, + { + "name": "sdl2-mixer-ext", + "default-features": true, + "features": [ + { + "name": "ffmpeg" + }, + { + "name": "fluidsynth", + "platform": "!(osx & !native)" + }, + { + "name": "libflac" + }, + { + "name": "libgme" + }, + { + "name": "libmodplug" + }, + { + "name": "libvorbis" + }, + { + "name": "libxmp" + }, + { + "name": "mpg123" + }, + { + "name": "opusfile" + }, + { + "name": "pxtone" + }, + { + "name": "timidity" + } + ] + } + ] } From 3683a8f939eeb74106fa3321414c12eb1d516906 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 28 Feb 2025 21:02:25 -0500 Subject: [PATCH 25/44] vcpkg: format-manifest --- vcpkg.json | 127 +++++++++++++++++++++-------------------------------- 1 file changed, 49 insertions(+), 78 deletions(-) diff --git a/vcpkg.json b/vcpkg.json index 36626c3e9..dd714dc65 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,80 +1,51 @@ { - "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", - "name": "srb2", - "version": "1.0.0", - "dependencies": [ - { - "name": "zlib" - }, - { - "name": "libpng" - }, - { - "name": "curl", - "platform": "!(osx & !native)" - }, - { - "name": "libopenmpt" - }, - { - "name": "libgme" - }, - { - "name": "miniupnpc" - }, - { - "name": "sdl2", - "default-features": false, - "features": [ - { - "name": "wayland", - "platform": "linux" - }, - { - "name": "x11", - "platform": "!windows" - } - ] - }, - { - "name": "sdl2-mixer-ext", - "default-features": true, - "features": [ - { - "name": "ffmpeg" - }, - { - "name": "fluidsynth", - "platform": "!(osx & !native)" - }, - { - "name": "libflac" - }, - { - "name": "libgme" - }, - { - "name": "libmodplug" - }, - { - "name": "libvorbis" - }, - { - "name": "libxmp" - }, - { - "name": "mpg123" - }, - { - "name": "opusfile" - }, - { - "name": "pxtone" - }, - { - "name": "timidity" - } - ] - } - ] + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", + "name": "srb2", + "version": "1.0.0", + "builtin-baseline": "d5ec528843d29e3a52d745a64b469f810b2cedbf", + "dependencies": [ + { + "name": "curl", + "platform": "!(osx & !native)" + }, + "libgme", + "libopenmpt", + "libpng", + "miniupnpc", + { + "name": "sdl2", + "default-features": false, + "features": [ + { + "name": "wayland", + "platform": "linux" + }, + { + "name": "x11", + "platform": "!windows" + } + ], + "platform": "!(osx & !native)", + "version>=": "2.30.7" + }, + { + "name": "sdl2-mixer-ext", + "features": [ + "ffmpeg", + "fluidsynth", + "libflac", + "libgme", + "libmodplug", + "libvorbis", + "libxmp", + "mpg123", + "opusfile", + "pxtone", + "timidity" + ], + "platform": "!(osx & !native)", + "version>=": "2.6.0" + }, + "zlib" + ] } From fc7768fad96bed9944a3ca28edd0374bcd0b1210 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 28 Feb 2025 21:03:00 -0500 Subject: [PATCH 26/44] GitLab CI: do not force CC/CXX with Mingw32 vcpkg builds --- .gitlab/ci/jobs/windows-x64.yml | 2 -- .gitlab/ci/jobs/windows-x86.yml | 2 -- 2 files changed, 4 deletions(-) diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index b44097044..70af9401b 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -35,8 +35,6 @@ Windows x64: variables: PREFIX: x86_64-w64-mingw32 - CC: /usr/lib/ccache/x86_64-w64-mingw32-gcc - CXX: /usr/lib/ccache/x86_64-w64-mingw32-g++ script: - | diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index 22b799cda..a7d013649 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -31,8 +31,6 @@ Windows x86: variables: PREFIX: i686-w64-mingw32 - CC: /usr/lib/ccache/i686-w64-mingw32-gcc - CXX: /usr/lib/ccache/i686-w64-mingw32-g++ script: - | From aebc3ff558936e811ab57cf9fe921766132479ed Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Fri, 28 Feb 2025 21:09:33 -0500 Subject: [PATCH 27/44] GitLab CI: move back to only 2 stages, build and osxcross --- .gitlab-ci.yml | 8 +------- .gitlab/ci/jobs/alpine-3-gcc-makefile.yml | 2 +- .gitlab/ci/jobs/alpine-3-gcc.yml | 2 +- .gitlab/ci/jobs/batocera-arm64-makefile.yml | 2 +- .gitlab/ci/jobs/batocera-arm64.yml | 2 +- .gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml | 2 +- .gitlab/ci/jobs/debian-oldstable-amd64.yml | 2 +- .gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml | 2 +- .gitlab/ci/jobs/debian-oldstable-arm64.yml | 2 +- .gitlab/ci/jobs/debian-stable-amd64-makefile.yml | 2 +- .gitlab/ci/jobs/debian-stable-amd64.yml | 2 +- .gitlab/ci/jobs/debian-stable-arm64-makefile.yml | 2 +- .gitlab/ci/jobs/debian-stable-arm64.yml | 2 +- .gitlab/ci/jobs/debian-stable-clang-amd64.yml | 2 +- .gitlab/ci/jobs/debian-stable-i386-makefile.yml | 2 +- .gitlab/ci/jobs/debian-stable-i386.yml | 2 +- .gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml | 2 +- .gitlab/ci/jobs/debian-testing-gcc-amd64.yml | 2 +- .gitlab/ci/jobs/macos-arm64.yml | 2 +- .gitlab/ci/jobs/macos-x86_64.yml | 2 +- .gitlab/ci/jobs/windows-x64-makefile.yml | 2 +- .gitlab/ci/jobs/windows-x64.yml | 2 +- .gitlab/ci/jobs/windows-x86-makefile.yml | 2 +- .gitlab/ci/jobs/windows-x86.yml | 2 +- 24 files changed, 24 insertions(+), 30 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 39b032df8..14c36213e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,13 +11,7 @@ variables: GIT_DEPTH: 20 stages: - - clang - - alpine - - oldstable - - stable - - batocera - - testing - - win32 + - build - osxcross default: diff --git a/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml b/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml index 962f4fc54..3a17e0933 100644 --- a/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml +++ b/.gitlab/ci/jobs/alpine-3-gcc-makefile.yml @@ -1,5 +1,5 @@ Alpine 3 GCC Makefile: - stage: alpine + stage: build when: manual diff --git a/.gitlab/ci/jobs/alpine-3-gcc.yml b/.gitlab/ci/jobs/alpine-3-gcc.yml index 30a2dee77..56339e332 100644 --- a/.gitlab/ci/jobs/alpine-3-gcc.yml +++ b/.gitlab/ci/jobs/alpine-3-gcc.yml @@ -1,5 +1,5 @@ Alpine 3 GCC: - stage: alpine + stage: build when: manual diff --git a/.gitlab/ci/jobs/batocera-arm64-makefile.yml b/.gitlab/ci/jobs/batocera-arm64-makefile.yml index 6b729195e..dd8f57759 100644 --- a/.gitlab/ci/jobs/batocera-arm64-makefile.yml +++ b/.gitlab/ci/jobs/batocera-arm64-makefile.yml @@ -1,7 +1,7 @@ batocera:arm64 Makefile: extends: Debian stable:arm64 Makefile - stage: batocera + stage: build when: manual diff --git a/.gitlab/ci/jobs/batocera-arm64.yml b/.gitlab/ci/jobs/batocera-arm64.yml index 01bebc752..5011c4322 100644 --- a/.gitlab/ci/jobs/batocera-arm64.yml +++ b/.gitlab/ci/jobs/batocera-arm64.yml @@ -1,7 +1,7 @@ batocera:arm64: extends: Debian stable:arm64 - stage: batocera + stage: build when: manual diff --git a/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml b/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml index 9f54349e0..f365a7927 100644 --- a/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml +++ b/.gitlab/ci/jobs/debian-oldstable-amd64-makefile.yml @@ -1,7 +1,7 @@ Debian oldstable:amd64 Makefile: extends: Debian stable:amd64 Makefile - stage: oldstable + stage: build when: manual diff --git a/.gitlab/ci/jobs/debian-oldstable-amd64.yml b/.gitlab/ci/jobs/debian-oldstable-amd64.yml index 90f6fd733..3989f750b 100644 --- a/.gitlab/ci/jobs/debian-oldstable-amd64.yml +++ b/.gitlab/ci/jobs/debian-oldstable-amd64.yml @@ -1,7 +1,7 @@ Debian oldstable:amd64: extends: Debian stable:amd64 - stage: oldstable + stage: build when: manual diff --git a/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml b/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml index 4009fee3f..25782baf2 100644 --- a/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml +++ b/.gitlab/ci/jobs/debian-oldstable-arm64-makefile.yml @@ -1,7 +1,7 @@ Debian oldstable:arm64 Makefile: extends: Debian stable:arm64 Makefile - stage: oldstable + stage: build when: manual diff --git a/.gitlab/ci/jobs/debian-oldstable-arm64.yml b/.gitlab/ci/jobs/debian-oldstable-arm64.yml index 75b563199..db0e7f861 100644 --- a/.gitlab/ci/jobs/debian-oldstable-arm64.yml +++ b/.gitlab/ci/jobs/debian-oldstable-arm64.yml @@ -1,7 +1,7 @@ Debian oldstable:arm64: extends: Debian stable:arm64 - stage: oldstable + stage: build when: manual diff --git a/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml b/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml index 5d30dfe02..fee52c5a7 100644 --- a/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml +++ b/.gitlab/ci/jobs/debian-stable-amd64-makefile.yml @@ -1,7 +1,7 @@ Debian stable:amd64 Makefile: extends: .srb2ci - stage: stable + stage: build artifacts: paths: diff --git a/.gitlab/ci/jobs/debian-stable-amd64.yml b/.gitlab/ci/jobs/debian-stable-amd64.yml index 7377cfe1d..e58f5a112 100644 --- a/.gitlab/ci/jobs/debian-stable-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-amd64.yml @@ -1,7 +1,7 @@ Debian stable:amd64: extends: .srb2ci - stage: stable + stage: build artifacts: paths: diff --git a/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml b/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml index b00ebe7e0..aa0ea3780 100644 --- a/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml +++ b/.gitlab/ci/jobs/debian-stable-arm64-makefile.yml @@ -1,7 +1,7 @@ Debian stable:arm64 Makefile: extends: .srb2ci - stage: stable + stage: build when: manual diff --git a/.gitlab/ci/jobs/debian-stable-arm64.yml b/.gitlab/ci/jobs/debian-stable-arm64.yml index d3446cd77..135d87aa5 100644 --- a/.gitlab/ci/jobs/debian-stable-arm64.yml +++ b/.gitlab/ci/jobs/debian-stable-arm64.yml @@ -1,7 +1,7 @@ Debian stable:arm64: extends: .srb2ci - stage: stable + stage: build when: manual diff --git a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml index 2a7704ed9..870e96bc7 100644 --- a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml @@ -1,7 +1,7 @@ Debian stable Clang: extends: .srb2ci - stage: clang + stage: build when: on_success diff --git a/.gitlab/ci/jobs/debian-stable-i386-makefile.yml b/.gitlab/ci/jobs/debian-stable-i386-makefile.yml index acf757556..dd572ec38 100644 --- a/.gitlab/ci/jobs/debian-stable-i386-makefile.yml +++ b/.gitlab/ci/jobs/debian-stable-i386-makefile.yml @@ -1,7 +1,7 @@ Debian stable:i386 Makefile: extends: .srb2ci - stage: stable + stage: build when: manual diff --git a/.gitlab/ci/jobs/debian-stable-i386.yml b/.gitlab/ci/jobs/debian-stable-i386.yml index ff3dbface..970b92a69 100644 --- a/.gitlab/ci/jobs/debian-stable-i386.yml +++ b/.gitlab/ci/jobs/debian-stable-i386.yml @@ -1,7 +1,7 @@ Debian stable:i386: extends: .srb2ci - stage: stable + stage: build when: manual diff --git a/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml b/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml index e3cc09256..1165b1fea 100644 --- a/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml +++ b/.gitlab/ci/jobs/debian-testing-gcc-amd64-makefile.yml @@ -1,7 +1,7 @@ Debian testing GCC Makefile: extends: .srb2ci - stage: testing + stage: build when: manual diff --git a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml index fbad8dfb3..fc998ea47 100644 --- a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml +++ b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml @@ -1,7 +1,7 @@ Debian testing GCC: extends: .srb2ci - stage: testing + stage: build when: manual diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index 775025467..476bb6aba 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -1,7 +1,7 @@ osxcross arm64: extends: .srb2ci - stage: osxcross + stage: build artifacts: paths: diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index 5f59f5cd7..cc9749e9a 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -1,7 +1,7 @@ osxcross x86_64: extends: .srb2ci - stage: osxcross + stage: build artifacts: paths: diff --git a/.gitlab/ci/jobs/windows-x64-makefile.yml b/.gitlab/ci/jobs/windows-x64-makefile.yml index 8fdc53073..8da30d2b9 100644 --- a/.gitlab/ci/jobs/windows-x64-makefile.yml +++ b/.gitlab/ci/jobs/windows-x64-makefile.yml @@ -1,7 +1,7 @@ Windows x64 Makefile: extends: .srb2ci - stage: win32 + stage: build when: manual diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index 70af9401b..abb5ec3e3 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -1,7 +1,7 @@ Windows x64: extends: .srb2ci - stage: win32 + stage: build when: manual diff --git a/.gitlab/ci/jobs/windows-x86-makefile.yml b/.gitlab/ci/jobs/windows-x86-makefile.yml index d81baf2f1..213342cda 100644 --- a/.gitlab/ci/jobs/windows-x86-makefile.yml +++ b/.gitlab/ci/jobs/windows-x86-makefile.yml @@ -1,7 +1,7 @@ Windows x86 Makefile: extends: .srb2ci - stage: win32 + stage: build when: on_success diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index a7d013649..195c1aab1 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -1,7 +1,7 @@ Windows x86: extends: .srb2ci - stage: win32 + stage: build cache: - key: ccache-$CI_JOB_NAME_SLUG-$CI_COMMIT_REF_SLUG From 3019e70ecba8a1c8786ff58f5a77b4feceedf165 Mon Sep 17 00:00:00 2001 From: Logan Aerl Arias Date: Fri, 28 Feb 2025 21:41:35 -0500 Subject: [PATCH 28/44] GitLab CI: use Ninja on MacOSX GitLab CI: use Ninja on MacOSX --- .gitlab/ci/jobs/macos-arm64.yml | 21 ++++++++++++++++++++- .gitlab/ci/jobs/macos-x86_64.yml | 4 ++-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index 476bb6aba..a74ca5d9c 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -27,7 +27,7 @@ osxcross arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.arm64 --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID + - cmake -B build.arm64 --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -G "Ninja" - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -48,3 +48,22 @@ osxcross arm64: - | # make echo -e "\e[0Ksection_end:`date +%s`:copy\r\e[0K" + + + after_script: + - - | + # apt_clean + echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages" + - apt-get autoclean + - | + # apt_clean + echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" + + - - | + # ccache_stats + echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" + - ccache --show-stats + - ccache --show-log-stats || true + - | + # ccahe_stats + echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K" diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index cc9749e9a..9ac718406 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -27,7 +27,7 @@ osxcross x86_64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.x86_64 --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID + - cmake -B build.x86_64 --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -G "Ninja" - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -35,7 +35,7 @@ osxcross x86_64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.x86_64 --parallel 1 --verbose + - cmake --build build.x86_64 --parallel 1 --verbose - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" From 9860fa9f619ce01db0efcf16e465aeeef2de0866 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Mar 2025 18:20:43 -0500 Subject: [PATCH 29/44] vcpkg: wasm build check --- vcpkg.json | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/vcpkg.json b/vcpkg.json index dd714dc65..ab936993e 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -6,10 +6,13 @@ "dependencies": [ { "name": "curl", - "platform": "!(osx & !native)" + "platform": "!wasm32" }, "libgme", - "libopenmpt", + { + "name":"libopenmpt", + "platform": "!wasm32" + }, "libpng", "miniupnpc", { @@ -25,26 +28,41 @@ "platform": "!windows" } ], - "platform": "!(osx & !native)", - "version>=": "2.30.7" + "platform": "!wasm32", + "version>=": "2.30.6#2" }, { "name": "sdl2-mixer-ext", "features": [ "ffmpeg", - "fluidsynth", - "libflac", + { + "name":"fluidsynth", + "platform": "!wasm32" + }, + { + "name":"libflac", + "platform": "!wasm32" + }, "libgme", "libmodplug", - "libvorbis", + { + "name":"libvorbis", + "platform": "!wasm32" + }, "libxmp", - "mpg123", - "opusfile", + { + "name":"mpg123", + "platform": "!wasm32" + }, + { + "name":"opusfile", + "platform": "!wasm32" + }, "pxtone", "timidity" ], - "platform": "!(osx & !native)", - "version>=": "2.6.0" + "platform": "!wasm32", + "version>=": "2.6.0#0" }, "zlib" ] From fb6ce070fda356706d296073b64623afb88641db Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Mar 2025 19:17:17 -0500 Subject: [PATCH 30/44] GitLib CI: try keep building --- .gitlab/ci/jobs/alpine-3-gcc.yml | 4 ++-- .gitlab/ci/jobs/batocera-arm64.yml | 4 ++-- .gitlab/ci/jobs/debian-oldstable-amd64.yml | 4 ++-- .gitlab/ci/jobs/debian-oldstable-arm64.yml | 4 ++-- .gitlab/ci/jobs/debian-stable-amd64.yml | 4 ++-- .gitlab/ci/jobs/debian-stable-arm64.yml | 4 ++-- .gitlab/ci/jobs/debian-stable-clang-amd64.yml | 4 ++-- .gitlab/ci/jobs/debian-stable-i386.yml | 4 ++-- .gitlab/ci/jobs/debian-testing-gcc-amd64.yml | 4 ++-- .gitlab/ci/jobs/macos-arm64.yml | 9 ++++----- .gitlab/ci/jobs/macos-x86_64.yml | 5 ++--- .gitlab/ci/jobs/windows-x64-makefile.yml | 2 ++ .gitlab/ci/jobs/windows-x64.yml | 5 +++-- .gitlab/ci/jobs/windows-x86.yml | 5 +++-- 14 files changed, 32 insertions(+), 30 deletions(-) diff --git a/.gitlab/ci/jobs/alpine-3-gcc.yml b/.gitlab/ci/jobs/alpine-3-gcc.yml index 56339e332..fdf73bafc 100644 --- a/.gitlab/ci/jobs/alpine-3-gcc.yml +++ b/.gitlab/ci/jobs/alpine-3-gcc.yml @@ -109,7 +109,7 @@ Alpine 3 GCC: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_EXECINFO=NO -DSRB2_CONFIG_USE_GME:BOOL=ON + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_EXECINFO=NO -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -117,7 +117,7 @@ Alpine 3 GCC: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.cmake --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/batocera-arm64.yml b/.gitlab/ci/jobs/batocera-arm64.yml index 5011c4322..4832c389b 100644 --- a/.gitlab/ci/jobs/batocera-arm64.yml +++ b/.gitlab/ci/jobs/batocera-arm64.yml @@ -34,7 +34,7 @@ batocera:arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -42,7 +42,7 @@ batocera:arm64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.cmake --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-oldstable-amd64.yml b/.gitlab/ci/jobs/debian-oldstable-amd64.yml index 3989f750b..c4b6629fd 100644 --- a/.gitlab/ci/jobs/debian-oldstable-amd64.yml +++ b/.gitlab/ci/jobs/debian-oldstable-amd64.yml @@ -36,7 +36,7 @@ Debian oldstable:amd64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -44,7 +44,7 @@ Debian oldstable:amd64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.cmake --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-oldstable-arm64.yml b/.gitlab/ci/jobs/debian-oldstable-arm64.yml index db0e7f861..2e69b0b62 100644 --- a/.gitlab/ci/jobs/debian-oldstable-arm64.yml +++ b/.gitlab/ci/jobs/debian-oldstable-arm64.yml @@ -36,7 +36,7 @@ Debian oldstable:arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=ON + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -44,7 +44,7 @@ Debian oldstable:arm64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.cmake --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-amd64.yml b/.gitlab/ci/jobs/debian-stable-amd64.yml index e58f5a112..807a7ef18 100644 --- a/.gitlab/ci/jobs/debian-stable-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-amd64.yml @@ -39,7 +39,7 @@ Debian stable:amd64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -47,7 +47,7 @@ Debian stable:amd64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.cmake --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-arm64.yml b/.gitlab/ci/jobs/debian-stable-arm64.yml index 135d87aa5..e08dac501 100644 --- a/.gitlab/ci/jobs/debian-stable-arm64.yml +++ b/.gitlab/ci/jobs/debian-stable-arm64.yml @@ -40,7 +40,7 @@ Debian stable:arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=ON + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -48,7 +48,7 @@ Debian stable:arm64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.cmake --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml index 870e96bc7..7861c4dea 100644 --- a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml @@ -40,7 +40,7 @@ Debian stable Clang: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_USE_LIBGME:BOOL=OFF -DSRB2_CONFIG_USE_GME:BOOL=ON + - cmake -B build.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_USE_LIBGME:BOOL=OFF -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -48,7 +48,7 @@ Debian stable Clang: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.cmake --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-i386.yml b/.gitlab/ci/jobs/debian-stable-i386.yml index 970b92a69..cf43dd8f9 100644 --- a/.gitlab/ci/jobs/debian-stable-i386.yml +++ b/.gitlab/ci/jobs/debian-stable-i386.yml @@ -40,7 +40,7 @@ Debian stable:i386: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -48,7 +48,7 @@ Debian stable:i386: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.cmake --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml index fc998ea47..513495fee 100644 --- a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml +++ b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml @@ -40,7 +40,7 @@ Debian testing GCC: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=YES -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -48,7 +48,7 @@ Debian testing GCC: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.cmake --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index a74ca5d9c..1d2bc40d3 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -11,15 +11,14 @@ osxcross arm64: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-arm64-apple-darwin" variables: - OSXCROSS_HOST: oa64 LD: /opt/osxcross.arm64/ld script: - - | # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - - osxcross-macports install --arm64 libxmp wavpack libopenmpt opusfile || osxcross-macports install --arm64 libxmp wavpack libopenmpt opusfile - - osxcross-macports install --static --arm64 miniupnpc libpng curl libsdl2_mixer || osxcross-macports install --static --arm64 miniupnpc libpng curl libsdl2_mixer + - osxcross-macports install --arm64 libopenmpt libxmp wavpack opusfile || osxcross-macports install --arm64 libopenmpt libxmp wavpack opusfile + - osxcross-macports install --static --arm64 miniupnpc curl libsdl2_mixer libpng || osxcross-macports install --static --arm64 miniupnpc curl libsdl2_mixer libpng - | # apt_development echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K" @@ -27,7 +26,7 @@ osxcross arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.arm64 --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -G "Ninja" + - oa64-cmake -B build.arm64 -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS:BOOL=ON -G "Unix Makefiles" - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -35,7 +34,7 @@ osxcross arm64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.arm64 --parallel 1 --verbose + - oa64-cmake --build build.arm64 --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index 9ac718406..afc377265 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -11,7 +11,6 @@ osxcross x86_64: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86_64-apple-darwin" variables: - OSXCROSS_HOST: o64 LD: /opt/osxcross.x86_64/ld script: @@ -27,7 +26,7 @@ osxcross x86_64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.x86_64 --toolchain /osxcross/toolchain.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -G "Ninja" + - o64-cmake -B build.x86_64 -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -G "Unix Makefiles" - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -35,7 +34,7 @@ osxcross x86_64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.x86_64 --parallel 1 --verbose + - o64-cmake --build build.x86_64 --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x64-makefile.yml b/.gitlab/ci/jobs/windows-x64-makefile.yml index 8da30d2b9..aea9de4ce 100644 --- a/.gitlab/ci/jobs/windows-x64-makefile.yml +++ b/.gitlab/ci/jobs/windows-x64-makefile.yml @@ -16,6 +16,8 @@ Windows x64 Makefile: variables: PREFIX: x86_64-w64-mingw32 + CC: /usr/bin/x86_64-w64-mingw32-gcc + CXX: /usr/bin/x86_64-w64-mingw32-g++ script: - - | diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index abb5ec3e3..93f49665f 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -35,6 +35,7 @@ Windows x64: variables: PREFIX: x86_64-w64-mingw32 + VCPKG_DEFAULT_TRIPLET=x64-mingw-static script: - | @@ -66,7 +67,7 @@ Windows x64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=NO -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -74,7 +75,7 @@ Windows x64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.cmake --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index 195c1aab1..dcb87b099 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -31,6 +31,7 @@ Windows x86: variables: PREFIX: i686-w64-mingw32 + VCPKG_DEFAULT_TRIPLET=x86-mingw-static script: - | @@ -62,7 +63,7 @@ Windows x86: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_USE_CCACHE=NO -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x86-mingw-static -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x86-mingw-static -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -70,7 +71,7 @@ Windows x86: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - cmake --build build.cmake --parallel 1 --verbose + - cmake --build build.cmake --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" From a7424b9952eccf63e600eed24b0b41fe10cd3c7f Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Mar 2025 19:30:38 -0500 Subject: [PATCH 31/44] GitLab CI: use :, not = for variables --- .gitlab/ci/jobs/windows-x64.yml | 2 +- .gitlab/ci/jobs/windows-x86.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index 93f49665f..d8824e185 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -35,7 +35,7 @@ Windows x64: variables: PREFIX: x86_64-w64-mingw32 - VCPKG_DEFAULT_TRIPLET=x64-mingw-static + VCPKG_DEFAULT_TRIPLET: x64-mingw-static script: - | diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index dcb87b099..f375042d7 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -31,7 +31,7 @@ Windows x86: variables: PREFIX: i686-w64-mingw32 - VCPKG_DEFAULT_TRIPLET=x86-mingw-static + VCPKG_DEFAULT_TRIPLET: x86-mingw-static script: - | From 682fb8f07f99b01424a859381d7285e1f8fbe5af Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Mar 2025 19:44:10 -0500 Subject: [PATCH 32/44] GitLab CI: set LD for Mingw32 nad use plain cmake for darwin builds --- .gitlab/ci/jobs/macos-arm64.yml | 6 ++++-- .gitlab/ci/jobs/macos-x86_64.yml | 6 ++++-- .gitlab/ci/jobs/windows-x64.yml | 1 + .gitlab/ci/jobs/windows-x86.yml | 1 + 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index 1d2bc40d3..121cdb49b 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -11,6 +11,8 @@ osxcross arm64: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-arm64-apple-darwin" variables: + OSXCROSS_HOST: oa64 + CMAKE_TOOLCHAIN_FILE: /osxcross/toolchain.cmake LD: /opt/osxcross.arm64/ld script: @@ -26,7 +28,7 @@ osxcross arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - oa64-cmake -B build.arm64 -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS:BOOL=ON -G "Unix Makefiles" + - cmake -B build.arm64 -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS:BOOL=ON -G "Unix Makefiles" - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -34,7 +36,7 @@ osxcross arm64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - oa64-cmake --build build.arm64 --parallel 1 --verbose -- --keep-going + - cmake --build build.arm64 --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index afc377265..4d3b4295c 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -11,6 +11,8 @@ osxcross x86_64: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-x86_64-apple-darwin" variables: + OSXCROSS_HOST: o64 + CMAKE_TOOLCHAIN_FILE: /osxcross/toolchain.cmake LD: /opt/osxcross.x86_64/ld script: @@ -26,7 +28,7 @@ osxcross x86_64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - o64-cmake -B build.x86_64 -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -G "Unix Makefiles" + - cmake -B build.x86_64 -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -G "Unix Makefiles" - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" @@ -34,7 +36,7 @@ osxcross x86_64: - - | # make echo -e "\e[0Ksection_start:`date +%s`:make[collapsed=false]\r\e[0KCompiling SRB2" - - o64-cmake --build build.x86_64 --parallel 1 --verbose -- --keep-going + - cmake --build build.x86_64 --parallel 1 --verbose -- --keep-going - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index d8824e185..b1ba9b53a 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -36,6 +36,7 @@ Windows x64: variables: PREFIX: x86_64-w64-mingw32 VCPKG_DEFAULT_TRIPLET: x64-mingw-static + LD: /usr/bin/x86_64-w64-mingw32-ld script: - | diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index f375042d7..10d5f8170 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -32,6 +32,7 @@ Windows x86: variables: PREFIX: i686-w64-mingw32 VCPKG_DEFAULT_TRIPLET: x86-mingw-static + LD: /usr/bin/i686-w64-mingw32-ld script: - | From 61afd65fc1b43187e23eaf98526c8e353bfe0939 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Mar 2025 20:01:59 -0500 Subject: [PATCH 33/44] GitLab CI: w64-mingw32 vcpkgs to use --toolchain --- .gitlab/ci/jobs/windows-x64.yml | 2 +- .gitlab/ci/jobs/windows-x86.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index b1ba9b53a..5291be850 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -68,7 +68,7 @@ Windows x64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON --toolchain $VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index 10d5f8170..a35de2a6c 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -64,7 +64,7 @@ Windows x86: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x86-mingw-static -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON --toolchain $VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" From e2200c1eb5423b2cf3038dc303604528345f15a6 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Mar 2025 20:18:59 -0500 Subject: [PATCH 34/44] GitLab CI: use VCPKG_TARGET_TRIPLET, not VCPKG_DEFAULT_TRIPLET --- .gitlab/ci/jobs/windows-x64.yml | 2 +- .gitlab/ci/jobs/windows-x86.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index 5291be850..c488f3184 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -35,7 +35,7 @@ Windows x64: variables: PREFIX: x86_64-w64-mingw32 - VCPKG_DEFAULT_TRIPLET: x64-mingw-static + VCPKG_TARGET_TRIPLET: x64-mingw-static LD: /usr/bin/x86_64-w64-mingw32-ld script: diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index a35de2a6c..802022f9e 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -31,7 +31,7 @@ Windows x86: variables: PREFIX: i686-w64-mingw32 - VCPKG_DEFAULT_TRIPLET: x86-mingw-static + VCPKG_TARGET_TRIPLET: x86-mingw-static LD: /usr/bin/i686-w64-mingw32-ld script: From 3145253ff34b4799c850de24269c5d0fc97e74ca Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Mar 2025 20:34:17 -0500 Subject: [PATCH 35/44] GitLab CI: set CC,CXX and LD for Windows vcpkg builds --- .gitlab/ci/jobs/windows-x64.yml | 25 ++++--------------------- .gitlab/ci/jobs/windows-x86.yml | 25 ++++--------------------- 2 files changed, 8 insertions(+), 42 deletions(-) diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index c488f3184..9085588e9 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -34,9 +34,10 @@ Windows x64: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win64" variables: - PREFIX: x86_64-w64-mingw32 VCPKG_TARGET_TRIPLET: x64-mingw-static - LD: /usr/bin/x86_64-w64-mingw32-ld + CC: x86_64-w64-mingw32-gcc + CXX: x86_64-w64-mingw32-g++ + LD: x86_64-w64-mingw32-ld script: - | @@ -68,7 +69,7 @@ Windows x64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON --toolchain $VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET} -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -80,21 +81,3 @@ Windows x64: - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" - - after_script: - - - | - # apt_clean - echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages" - - apt-get autoclean - - | - # apt_clean - echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" - - - - | - # ccache_stats - echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" - - ccache --show-stats - - ccache --show-log-stats || true - - | - # ccahe_stats - echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index 802022f9e..006291cda 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -30,9 +30,10 @@ Windows x86: name: "$CI_PROJECT_PATH_SLUG-$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA-Win32" variables: - PREFIX: i686-w64-mingw32 VCPKG_TARGET_TRIPLET: x86-mingw-static - LD: /usr/bin/i686-w64-mingw32-ld + CC: i686-w64-mingw32-gcc + CXX: i686-w64-mingw32-g++ + LD: i686-w64-mingw32-ld script: - | @@ -64,7 +65,7 @@ Windows x86: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON --toolchain $VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET} -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" @@ -76,21 +77,3 @@ Windows x86: - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" - - after_script: - - - | - # apt_clean - echo -e "\e[0Ksection_start:`date +%s`:apt_clean[collapsed=true]\r\e[0KCleaning of unneeded APT packages" - - apt-get autoclean - - | - # apt_clean - echo -e "\e[0Ksection_end:`date +%s`:apt_clean\r\e[0K" - - - - | - # ccache_stats - echo -e "\e[0Ksection_start:`date +%s`:ccache_stats[collapsed=true]\r\e[0Kccache statistics:" - - ccache --show-stats - - ccache --show-log-stats || true - - | - # ccahe_stats - echo -e "\e[0Ksection_end:`date +%s`:ccache_stats\r\e[0K" From 61ba912ae9bd5180af328d8b85a9b68b7149224a Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Mar 2025 20:58:13 -0500 Subject: [PATCH 36/44] vcpkg: no fluidsynth for sdl2-mixer-ext on non-native mingw builds --- vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcpkg.json b/vcpkg.json index ab936993e..42fe44d4b 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -37,7 +37,7 @@ "ffmpeg", { "name":"fluidsynth", - "platform": "!wasm32" + "platform": "!(mingw & !native) & !wasm32" }, { "name":"libflac", From 5d5cd27e289681b70381fefba1951b3122ff588a Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Mar 2025 21:39:59 -0500 Subject: [PATCH 37/44] vcpkg: fluidsynth does not work for static build --- vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcpkg.json b/vcpkg.json index 42fe44d4b..dd6f69299 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -37,7 +37,7 @@ "ffmpeg", { "name":"fluidsynth", - "platform": "!(mingw & !native) & !wasm32" + "platform": "!static" }, { "name":"libflac", From 51494ca8101118efae4a0d78b90c62df09308630 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 2 Mar 2025 21:40:23 -0500 Subject: [PATCH 38/44] GitLab CI: disable SRB2_CONFIG_ENABLE_WEBM_MOVIES for cmake builds --- .gitlab/ci/jobs/alpine-3-gcc.yml | 2 +- .gitlab/ci/jobs/batocera-arm64.yml | 2 +- .gitlab/ci/jobs/debian-oldstable-amd64.yml | 2 +- .gitlab/ci/jobs/debian-oldstable-arm64.yml | 2 +- .gitlab/ci/jobs/debian-stable-amd64.yml | 2 +- .gitlab/ci/jobs/debian-stable-arm64.yml | 2 +- .gitlab/ci/jobs/debian-stable-clang-amd64.yml | 2 +- .gitlab/ci/jobs/debian-stable-i386.yml | 2 +- .gitlab/ci/jobs/debian-testing-gcc-amd64.yml | 2 +- .gitlab/ci/jobs/macos-arm64.yml | 2 +- .gitlab/ci/jobs/macos-x86_64.yml | 2 +- .gitlab/ci/jobs/windows-x64.yml | 2 +- .gitlab/ci/jobs/windows-x86.yml | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.gitlab/ci/jobs/alpine-3-gcc.yml b/.gitlab/ci/jobs/alpine-3-gcc.yml index fdf73bafc..3456a7070 100644 --- a/.gitlab/ci/jobs/alpine-3-gcc.yml +++ b/.gitlab/ci/jobs/alpine-3-gcc.yml @@ -109,7 +109,7 @@ Alpine 3 GCC: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_EXECINFO=NO -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_EXECINFO=NO -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" diff --git a/.gitlab/ci/jobs/batocera-arm64.yml b/.gitlab/ci/jobs/batocera-arm64.yml index 4832c389b..7acba8c79 100644 --- a/.gitlab/ci/jobs/batocera-arm64.yml +++ b/.gitlab/ci/jobs/batocera-arm64.yml @@ -34,7 +34,7 @@ batocera:arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-oldstable-amd64.yml b/.gitlab/ci/jobs/debian-oldstable-amd64.yml index c4b6629fd..90b0a3023 100644 --- a/.gitlab/ci/jobs/debian-oldstable-amd64.yml +++ b/.gitlab/ci/jobs/debian-oldstable-amd64.yml @@ -36,7 +36,7 @@ Debian oldstable:amd64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-oldstable-arm64.yml b/.gitlab/ci/jobs/debian-oldstable-arm64.yml index 2e69b0b62..89fe8630e 100644 --- a/.gitlab/ci/jobs/debian-oldstable-arm64.yml +++ b/.gitlab/ci/jobs/debian-oldstable-arm64.yml @@ -36,7 +36,7 @@ Debian oldstable:arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-amd64.yml b/.gitlab/ci/jobs/debian-stable-amd64.yml index 807a7ef18..481e6d1b8 100644 --- a/.gitlab/ci/jobs/debian-stable-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-amd64.yml @@ -39,7 +39,7 @@ Debian stable:amd64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-arm64.yml b/.gitlab/ci/jobs/debian-stable-arm64.yml index e08dac501..970001fd5 100644 --- a/.gitlab/ci/jobs/debian-stable-arm64.yml +++ b/.gitlab/ci/jobs/debian-stable-arm64.yml @@ -40,7 +40,7 @@ Debian stable:arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml index 7861c4dea..02879f4f5 100644 --- a/.gitlab/ci/jobs/debian-stable-clang-amd64.yml +++ b/.gitlab/ci/jobs/debian-stable-clang-amd64.yml @@ -40,7 +40,7 @@ Debian stable Clang: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_USE_LIBGME:BOOL=OFF -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_USE_LIBGME:BOOL=OFF -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-stable-i386.yml b/.gitlab/ci/jobs/debian-stable-i386.yml index cf43dd8f9..563ff9aca 100644 --- a/.gitlab/ci/jobs/debian-stable-i386.yml +++ b/.gitlab/ci/jobs/debian-stable-i386.yml @@ -40,7 +40,7 @@ Debian stable:i386: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" diff --git a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml index 513495fee..cd3ac33a2 100644 --- a/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml +++ b/.gitlab/ci/jobs/debian-testing-gcc-amd64.yml @@ -40,7 +40,7 @@ Debian testing GCC: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DSRB2_CONFIG_USE_GME:BOOL=ON -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index 121cdb49b..66720cfd3 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -28,7 +28,7 @@ osxcross arm64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.arm64 -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS:BOOL=ON -G "Unix Makefiles" + - cmake -B build.arm64 -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -DSRB2_CONFIG_FORCE_NO_MS_BITFIELDS:BOOL=ON -G "Unix Makefiles" - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index 4d3b4295c..79f99fcae 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -28,7 +28,7 @@ osxcross x86_64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.x86_64 -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -G "Unix Makefiles" + - cmake -B build.x86_64 -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DCPM_USE_LOCAL_PACKAGES:BOOL=ON -DOPENMPT_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/include" -DSDL2_INCLUDE_DIR:PATH="/osxcross/macports/pkgs/opt/local/lib" -DSRB2_CONFIG_ENABLE_TESTS:BOOL=OFF -DSRB2_CONFIG_SYSTEM_LIBRARIES:BOOL=ON -DSRB2_CONFIG_USE_GME:BOOL=OFF -DSRB2_SDL2_EXE_NAME=srb2_$CI_PIPELINE_ID -G "Unix Makefiles" - | # make echo -e "\e[0Ksection_end:`date +%s`:make\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x64.yml b/.gitlab/ci/jobs/windows-x64.yml index 9085588e9..c03bf8f32 100644 --- a/.gitlab/ci/jobs/windows-x64.yml +++ b/.gitlab/ci/jobs/windows-x64.yml @@ -69,7 +69,7 @@ Windows x64: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET} -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET} -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" diff --git a/.gitlab/ci/jobs/windows-x86.yml b/.gitlab/ci/jobs/windows-x86.yml index 006291cda..91bcf8467 100644 --- a/.gitlab/ci/jobs/windows-x86.yml +++ b/.gitlab/ci/jobs/windows-x86.yml @@ -65,7 +65,7 @@ Windows x86: - - | # cmake echo -e "\e[0Ksection_start:`date +%s`:cmake[collapsed=false]\r\e[0KBuilding Makefiles" - - cmake -B build.cmake -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET} -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" + - cmake -B build.cmake -DSRB2_CONFIG_ENABLE_WEBM_MOVIES=OFF -DSRB2_CONFIG_ERRORMODE=ON -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=${VCPKG_TARGET_TRIPLET} -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/toolchains/mingw.cmake -G "Unix Makefiles" - | # cmake echo -e "\e[0Ksection_end:`date +%s`:cmake\r\e[0K" From 910add7efbf646a7d98ef7e2d15524374c871e18 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 3 Mar 2025 05:33:55 -0500 Subject: [PATCH 39/44] GitLab CI: macports downloads can fail --- .gitlab/ci/jobs/macos-arm64.yml | 2 ++ .gitlab/ci/jobs/macos-x86_64.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index 66720cfd3..351b3a02b 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -3,6 +3,8 @@ osxcross arm64: stage: build + allow_failure: true + artifacts: paths: - "build.arm64/bin/" diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index 79f99fcae..fd0618eb1 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -3,6 +3,8 @@ osxcross x86_64: stage: build + allow_failure: true + artifacts: paths: - "build.x86_64/bin/" From 817db981338cb6394a71e165867a62b8fea1d249 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 3 Mar 2025 05:36:32 -0500 Subject: [PATCH 40/44] GitLab CI: old version of ccache do not have stats_log option --- .gitlab/ci/templates/srb2ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/ci/templates/srb2ci.yml b/.gitlab/ci/templates/srb2ci.yml index 102f5925d..765048614 100644 --- a/.gitlab/ci/templates/srb2ci.yml +++ b/.gitlab/ci/templates/srb2ci.yml @@ -107,7 +107,7 @@ ccache --set-config compiler_check=content - | # stats_log - ccache --set-config stats_log=$CI_PROJECT_DIR/build/ccache_statslog + ccache --set-config stats_log=$CI_PROJECT_DIR/build/ccache_statslog || true - | # max_size ccache --set-config max_size=300M From 823d28839b6a10872bc847cf27e29f527b687f38 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 3 Mar 2025 05:43:51 -0500 Subject: [PATCH 41/44] GitLab CI: since macports downloads can fail, allow the lipo job to fail as well --- .gitlab/ci/jobs/osxcross-universal.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab/ci/jobs/osxcross-universal.yml b/.gitlab/ci/jobs/osxcross-universal.yml index 42bc12a57..e76f6dda4 100644 --- a/.gitlab/ci/jobs/osxcross-universal.yml +++ b/.gitlab/ci/jobs/osxcross-universal.yml @@ -10,6 +10,8 @@ osxcross universal: stage: osxcross + allow_failure: true + artifacts: paths: - "dist/bin" From f32bdb77a28f01856c9a1ab0e56562de2d36b8e6 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 3 Mar 2025 05:59:40 -0500 Subject: [PATCH 42/44] GitLab CI: allow failure of sdl2_mixer download from macports --- .gitlab/ci/jobs/macos-arm64.yml | 3 ++- .gitlab/ci/jobs/macos-x86_64.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index 351b3a02b..557f3a52a 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -22,7 +22,8 @@ osxcross arm64: # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - osxcross-macports install --arm64 libopenmpt libxmp wavpack opusfile || osxcross-macports install --arm64 libopenmpt libxmp wavpack opusfile - - osxcross-macports install --static --arm64 miniupnpc curl libsdl2_mixer libpng || osxcross-macports install --static --arm64 miniupnpc curl libsdl2_mixer libpng + - osxcross-macports install --static --arm64 libsdl2_mixer || osxcross-macports install --static --arm64 libsdl2_mixer || true + - osxcross-macports install --static --arm64 miniupnpc curl libpng || osxcross-macports install --static --arm64 miniupnpc curl libpng - | # apt_development echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K" diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index fd0618eb1..2e78f2203 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -22,7 +22,8 @@ osxcross x86_64: # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - osxcross-macports install libopenmpt libxmp wavpack opusfile || osxcross-macports install libopenmpt libxmp wavpack opusfile - - osxcross-macports install --static miniupnpc curl libsdl2_mixer libpng || osxcross-macports install --static miniupnpc curl libsdl2_mixer libpng + - osxcross-macports install --static libsdl2_mixer || osxcross-macports install --static libsdl2_mixer || true + - osxcross-macports install --static miniupnpc curl libpng || osxcross-macports install --static miniupnpc curl libpng - | # apt_development echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K" From 28aa3f10bdbad0f398365e35833015da3440db28 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 3 Mar 2025 06:11:29 -0500 Subject: [PATCH 43/44] GitLab CI: allow failure of libopenmpt download from macports --- .gitlab/ci/jobs/macos-arm64.yml | 7 ++++--- .gitlab/ci/jobs/macos-x86_64.yml | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index 557f3a52a..269b4a0a1 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -21,9 +21,10 @@ osxcross arm64: - - | # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - - osxcross-macports install --arm64 libopenmpt libxmp wavpack opusfile || osxcross-macports install --arm64 libopenmpt libxmp wavpack opusfile - - osxcross-macports install --static --arm64 libsdl2_mixer || osxcross-macports install --static --arm64 libsdl2_mixer || true - - osxcross-macports install --static --arm64 miniupnpc curl libpng || osxcross-macports install --static --arm64 miniupnpc curl libpng + - osxcross-macports install --arm64 libopenmpt || osxcross-macports install --verbose --arm64 libopenmpt || true + - osxcross-macports install --arm64 libxmp wavpack opusfile || osxcross-macports install --verbose --arm64 libxmp wavpack opusfile + - osxcross-macports install --static --arm64 libsdl2_mixer || osxcross-macports install --verbose --static --arm64 libsdl2_mixer || true + - osxcross-macports install --static --arm64 miniupnpc curl libpng || osxcross-macports install --verbose --static --arm64 miniupnpc curl libpng - | # apt_development echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K" diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index 2e78f2203..61e4a114c 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -21,9 +21,10 @@ osxcross x86_64: - - | # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - - osxcross-macports install libopenmpt libxmp wavpack opusfile || osxcross-macports install libopenmpt libxmp wavpack opusfile - - osxcross-macports install --static libsdl2_mixer || osxcross-macports install --static libsdl2_mixer || true - - osxcross-macports install --static miniupnpc curl libpng || osxcross-macports install --static miniupnpc curl libpng + - osxcross-macports install libopenmpt || osxcross-macports install --verbose libopenmpt || true + - osxcross-macports install libxmp wavpack opusfile || osxcross-macports install --verbose libxmp wavpack opusfile + - osxcross-macports install --static libsdl2_mixer || osxcross-macports install --verbose --static libsdl2_mixer || true + - osxcross-macports install --static miniupnpc curl libpng || osxcross-macports install --verbose --static miniupnpc curl libpng - | # apt_development echo -e "\e[0Ksection_end:`date +%s`:macports_development\r\e[0K" From d47c59a3424802fe561b1e682eafb2e1d930c5fe Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 3 Mar 2025 06:18:23 -0500 Subject: [PATCH 44/44] GitLab CI: allow failure of wavpack download from macports --- .gitlab/ci/jobs/macos-arm64.yml | 3 ++- .gitlab/ci/jobs/macos-x86_64.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/jobs/macos-arm64.yml b/.gitlab/ci/jobs/macos-arm64.yml index 269b4a0a1..8cb77d1b8 100644 --- a/.gitlab/ci/jobs/macos-arm64.yml +++ b/.gitlab/ci/jobs/macos-arm64.yml @@ -22,7 +22,8 @@ osxcross arm64: # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - osxcross-macports install --arm64 libopenmpt || osxcross-macports install --verbose --arm64 libopenmpt || true - - osxcross-macports install --arm64 libxmp wavpack opusfile || osxcross-macports install --verbose --arm64 libxmp wavpack opusfile + - osxcross-macports install --arm64 wavpack || osxcross-macports install --verbose --arm64 wavpack || true + - osxcross-macports install --arm64 libxmp opusfile || osxcross-macports install --verbose --arm64 libxmp opusfile - osxcross-macports install --static --arm64 libsdl2_mixer || osxcross-macports install --verbose --static --arm64 libsdl2_mixer || true - osxcross-macports install --static --arm64 miniupnpc curl libpng || osxcross-macports install --verbose --static --arm64 miniupnpc curl libpng - | diff --git a/.gitlab/ci/jobs/macos-x86_64.yml b/.gitlab/ci/jobs/macos-x86_64.yml index 61e4a114c..a7e510fb5 100644 --- a/.gitlab/ci/jobs/macos-x86_64.yml +++ b/.gitlab/ci/jobs/macos-x86_64.yml @@ -22,7 +22,8 @@ osxcross x86_64: # apt_development echo -e "\e[0Ksection_start:`date +%s`:macports_development[collapsed=true]\r\e[0KInstalling development packages" - osxcross-macports install libopenmpt || osxcross-macports install --verbose libopenmpt || true - - osxcross-macports install libxmp wavpack opusfile || osxcross-macports install --verbose libxmp wavpack opusfile + - osxcross-macports install wavpack || osxcross-macports install --verbose wavpack || true + - osxcross-macports install libxmp opusfile || osxcross-macports install --verbose libxmp opusfile - osxcross-macports install --static libsdl2_mixer || osxcross-macports install --verbose --static libsdl2_mixer || true - osxcross-macports install --static miniupnpc curl libpng || osxcross-macports install --verbose --static miniupnpc curl libpng - |