Single source of truth for library versions
This commit is contained in:
1 parent
5956299e80
commit
5d810e50d2
10 files changed
+54
-35
No files matched your search
+36
-26
@@ -2,11 +2,12 @@ name: Build
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
version:
|
||||
name: Extract Version
|
||||
versions:
|
||||
name: Extract Versions
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version: ${{ steps.extract-version.outputs.result }}
|
||||
base: ${{ steps.extract-version.outputs.base }}
|
||||
sdl: ${{ steps.extract-library-versions.outputs.sdl }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: CMake Configure
|
||||
@@ -15,12 +16,17 @@ jobs:
|
||||
cmake -S . -B build -G Ninja -DBUILD_CLIENT=NO
|
||||
VERSION=$(cat build/version.txt)
|
||||
echo "VERSION: ${VERSION}"
|
||||
echo "result=${VERSION}" >> $GITHUB_OUTPUT
|
||||
echo "base=${VERSION}" >> $GITHUB_OUTPUT
|
||||
- name: Library Versions
|
||||
id: extract-library-versions
|
||||
run: |
|
||||
. misc/lib-versions.sh
|
||||
echo "sdl=${SDL_VERSION}" >> $GITHUB_OUTPUT
|
||||
|
||||
linux:
|
||||
name: Linux
|
||||
runs-on: ubuntu-22.04
|
||||
needs: version
|
||||
needs: versions
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Dependencies
|
||||
@@ -36,13 +42,13 @@ jobs:
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ github.event.repository.name }}-linux-${{ needs.version.outputs.version }}
|
||||
name: ${{ github.event.repository.name }}-linux-${{ needs.versions.outputs.base }}
|
||||
path: |
|
||||
build/Release/**/*
|
||||
windows-msvc:
|
||||
name: Windows MSVC
|
||||
runs-on: windows-2022
|
||||
needs: version
|
||||
needs: versions
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Compile
|
||||
@@ -54,7 +60,7 @@ jobs:
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ github.event.repository.name }}-windows-msvc-${{ needs.version.outputs.version }}
|
||||
name: ${{ github.event.repository.name }}-windows-msvc-${{ needs.versions.outputs.base }}
|
||||
path: |
|
||||
build/Release/**/*.dll
|
||||
build/Release/**/*.exe
|
||||
@@ -62,7 +68,7 @@ jobs:
|
||||
windows-mingw:
|
||||
name: Windows MinGW
|
||||
runs-on: windows-2022
|
||||
needs: version
|
||||
needs: versions
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Compile
|
||||
@@ -74,7 +80,7 @@ jobs:
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ github.event.repository.name }}-windows-mingw-${{ needs.version.outputs.version }}
|
||||
name: ${{ github.event.repository.name }}-windows-mingw-${{ needs.versions.outputs.base }}
|
||||
path: |
|
||||
build/Release/**/*.dll
|
||||
build/Release/**/*.exe
|
||||
@@ -82,7 +88,7 @@ jobs:
|
||||
macos:
|
||||
name: macOS
|
||||
runs-on: macos-15
|
||||
needs: version
|
||||
needs: versions
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Import Code Signing Certificate
|
||||
@@ -125,13 +131,13 @@ jobs:
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ github.event.repository.name }}-macOS-${{ needs.version.outputs.version }}
|
||||
name: ${{ github.event.repository.name }}-macOS-${{ needs.versions.outputs.base }}
|
||||
path: |
|
||||
build/Release/**/*
|
||||
emscripten:
|
||||
name: Emscripten
|
||||
runs-on: ubuntu-22.04
|
||||
needs: version
|
||||
needs: versions
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install emsdk
|
||||
@@ -145,12 +151,13 @@ jobs:
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ github.event.repository.name }}-emscripten-${{ needs.version.outputs.version }}
|
||||
name: ${{ github.event.repository.name }}-emscripten-${{ needs.versions.outputs.base }}
|
||||
path: |
|
||||
build/Release/**/*
|
||||
linux-external-libraries:
|
||||
name: Linux (USE_INTERNAL_LIBS OFF)
|
||||
runs-on: ubuntu-22.04
|
||||
needs: versions
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Dependencies
|
||||
@@ -165,6 +172,7 @@ jobs:
|
||||
linux-32bit:
|
||||
name: Linux 32-bit
|
||||
runs-on: ubuntu-22.04
|
||||
needs: versions
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Dependencies
|
||||
@@ -179,6 +187,7 @@ jobs:
|
||||
freebsd:
|
||||
name: FreeBSD
|
||||
runs-on: ubuntu-latest
|
||||
needs: versions
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Compile
|
||||
@@ -192,6 +201,7 @@ jobs:
|
||||
openbsd:
|
||||
name: OpenBSD
|
||||
runs-on: ubuntu-latest
|
||||
needs: versions
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Compile
|
||||
@@ -207,7 +217,7 @@ jobs:
|
||||
if: github.event_name != 'pull_request'
|
||||
name: Check For Release Tag
|
||||
runs-on: ubuntu-latest
|
||||
needs: version
|
||||
needs: versions
|
||||
outputs:
|
||||
is-release: ${{ steps.is-release-test.outputs.result }}
|
||||
steps:
|
||||
@@ -222,8 +232,8 @@ jobs:
|
||||
echo "result=false" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "GIT_TAG: ${GIT_TAG}""
|
||||
echo "needs.version.outputs.version: ${{ needs.version.outputs.version }}""
|
||||
if [[ "${GIT_TAG}" = "${{ needs.version.outputs.version }}" ]]
|
||||
echo "needs.versions.outputs.base: ${{ needs.versions.outputs.base }}""
|
||||
if [[ "${GIT_TAG}" = "${{ needs.versions.outputs.base }}" ]]
|
||||
then
|
||||
echo "'${GIT_TAG}' is a release"
|
||||
echo "result=true" >> $GITHUB_OUTPUT
|
||||
@@ -238,7 +248,7 @@ jobs:
|
||||
if: github.event_name != 'pull_request' && needs.check-is-release.outputs.is-release == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- version
|
||||
- versions
|
||||
- check-is-release
|
||||
- windows-msvc
|
||||
- macos
|
||||
@@ -249,21 +259,21 @@ jobs:
|
||||
- name: Prepare Release Artifacts
|
||||
run: |
|
||||
mkdir release-artifacts
|
||||
mv ${{ github.event.repository.name }}-linux-${{ needs.version.outputs.version }}/${{ github.event.repository.name }}-${{ needs.version.outputs.version }}.deb \
|
||||
mv ${{ github.event.repository.name }}-linux-${{ needs.versions.outputs.base }}/${{ github.event.repository.name }}-${{ needs.versions.outputs.base }}.deb \
|
||||
release-artifacts
|
||||
zip -r9 release-artifacts/${{ github.event.repository.name }}-linux-${{ needs.version.outputs.version }}.zip \
|
||||
${{ github.event.repository.name }}-linux-${{ needs.version.outputs.version }}
|
||||
mv ${{ github.event.repository.name }}-windows-msvc-${{ needs.version.outputs.version }}/${{ github.event.repository.name }}-${{ needs.version.outputs.version }}.exe \
|
||||
zip -r9 release-artifacts/${{ github.event.repository.name }}-linux-${{ needs.versions.outputs.base }}.zip \
|
||||
${{ github.event.repository.name }}-linux-${{ needs.versions.outputs.base }}
|
||||
mv ${{ github.event.repository.name }}-windows-msvc-${{ needs.versions.outputs.base }}/${{ github.event.repository.name }}-${{ needs.versions.outputs.base }}.exe \
|
||||
release-artifacts
|
||||
mv ${{ github.event.repository.name }}-macOS-${{ needs.version.outputs.version }}/${{ github.event.repository.name }}-${{ needs.version.outputs.version }}.dmg \
|
||||
mv ${{ github.event.repository.name }}-macOS-${{ needs.versions.outputs.base }}/${{ github.event.repository.name }}-${{ needs.versions.outputs.base }}.dmg \
|
||||
release-artifacts
|
||||
zip -r9 release-artifacts/${{ github.event.repository.name }}-emscripten-${{ needs.version.outputs.version }}.zip \
|
||||
${{ github.event.repository.name }}-emscripten-${{ needs.version.outputs.version }}
|
||||
zip -r9 release-artifacts/${{ github.event.repository.name }}-emscripten-${{ needs.versions.outputs.base }}.zip \
|
||||
${{ github.event.repository.name }}-emscripten-${{ needs.versions.outputs.base }}
|
||||
- name: Publish Release Artifacts
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
name: Release ${{ needs.version.outputs.version }}
|
||||
name: Release ${{ needs.versions.outputs.base }}
|
||||
files: release-artifacts/*
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -1,3 +1,12 @@
|
||||
# Import variables from misc/lib-versions.sh
|
||||
file(STRINGS ${CMAKE_SOURCE_DIR}/misc/lib-versions.sh LIB_VERSIONS_CONTENT
|
||||
REGEX "^[A-Z_]+=[^ ]+")
|
||||
foreach(LINE ${LIB_VERSIONS_CONTENT})
|
||||
if(LINE MATCHES "^([A-Z_]+)=(.+)$")
|
||||
set(${CMAKE_MATCH_1} ${CMAKE_MATCH_2})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
include(libraries/curl)
|
||||
include(libraries/freetype)
|
||||
include(libraries/jpeg)
|
||||
|
||||
@@ -6,7 +6,7 @@ if(NOT BUILD_CLIENT)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(INTERNAL_CURL_DIR ${SOURCE_DIR}/thirdparty/curl-8.15.0)
|
||||
set(INTERNAL_CURL_DIR ${SOURCE_DIR}/thirdparty/curl-${CURL_VERSION})
|
||||
|
||||
find_package(CURL QUIET)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ endif()
|
||||
include(utils/disable_warnings)
|
||||
include(utils/find_include_dirs)
|
||||
|
||||
set(INTERNAL_JPEG_DIR ${SOURCE_DIR}/thirdparty/jpeg-9f)
|
||||
set(INTERNAL_JPEG_DIR ${SOURCE_DIR}/thirdparty/jpeg-${JPEG_VERSION})
|
||||
|
||||
if(USE_INTERNAL_JPEG)
|
||||
file(GLOB_RECURSE JPEG_SOURCES ${INTERNAL_JPEG_DIR}/j*.c)
|
||||
|
||||
@@ -8,7 +8,7 @@ endif()
|
||||
|
||||
include(utils/disable_warnings)
|
||||
|
||||
set(INTERNAL_OGG_DIR ${SOURCE_DIR}/thirdparty/libogg-1.3.6)
|
||||
set(INTERNAL_OGG_DIR ${SOURCE_DIR}/thirdparty/libogg-${OGG_VERSION})
|
||||
|
||||
if(USE_INTERNAL_OGG)
|
||||
file(GLOB_RECURSE OGG_SOURCES ${INTERNAL_OGG_DIR}/*.c)
|
||||
|
||||
@@ -6,7 +6,7 @@ if(NOT BUILD_CLIENT)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(INTERNAL_OPENAL_DIR ${SOURCE_DIR}/thirdparty/openal-soft-1.24.3)
|
||||
set(INTERNAL_OPENAL_DIR ${SOURCE_DIR}/thirdparty/openal-soft-${OPENAL_VERSION})
|
||||
|
||||
find_package(OpenAL QUIET)
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ endif()
|
||||
include(utils/disable_warnings)
|
||||
include(utils/find_include_dirs)
|
||||
|
||||
set(INTERNAL_OPUS_DIR ${SOURCE_DIR}/thirdparty/opus-1.5.2)
|
||||
set(INTERNAL_OPUSFILE_DIR ${SOURCE_DIR}/thirdparty/opusfile-0.12)
|
||||
set(INTERNAL_OPUS_DIR ${SOURCE_DIR}/thirdparty/opus-${OPUS_VERSION})
|
||||
set(INTERNAL_OPUSFILE_DIR ${SOURCE_DIR}/thirdparty/opusfile-${OPUSFILE_VERSION})
|
||||
|
||||
if(USE_INTERNAL_OPUS)
|
||||
file(GLOB_RECURSE OPUS_SOURCES ${INTERNAL_OPUS_DIR}/*.c)
|
||||
|
||||
@@ -9,7 +9,7 @@ if(EMSCRIPTEN)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(INTERNAL_SDL_DIR ${SOURCE_DIR}/thirdparty/SDL2-2.32.8)
|
||||
set(INTERNAL_SDL_DIR ${SOURCE_DIR}/thirdparty/SDL2-${SDL_VERSION})
|
||||
|
||||
include(utils/arch)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ endif()
|
||||
|
||||
include(utils/disable_warnings)
|
||||
|
||||
set(INTERNAL_VORBIS_DIR ${SOURCE_DIR}/thirdparty/libvorbis-1.3.7)
|
||||
set(INTERNAL_VORBIS_DIR ${SOURCE_DIR}/thirdparty/libvorbis-${VORBIS_VERSION})
|
||||
|
||||
if(USE_INTERNAL_VORBIS)
|
||||
file(GLOB_RECURSE VORBIS_SOURCES ${INTERNAL_VORBIS_DIR}/*.c)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
include(utils/disable_warnings)
|
||||
include(utils/find_include_dirs)
|
||||
|
||||
set(INTERNAL_ZLIB_DIR ${SOURCE_DIR}/thirdparty/zlib-1.3.1)
|
||||
set(INTERNAL_ZLIB_DIR ${SOURCE_DIR}/thirdparty/zlib-${ZLIB_VERSION})
|
||||
|
||||
if(USE_INTERNAL_ZLIB)
|
||||
file(GLOB_RECURSE ZLIB_SOURCES ${INTERNAL_ZLIB_DIR}/*.c)
|
||||
|
||||
Reference in new issue
Block a user