develop
Myk Taylor 2023-07-30 19:53:46 -07:00
parent 1faf156bfc
commit 0b2877a538
No known key found for this signature in database
3 changed files with 25 additions and 20 deletions

@ -22,7 +22,7 @@ on:
default: false
stonesense:
type: boolean
default: true
default: false
extras:
type: boolean
default: false
@ -32,7 +32,7 @@ on:
jobs:
build-linux64:
name: Linux package
name: Build linux64
runs-on: ubuntu-22.04
steps:
- name: Install basic build dependencies
@ -78,6 +78,8 @@ jobs:
-G Ninja \
-DCMAKE_INSTALL_PREFIX=build/image \
-DCMAKE_BUILD_TYPE=Release \
${{ inputs.platform-files && '-DCMAKE_C_COMPILER_LAUNCHER=ccache' || '' }} \
${{ inputs.platform-files && '-DCMAKE_CXX_COMPILER_LAUNCHER=ccache' || '' }} \
-DBUILD_LIBRARY:BOOL=${{ inputs.platform-files }} \
-DBUILD_PLUGINS:BOOL=${{ inputs.platform-files }} \
-DBUILD_STONESENSE:BOOL=${{ inputs.platform-files }} \
@ -90,6 +92,7 @@ jobs:
- name: Build DFHack
run: ninja -C build install
- name: Run cpp tests
if: inputs.platform-files
run: ninja -C build test
- name: Trim cache
if: inputs.platform-files
@ -98,7 +101,7 @@ jobs:
ccache --cleanup
ccache --show-stats
- name: Format artifact name
if: ${{ inputs.append-date-and-hash }}
if: inputs.append-date-and-hash
id: artifactname
run: |
echo name=${{ inputs.artifact-name }}-$(date +%Y%m%d)-$(git rev-parse --short HEAD) >> $GITHUB_OUTPUT
@ -106,5 +109,5 @@ jobs:
if: inputs.artifact-name
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.append-date-and-hash && inputs.artifact-name || steps.artifactname.outputs.name}}
name: ${{ inputs.append-date-and-hash && steps.artifactname.outputs.name || inputs.artifact-name }}
path: build/image/*

@ -7,8 +7,8 @@ jobs:
name: Build (Linux ${{ matrix.type }}, GCC ${{ matrix.gcc }})
uses: ./.github/workflows/build-linux.yml
with:
artifact-name: ${{ matrix.artifact-name != 0 && matrix.artifact-name || format('{0}-gcc-{1}', matrix.type, matrix.gcc) }}
append-date-and-hash: ${{ matrix.append-date-and-hash }}
artifact-name: ${{ matrix.artifact-name || format('{0}-gcc-{1}', matrix.type, matrix.gcc) }}
append-date-and-hash: ${{ matrix.append-date-and-hash && true || false }}
cache-id: ${{ matrix.type }}
stonesense: ${{ matrix.stonesense }}
docs: ${{ matrix.type == 'release' }}

@ -289,20 +289,22 @@ endif()
find_package(ZLIB REQUIRED)
include_directories(${ZLIB_INCLUDE_DIRS})
# Download SDL release and extract into depends in the build dir
# all we need are the header files (including generated headers), so the same release package
# will work for all platforms
# (the above statement is untested for OSX)
set(SDL_VERSION 2.26.2)
set(SDL_ZIP_MD5 574daf26d48de753d0b1e19823c9d8bb)
set(SDL_ZIP_FILE SDL2-devel-${SDL_VERSION}-VC.zip)
set(SDL_ZIP_PATH ${dfhack_SOURCE_DIR}/depends/SDL2/)
download_file("https://github.com/libsdl-org/SDL/releases/download/release-${SDL_VERSION}/${SDL_ZIP_FILE}"
${SDL_ZIP_PATH}${SDL_ZIP_FILE}
${SDL_ZIP_MD5})
file(ARCHIVE_EXTRACT INPUT ${SDL_ZIP_PATH}${SDL_ZIP_FILE}
DESTINATION ${SDL_ZIP_PATH})
include_directories(${SDL_ZIP_PATH}/SDL2-${SDL_VERSION}/include)
if(BUILD_LIBRARY)
# Download SDL release and extract into depends in the build dir
# all we need are the header files (including generated headers), so the same release package
# will work for all platforms
# (the above statement is untested for OSX)
set(SDL_VERSION 2.26.2)
set(SDL_ZIP_MD5 574daf26d48de753d0b1e19823c9d8bb)
set(SDL_ZIP_FILE SDL2-devel-${SDL_VERSION}-VC.zip)
set(SDL_ZIP_PATH ${dfhack_SOURCE_DIR}/depends/SDL2/)
download_file("https://github.com/libsdl-org/SDL/releases/download/release-${SDL_VERSION}/${SDL_ZIP_FILE}"
${SDL_ZIP_PATH}${SDL_ZIP_FILE}
${SDL_ZIP_MD5})
file(ARCHIVE_EXTRACT INPUT ${SDL_ZIP_PATH}${SDL_ZIP_FILE}
DESTINATION ${SDL_ZIP_PATH})
include_directories(${SDL_ZIP_PATH}/SDL2-${SDL_VERSION}/include)
endif()
if(APPLE)
# libstdc++ (GCC 4.8.5 for OS X 10.6)