Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More *BSD workflows #2366

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
0aa9560
Added OpenBSD workflow
Dec 20, 2022
ec9dd43
Trying another syntax for the workflow
Dec 20, 2022
f750463
Trying another syntax for the workflow, part 2
Dec 20, 2022
9ab60b5
Trying another syntax for the workflow, part 3
Dec 20, 2022
33b4167
Trying another syntax for the workflow, part 4
Dec 20, 2022
d3ad133
Trying another syntax for the workflow, part 5
Dec 20, 2022
51333a9
Merge branch 'master' into morebsd
Semphriss Aug 2, 2023
3653ac3
Trigger workflow
tobbi Aug 2, 2023
d7b8fbb
No -Werror on reserved-identifier
tobbi Aug 2, 2023
c6f5c79
Fix space
tobbi Aug 2, 2023
9eaf4b8
Merge branch 'master' into morebsd
tobbi Aug 2, 2023
2c36082
Add copyback: false
tobbi Aug 8, 2023
7977cb3
Check space left multiple times
tobbi Aug 9, 2023
133ed21
Add df -h to freebsd as well
tobbi Aug 9, 2023
02fde72
Don't install boost
tobbi Aug 9, 2023
ff29743
Merge branch 'master' into morebsd
tobbi May 18, 2024
054125b
Update BSD VM to v1.0.7, fixes issues with rsync
tobbi May 18, 2024
ef045ce
Add workflow_dispatch to BSD workflow
tobbi May 18, 2024
35f7da0
Trigger BSD build manually
tobbi May 18, 2024
f8892b9
Update FreeBSD VM to 1.0.7 as well
tobbi May 18, 2024
8736a68
Run on ubuntu-latest as per documentation
tobbi May 18, 2024
e0e3852
Add unsafe-buffer-usage to warnings [ci skip]
tobbi May 18, 2024
e9a1bf9
Trigger build
tobbi May 18, 2024
070d5bd
Ignore -Wcast-function-type-strict
tobbi May 18, 2024
fc5b7b2
Don't check free space [ci skip]
tobbi May 18, 2024
13baf75
List all files within sdl2 and sdl2_image
tobbi May 18, 2024
a492be5
Specify SDL2_LIBRARY paths manually
tobbi May 18, 2024
5858b66
Manually specify SDL2_LIBRARIES as well
tobbi May 18, 2024
37b0809
Fix definition name
tobbi May 18, 2024
ceae48d
Remove pkg_info calls, add hint [ci skip]
tobbi May 18, 2024
13f7f9e
Add -execinfo linker flag for BSD variants
tobbi May 18, 2024
6bd5d9d
Don't build squirrel submodule, use BSD package instead
tobbi May 18, 2024
8bdbf35
OpenBSD does not have squirrel [ci skip]
tobbi May 18, 2024
a745d05
SQ_DISABLE_CMAKE_INSTALLER=ON
tobbi May 18, 2024
a8f79d2
Revert "SQ_DISABLE_CMAKE_INSTALLER=ON"
tobbi May 18, 2024
9048000
Maybe fix OpenBSD
tobbi May 18, 2024
6a350e7
Specify paths to SDL2 libraries for OpenBSD
tobbi May 18, 2024
de33b74
Maybe fix having to specify paths directly
tobbi May 18, 2024
795d220
Don't build tests for OpenBSD
tobbi May 18, 2024
1c201a9
Comment out call to test_supertux2 [ci skip]
tobbi May 18, 2024
c13452f
Run workflows again
tobbi May 18, 2024
5449471
Migrate to actions/checkout@v4 [ci skip]
tobbi May 18, 2024
2181016
Merge branch 'master' into morebsd
tobbi May 18, 2024
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
72 changes: 57 additions & 15 deletions .github/workflows/bsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,35 +23,29 @@ on:
tags:
- '*'
pull_request: {}
workflow_dispatch:

jobs:
bsd:

freebsd:
strategy:
fail-fast: false
matrix:
# TODO: Add the OpenBSD, NetBSD and Solaris VMs whenever possible
vm_os: [freebsd]
build_type: [Debug, Release]
# FreeBSD does not have glbinding
# glbiactions/checkout@v4

runs-on: macos-10.15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
# Fetch the whole tree so git describe works
fetch-depth: 0
submodules: true

- name: Build in FreeBSD
if: ${{ matrix.vm_os == 'freebsd' }}
env:
BUILD_TYPE: ${{ matrix.build_type }}
# GLBINDING: ${{ matrix.glbinding }} # TODO: Re-add if available
uses: vmactions/[email protected]
uses: vmactions/[email protected]
with:
envs: 'BUILD_TYPE' # TODO: Add GLBINDING here if it comes to FreeBSD
envs: BUILD_TYPE
sync: rsync
usesh: true
prepare: |
Expand All @@ -63,7 +57,6 @@ jobs:
pkg install -y sdl2_image
pkg install -y openal-soft
pkg install -y glew
# pkg install -y glbinding # TODO: Uncomment whenever possible
pkg install -y curl
pkg install -y libogg
pkg install -y libvorbis
Expand All @@ -76,8 +69,57 @@ jobs:
-DBUILD_TESTS=ON -DINSTALL_SUBDIR_SHARE=share/supertux2 \
-DCMAKE_INSTALL_MESSAGE=NEVER -DCMAKE_INSTALL_PREFIX=/usr \
-DINSTALL_SUBDIR_BIN=bin # -DGLBINDING_ENABLED=$GLBINDING
# TODO: Uncomment whenever possible
make -j3 VERBOSE=1
make install DESTDIR="/tmp/supertux" VERBOSE=1
./test_supertux2
actions/checkout@v4

openbsd:
strategy:
fail-fast: false
matrix:
build_type: [Debug, Release]

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# Fetch the whole tree so git describe works
fetch-depth: 0
submodules: true

- name: Build in OpenBSD
env:
BUILD_TYPE: ${{ matrix.build_type }}
uses: vmactions/[email protected]
with:
envs: BUILD_TYPE
sync: rsync
usesh: true
copyback: false
prepare: |
pkg_add git
pkg_add cmake
pkg_add gtest
pkg_add sdl2
pkg_add sdl2-image
pkg_add openal
pkg_add glew
pkg_add curl
pkg_add libogg
pkg_add libvorbis
pkg_add freetype
pkg_add glm
pkg_add squirrel
run: |
mkdir build && cd build
# IFileStreamBuf test fails on OpenBSD due to a segmentation fault.
# This needs to get investigated. In the meantime, don't build any
# tests.
cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DWARNINGS=ON -DWERROR=ON \
-DBUILD_TESTS=OFF -DINSTALL_SUBDIR_SHARE=share/supertux2 \
-DCMAKE_INSTALL_MESSAGE=NEVER -DCMAKE_INSTALL_PREFIX=/usr \
-DINSTALL_SUBDIR_BIN=bin # -DGLBINDING_ENABLED=$GLBINDING
make -j3 VERBOSE=1
make install DESTDIR="/tmp/supertux" VERBOSE=1
# ./test_supertux2

7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,15 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing")
endif()

if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR ${CMAKE_SYSTEM_NAME} MATCHES "BSD")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/lib")
endif()

if(${CMAKE_SYSTEM_NAME} MATCHES "BSD")
# Pass -lexecinfo so that stacktrace symbols can be found
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lexecinfo")
endif()

## Add lots of dependencies to compiler switches
include(SuperTux/ProvideGlm)
include(SuperTux/ProvideFmt)
Expand Down
8 changes: 8 additions & 0 deletions mk/cmake/SuperTux/ProvideSquirrel.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ else()
set (BUILD_TYPE ${CMAKE_BUILD_TYPE})
endif()

# This is (hopefully) a quick fix for our FreeBSD CIs:
if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
set(SQ_DISABLE_CMAKE_INSTALLER ON)
else()
set(SQ_DISABLE_CMAKE_INSTALLER OFF)
endif()

set(SQUIRREL_PREFIX ${CMAKE_BINARY_DIR}/squirrel/ex)
ExternalProject_Add(squirrel_project
SOURCE_DIR "${CMAKE_SOURCE_DIR}/external/squirrel/"
Expand All @@ -44,6 +51,7 @@ else()
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-DCMAKE_INSTALL_PREFIX=${SQUIRREL_PREFIX}
-DSQ_DISABLE_CMAKE_INSTALLER=${SQ_DISABLE_CMAKE_INSTALLER}
-DCMAKE_INSTALL_LIBDIR=lib
-DINSTALL_INC_DIR=include
-DCMAKE_POSITION_INDEPENDENT_CODE=ON)
Expand Down
2 changes: 2 additions & 0 deletions mk/cmake/SuperTux/WarningFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
"-Wno-sign-conversion "
"-Wno-reserved-identifier "
"-Wno-unknown-warning-option "
"-Wno-unsafe-buffer-usage "
"-Wno-cast-function-type-strict "

# warnings that should probably be fixed in code
"-Wno-documentation-unknown-command "
Expand Down
Loading