Skip to content

Commit

Permalink
ci: move servers to 64; prioritize mingw32 online-server; fix GCC14 (#…
Browse files Browse the repository at this point in the history
…196)

* ci: disable builds for rebuild_PC

* flake: add more targets for online-servers; bump

* ci: move to x86-64 and aarch64

* ci: flake bump

* online-server: build with GCC14

* flake: prefix pc builds

* ci: magic-nix-cache was discontinue; prioritize windows builds

* ci: restore PC builds, but let them fail
  • Loading branch information
PedroHLC authored Feb 21, 2025
1 parent 76e1a1c commit 5268428
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 28 deletions.
33 changes: 15 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build main
on:
push:
branches:
- '**'
- "**"

permissions:
contents: read
Expand All @@ -19,28 +19,25 @@ jobs:
fetch-depth: 0
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
run: nix build -L --no-link --keep-going '.?submodules=1#decomp.debug.native32.clang'
- name: Build Decomp Debug Mingw32 GCC
run: nix build -L --no-link --keep-going '.?submodules=1#decomp.debug.mingw32.gcc'
- name: Build Decomp Debug Mingw32 Clang
run: nix build -L --no-link --keep-going '.?submodules=1#decomp.debug.mingw32.clang'
- name: Build Retail Release Linux32 GCC
run: nix build -L --no-link --keep-going '.?submodules=1#retail.release.native32.gcc'
- name: Build Server Release Linux32 GCC
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
# -- Windows online-server
- name: Build Server Release Mingw32 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
${{ runner.temp }}/result/online-server.release.mingw32.gcc/
# -- Linux online-server
- name: Build Server Release Linux GCC
run: nix build -L --no-link --keep-going '.?submodules=1#online-server.release.native.gcc'
- name: Build Server Release Aarch64 GCC
run: nix build -L --no-link --keep-going '.?submodules=1#online-server.release.aarch64.gcc'
# -- PC Port
- name: Build Decomp Debug Mingw32 GCC
run: nix build -L --no-link --keep-going '.?submodules=1#pc-decomp.debug.mingw32.gcc' 2>&1 | grep -A3 'error:'
- name: Build Decomp Debug Linux32 GCC
run: nix build -L --no-link --keep-going '.?submodules=1#pc-decomp.debug.native32.gcc' 2>&1 | grep -A3 'error:'
10 changes: 5 additions & 5 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 15 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
(_: { pkgs, system }: with pkgs; rec {
packages =
let
pkgsAarch64 = pkgsCross.aarch64-multiplatform;
pkgsARM32 = pkgsCross.armv7l-hf-multiplatform;
pkgs32 = if system == "x86_64-linux" then pkgsi686Linux else pkgsARM32;

Expand All @@ -26,26 +27,38 @@
};

mkOnline = withDebug: {
native = {
gcc = callPackage ./mods/Windows/OnlineCTR/Network_PC/Server { ctrModSDK = self; inherit withDebug; };
clang = callPackage ./mods/Windows/OnlineCTR/Network_PC/Server { ctrModSDK = self; stdenv = clangStdenv; inherit withDebug; };
};
native32 = with pkgs32; {
gcc = callPackage ./mods/Windows/OnlineCTR/Network_PC/Server { ctrModSDK = self; inherit withDebug; };
clang = callPackage ./mods/Windows/OnlineCTR/Network_PC/Server { ctrModSDK = self; stdenv = clangStdenv; inherit withDebug; };
};
aarch64 = with pkgsAarch64; {
gcc = callPackage ./mods/Windows/OnlineCTR/Network_PC/Server { ctrModSDK = self; inherit withDebug; };
clang = callPackage ./mods/Windows/OnlineCTR/Network_PC/Server { ctrModSDK = self; stdenv = clangStdenv; inherit withDebug; };
};
arm32 = with pkgsARM32; {
gcc = callPackage ./mods/Windows/OnlineCTR/Network_PC/Server { ctrModSDK = self; inherit withDebug; };
clang = callPackage ./mods/Windows/OnlineCTR/Network_PC/Server { ctrModSDK = self; stdenv = clangStdenv; inherit withDebug; };
};
mingwW64 = with pkgsCross.mingwW64; {
gcc = callPackage ./mods/Windows/OnlineCTR/Network_PC/Server { ctrModSDK = self; inherit withDebug; };
clang = callPackage ./mods/Windows/OnlineCTR/Network_PC/Server { ctrModSDK = self; stdenv = clangStdenv; trustCompiler = true; inherit withDebug; };
};
mingw32 = with pkgsCross.mingw32; {
gcc = callPackage ./mods/Windows/OnlineCTR/Network_PC/Server { ctrModSDK = self; inherit withDebug; };
clang = callPackage ./mods/Windows/OnlineCTR/Network_PC/Server { ctrModSDK = self; stdenv = clangStdenv; trustCompiler = true; inherit withDebug; };
};
};
in
rec {
retail = {
pc-retail = {
release = mkCTR false false;
debug = mkCTR true false;
};
decomp = {
pc-decomp = {
release = mkCTR false true;
debug = mkCTR true true;
};
Expand Down
2 changes: 1 addition & 1 deletion mods/Windows/OnlineCTR/Network_PC/Server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
target_compile_options(ctr_srv PRIVATE -Wno-int-conversion -Wno-incompatible-function-pointer-types -Wno-implicit-function-declaration -Wno-return-type)
else()
# Assume GCC
target_compile_options(ctr_srv PRIVATE -Wno-implicit-function-declaration -Wno-incompatible-pointer-types)
target_compile_options(ctr_srv PRIVATE -Wno-implicit-function-declaration -Wno-incompatible-pointer-types -Wno-implicit-int)
endif()

# Debug options
Expand Down
7 changes: 5 additions & 2 deletions rebuild_PC/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,17 @@ if(CTR_VR)
target_compile_options(ctr_bin PUBLIC -DUSE_VR)
endif()

# Clang is rigorous
# Compiler options
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
target_compile_options(ctr_bin PUBLIC -Wno-int-conversion -Wno-incompatible-function-pointer-types -Wno-implicit-function-declaration -Wno-return-type)
if(MINGW OR CYGWIN)
if(NOT CMAKE_VERSION VERSION_LESS "3.13")
target_link_options(ctr_bin PUBLIC -static-libgcc)
endif()
endif()
else()
# Assume GCC
target_compile_options(ctr_bin PRIVATE -Wno-implicit-function-declaration -Wno-incompatible-pointer-types -Wno-implicit-int)
endif()

if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
Expand Down Expand Up @@ -141,7 +144,7 @@ add_library(psycross_static STATIC ${PSYCROSS_SRCS_C} ${PSYCROSS_SRCS_CPP})
set_target_properties(psycross_static PROPERTIES OUTPUT_NAME "psycross")
target_include_directories(psycross_static PUBLIC "../externals/PsyCross/include")

target_compile_options(psycross_static PRIVATE -Wno-narrowing)
target_compile_options(psycross_static PRIVATE -Wno-narrowing -Wno-incompatible-pointer-types -Wno-implicit-function-declaration)

target_link_libraries(psycross_static ${SDL2_LIBRARIES})
target_include_directories(psycross_static PRIVATE ${SDL2_INCLUDE_DIRS})
Expand Down

0 comments on commit 5268428

Please sign in to comment.