twhl-community / halflife-updated

Half-Life SDK updated to compile under VS2019 and 2022. Check README.md for more information.
Other
386 stars 148 forks source link

Travis ci build errors #162

Closed brcaswell closed 2 years ago

brcaswell commented 2 years ago

I forked this branch and added .travis.yml -- continuous build integration -- then trigged a build on the commit.

there are three targets/jobs for this build:

forked repo - github details page for that build trigger: https://github.com/brcaswell/HL1_SDK_UPDATED/runs/7839014558

build page on travis site: https://app.travis-ci.com/github/brcaswell/HL1_SDK_UPDATED/builds/254406017

SamVanheer commented 2 years ago

You're using really old GCC versions:

gcc --version gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609

gcc --version gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4

That's causing the problems for the first two jobs. You'll need at least GCC 8 to get full C++17 support, and even then it's still better to go for GCC 9.

I've updated this repository's wiki and the TWHL tutorial to make note of this: https://github.com/SamVanheer/halflife-updated/wiki https://twhl.info/wiki/page/Half-Life_Programming_-_Getting_Started

The Clang job is failing due to a compiler parameter that isn't supported. Looks like Clang requires an additional parameter to make this work: https://stackoverflow.com/questions/22581350/clang-5-1-fpmath

I haven't tried Clang before so i don't know if there are any other problems.

SamVanheer commented 2 years ago

I've cleaned up the makefiles to remove the old architecture-specific stuff and i've added a variable that can be used to override the the compiler being used:

make COMPILER=clang++

I've also fixed the problems preventing clang from compiling the mod. It behaves the same as a G++ compiled version when tested on Ubuntu 20.04.

I've added a Github Actions configuration file to build Windows and Linux versions, and the Linux version is built with both G++ and Clang++.

Can you try this out and see if it works on your end? Note that you may need to change the Ubuntu distro used to a more recent one or add a package repository to get GCC 9 or newer.

brcaswell commented 2 years ago

thanks, we'll resolve this with your added Github Actions -- they reflect on the intention of adding build integration for this repo.

on my end, I was able to use travisci to build 'jammy' ("Ubuntu 22.04 Jammy Jellyfish") and 'focal' ("Ubuntu 20.04 LTS Focal Fossa"), it could not build osx, which is expected -- due in part to i386 architecture being dropped from later versions of maxOSX and xcode.

ref: https://app.travis-ci.com/github/brcaswell/HL1_SDK_UPDATED/branches