Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions .github/workflows/Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,14 @@ jobs:
with:
fetch-depth: 1

- name: Restore apt cache
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libgl1-mesa-dev libsdl2-dev libopenal-dev libcurl4-openssl-dev cmake ninja-build libfreetype6-dev ccache zip gcc-multilib g++-multilib debootstrap rsync util-linux file
version: 1.0
- name: Install build deps
run: |
set -eux
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libgl1-mesa-dev libsdl2-dev libopenal-dev libcurl4-openssl-dev \
libfreetype6-dev cmake ninja-build ccache zip gcc-multilib \
g++-multilib debootstrap rsync util-linux file

- name: Ensure ccache dir exists and init
run: |
Expand All @@ -56,7 +59,6 @@ jobs:
- name: Build the engine (x86_64)
if: matrix.arch == 'x86_64'
run: |
set -eux
rm -rf build
mkdir -p build
cd build
Expand Down Expand Up @@ -133,22 +135,23 @@ jobs:
- name: Build inside chroot (x86)
if: matrix.arch == 'x86'
run: |
set -eux
CHROOT_DIR="${RUNNER_TEMP}/chroot/${CHROOT_REL_PATH}"
# run the build inside the chroot under linux32
sudo linux32 chroot "$CHROOT_DIR" /bin/bash -lc "
set -eux
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y --no-install-recommends build-essential git cmake ninja-build ccache zip gcc-multilib g++-multilib libgl1-mesa-dev libsdl2-dev libopenal-dev libcurl4-openssl-dev libfreetype6-dev file
# clang for the compiler; keep gcc-multilib for 32-bit runtime libs (libc, crt1.o, libgcc_s)
apt-get install -y --no-install-recommends git cmake ninja-build ccache zip gcc-multilib g++-multilib libgl1-mesa-dev libsdl2-dev libopenal-dev libcurl4-openssl-dev libfreetype6-dev file
mkdir -p /root/.ccache
ccache --max-size=10G || true

cd /work
rm -rf build
mkdir -p build
cd build
cmake -G Ninja -DDEDICATED=ON -DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32 -DCMAKE_SYSTEM_PROCESSOR=i686 ../neo/
cmake -G Ninja -DDEDICATED=ON \\
-DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32 \\
-DCMAKE_SYSTEM_PROCESSOR=i686 ../neo/
ninja

mkdir -p /work/output/linux
Expand All @@ -159,7 +162,6 @@ jobs:
- name: Copy artifacts out of chroot to workspace (x86)
if: matrix.arch == 'x86'
run: |
set -eux
CHROOT_DIR="${RUNNER_TEMP}/chroot/${CHROOT_REL_PATH}"
mkdir -p "${GITHUB_WORKSPACE}/output/linux"
# copy files from chroot -> workspace
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/LinuxARM64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ jobs:
with:
fetch-depth: 1

- name: Restore apt cache
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libgl1-mesa-dev libsdl2-dev libopenal-dev libcurl4-openssl-dev cmake ninja-build libfreetype6-dev ccache zip
version: 1.0
- name: Install build deps
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libgl1-mesa-dev libsdl2-dev libopenal-dev libcurl4-openssl-dev \
libfreetype6-dev cmake ninja-build ccache zip

- name: Ensure ccache dir exists and init
run: |
Expand All @@ -49,7 +50,6 @@ jobs:

- name: Build the engine
run: |
set -eux
rm -rf build
mkdir -p build
cd build
Expand Down
13 changes: 7 additions & 6 deletions neo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,13 @@ if(D3_COMPILER_IS_GCC_OR_CLANG)
endif ()
endif ()

set(CMAKE_C_FLAGS_DEBUG "-g -ggdb -D_DEBUG -O0")
set(CMAKE_C_FLAGS_DEBUGALL "-g -ggdb -D_DEBUG")
set(CMAKE_C_FLAGS_PROFILE "-g -ggdb -D_DEBUG -O1 -fno-omit-frame-pointer")
set(CMAKE_C_FLAGS_RELEASE "-O2 -fno-math-errno -fno-trapping-math -ffinite-math-only -fomit-frame-pointer")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -ggdb -O2 -fno-math-errno -fno-trapping-math -ffinite-math-only -fno-omit-frame-pointer")
set(CMAKE_C_FLAGS_MINSIZEREL "-Os -fno-math-errno -fno-trapping-math -ffinite-math-only -fomit-frame-pointer")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ggdb -D_DEBUG -O0")
set(CMAKE_C_FLAGS_DEBUGALL "${CMAKE_C_FLAGS_DEBUGALL} -g -ggdb -D_DEBUG")
set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_PROFILE} -g -ggdb -D_DEBUG -O1 -fno-omit-frame-pointer")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -ffp-contract=off -fomit-frame-pointer -fno-math-errno -fno-trapping-math")
set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -g -O3 -ffp-contract=off -fomit-frame-pointer -fno-math-errno -fno-trapping-math")
set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} -Os -ffp-contract=off -fomit-frame-pointer -fno-math-errno -fno-trapping-math")


set(CMAKE_CXX_FLAGS_DEBUGALL ${CMAKE_C_FLAGS_DEBUGALL})
set(CMAKE_CXX_FLAGS_PROFILE ${CMAKE_C_FLAGS_PROFILE})
Expand Down
Loading