mirror of
https://github.com/CTR-tools/CTR-ModSDK.git
synced 2024-11-26 23:10:26 +00:00
ci: produce online-server-windows artifacts (#120)
This commit is contained in:
parent
8eaa0462a7
commit
db5b890728
10
.github/workflows/main.yml
vendored
10
.github/workflows/main.yml
vendored
@ -20,6 +20,8 @@ jobs:
|
||||
submodules: true
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: Create result directory
|
||||
run: mkdir ${{ runner.temp }}/result
|
||||
- name: Build Decomp Debug Linux32 GCC
|
||||
run: nix build -L --no-link --keep-going '.?submodules=1#decomp.debug.native32.gcc'
|
||||
- name: Build Decomp Debug Linux32 Clang
|
||||
@ -34,3 +36,11 @@ jobs:
|
||||
run: nix build -L --no-link --keep-going '.?submodules=1#online-server.release.native32.gcc'
|
||||
- name: Build Server Release ARM32 GCC
|
||||
run: nix build -L --no-link --keep-going '.?submodules=1#online-server.release.arm32.gcc'
|
||||
- name: Build Server Release Mingw2 GCC
|
||||
run: nix build -L --keep-going '.?submodules=1#online-server.release.mingw32.gcc' -o ${{ runner.temp }}/result/online-server.release.mingw32.gcc
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: online-server-windows
|
||||
path: |
|
||||
${{ runner.temp }}/result/online-server.release.mingw32.gcc/bin
|
||||
|
@ -16,7 +16,11 @@ set(SOURCES SV_main.c)
|
||||
add_executable(ctr_srv ${SOURCES})
|
||||
|
||||
# Link with the enet library
|
||||
target_link_libraries(ctr_srv enet)
|
||||
if (WIN32)
|
||||
target_link_libraries(ctr_srv enet winmm ws2_32)
|
||||
else()
|
||||
target_link_libraries(ctr_srv enet)
|
||||
endif()
|
||||
|
||||
# Compiler options
|
||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||
|
@ -13,6 +13,25 @@ let
|
||||
mainProgram = if isWindows then "ctr_srv.exe" else "ctr_srv";
|
||||
|
||||
path = "mods/Windows/OnlineCTR/Network_PC/Server";
|
||||
|
||||
cross-enet =
|
||||
if isWindows then
|
||||
enet.overrideAttrs
|
||||
(previousAttrs: {
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/lib
|
||||
cp libenet.a $out/lib/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = previousAttrs.meta // { platforms = lib.platforms.all; };
|
||||
})
|
||||
else enet;
|
||||
in
|
||||
stdenv.mkDerivation (_: {
|
||||
pname = "CTR-SRV";
|
||||
@ -24,7 +43,7 @@ stdenv.mkDerivation (_: {
|
||||
else "source/${path}";
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [ enet ];
|
||||
buildInputs = [ cross-enet ];
|
||||
|
||||
# Disables incompatible hardening
|
||||
hardeningDisable = [ "format" ];
|
||||
|
Loading…
Reference in New Issue
Block a user