Skip to content

Commit

Permalink
feat(github): enable PR CI Linux server builds
Browse files Browse the repository at this point in the history
* Enable Linux builds by using the supplied v8 .h files and node's .so from apt-get.
* Purely tries to compile and link the program, giving errors when something is amiss in the new code.
* Execution is not meant to work, neither is support for it given.
  • Loading branch information
thorium-cfx committed Feb 27, 2024
1 parent c590069 commit e7c77d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/ci/build_linux.sh
Expand Up @@ -5,7 +5,7 @@ JOB_SLOTS=${2:-16}

# install compile-time dependencies
sudo apt-get -y install libstdc++6 gcc-multilib lua5.3 lua5.3-dev \
libcurl4-openssl-dev libssl-dev libv8-dev libc-ares-dev libclang-dev libv8-dev \
libcurl4-openssl-dev libssl-dev libc-ares-dev libclang-dev libnode-dev \
python3-venv make clang lld dotnet-sdk-6.0 \
build-essential unzip

Expand Down Expand Up @@ -131,6 +131,11 @@ export CFLAGS="-fno-plt"
export CXXFLAGS="-D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR -Wno-deprecated-declarations -Wno-invalid-offsetof -fno-plt"
export LDFLAGS="-Wl,--build-id -fuse-ld=lld -ldl"

# Allows compilation of the node module and with it the whole solution
# We use the includes from our v8-9.3 vendor package and use libnode-dev's .so files (apt-get)
# Execution is not tested nor meant to work with this step, pure compilation and linkage
export CXXFLAGS="$CXXFLAGS -I$ROOT_REPO/vendor/v8/9.3/include/"

make clean
make clean config=release verbose=1
make -j${JOB_SLOTS} config=release
2 changes: 1 addition & 1 deletion .github/workflows/ci_build.yml
Expand Up @@ -11,7 +11,7 @@ jobs:
- [ FiveM, five, windows ]
- [ RedM, rdr3, windows ]
- [ Server, server, windows ]
#- [ Server, server, linux ]
- [ Server, server, linux ]
name: ${{ matrix.builds[0] }}${{ matrix.builds[2] == 'linux' && ' (Linux)' || '' }}
runs-on: ${{ matrix.builds[2] == 'windows' && 'windows-latest' || 'ubuntu-20.04' }}
env:
Expand Down

0 comments on commit e7c77d3

Please sign in to comment.