Merge pull request #45 from ei-grad/linux-build

Enable Linux CI build
This commit is contained in:
Azamat H. Hackimov 2024-04-18 02:23:12 +03:00 committed by GitHub
commit 84c04ebf13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 25 additions and 3 deletions

View File

@ -11,7 +11,10 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [{runner: windows-latest, preset: win}, {runner: macos-latest, preset: mac}]
os:
- {runner: windows-latest, preset: win}
- {runner: macos-latest, preset: mac}
- {runner: ubuntu-latest, preset: linux}
build_type: [Debug, Release]
runs-on: ${{ matrix.os.runner }}
@ -25,6 +28,18 @@ jobs:
# Install packages from Homebrew
brew bundle install
- name: Install Linux dependencies
if: ${{ matrix.os.preset == 'linux' }}
run: |
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y --no-install-recommends \
make cmake g++ libsdl1.2-dev libsdl-image1.2-dev \
libaudio-dev libaa1-dev libdirectfb-dev \
libncurses-dev \
libxext6:i386 # for ./scripts/hogutils/hogUtils-i686 binary
mkdir ~/Descent3
- name: Configure CMake
run: cmake --preset ${{ matrix.os.preset }} -B ${{ github.workspace }}/build

View File

@ -23,5 +23,13 @@
, "rhs": "Darwin"
}
}
, {
"name": "linux"
, "condition": {
"type": "equals"
, "lhs": "${hostSystemName}"
, "rhs": "Linux"
}
}
]
}

View File

@ -285,9 +285,8 @@ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SAFESEH:NO /SUBSYSTEM:WIN
ENDIF()
IF (UNIX AND NOT APPLE)
SET (PLATFORM_LIBS linux dd_lnxsound ddvid_lnx lnxcontroller ddio_lnx ${SDL_LIBRARY} caca asound audio esd aa directfb m dl GLU)
SET (PLATFORM_LIBS linux dd_lnxsound ddvid_lnx lnxcontroller ddio_lnx ${SDL_LIBRARY} m dl GLU ncurses pulse-simple)
SET (PLATFORM_CPPS loki_utils.c lnxmain.cpp)
SET(CMAKE_EXE_LINKER_FLAGS "/usr/lib/libpulse-simple.so.0")
ENDIF()
IF (APPLE)

0
scripts/hogutils/hogUtils-i686 Normal file → Executable file
View File