New ghactions reltype to ease tpt-libs development
This commit is contained in:
parent
f6878dcdb6
commit
b963010187
15
.github/build.sh
vendored
15
.github/build.sh
vendored
@ -121,6 +121,21 @@ if [ $PLATFORM_SHORT == "mac" ]; then
|
||||
export CXXFLAGS=-mmacosx-version-min=$macosx_version_min
|
||||
export LDFLAGS=-mmacosx-version-min=$macosx_version_min
|
||||
fi
|
||||
if [ "$RELTYPE" == "tptlibsdev" ]; then
|
||||
tptlibsbranch=`echo $RELNAME | cut -d '-' -f 2-` # $RELNAME is tptlibsdev-BRANCH
|
||||
git clone https://github.com/$GITHUB_REPOSITORY_OWNER/tpt-libs --branch $tptlibsbranch
|
||||
cd tpt-libs
|
||||
if [ ! -d patches/$MACHINE_SHORT-$PLATFORM_SHORT-$TOOLSET_SHORT-$STATIC_DYNAMIC ]; then
|
||||
cd ..
|
||||
echo "no prebuilt libraries for this configuration" > powder$bin_suffix
|
||||
exit 0
|
||||
fi
|
||||
VTAG=v00000000000000 ./build.sh
|
||||
cd ../subprojects
|
||||
7z x ../tpt-libs/temp/libraries.zip
|
||||
other_flags+=$'\t-Dtpt_libs_vtag=v00000000000000'
|
||||
cd ..
|
||||
fi
|
||||
meson -Dbuildtype=release -Db_pie=false -Dworkaround_gcc_no_pie=true -Db_staticpic=false $lto_flag $static_flag -Dinstall_check=true $other_flags build
|
||||
cd build
|
||||
ninja
|
||||
|
10
.github/get-type.py
vendored
10
.github/get-type.py
vendored
@ -3,9 +3,10 @@ import sys
|
||||
|
||||
ref = sys.argv[1]
|
||||
|
||||
match_stable = re.fullmatch(r'refs/tags/v([0-9]+)\.([0-9]+)\.([0-9]+)', ref)
|
||||
match_beta = re.fullmatch(r'refs/tags/v([0-9]+)\.([0-9]+)\.([0-9]+)b', ref)
|
||||
match_snapshot = re.fullmatch(r'refs/tags/snapshot-([0-9]+)', ref)
|
||||
match_stable = re.fullmatch(r'refs/tags/v([0-9]+)\.([0-9]+)\.([0-9]+)', ref)
|
||||
match_beta = re.fullmatch(r'refs/tags/v([0-9]+)\.([0-9]+)\.([0-9]+)b', ref)
|
||||
match_tptlibsdev = re.fullmatch(r'refs/heads/tptlibsdev-(.*)', ref)
|
||||
match_snapshot = re.fullmatch(r'refs/tags/snapshot-([0-9]+)', ref)
|
||||
if match_stable:
|
||||
print('::set-output name=TYPE::stable')
|
||||
print('::set-output name=NAME::v%s.%s.%s' % (match_stable.group(1), match_stable.group(2), match_stable.group(3)))
|
||||
@ -15,6 +16,9 @@ elif match_beta:
|
||||
elif match_snapshot:
|
||||
print('::set-output name=TYPE::snapshot')
|
||||
print('::set-output name=NAME::snapshot-%s' % match_snapshot.group(1))
|
||||
elif match_tptlibsdev:
|
||||
print('::set-output name=TYPE::tptlibsdev')
|
||||
print('::set-output name=NAME::tptlibsdev-%s' % match_tptlibsdev.group(1))
|
||||
else:
|
||||
print('::set-output name=TYPE::dev')
|
||||
print('::set-output name=NAME::dev')
|
||||
|
11
.github/workflows/build.yaml
vendored
11
.github/workflows/build.yaml
vendored
@ -7,6 +7,7 @@ on:
|
||||
tags:
|
||||
- 'v*.*'
|
||||
- 'snapshot-*'
|
||||
- 'tptlibsdev-*'
|
||||
pull_request:
|
||||
branches:
|
||||
- '*'
|
||||
@ -43,6 +44,7 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
needs: [release]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# | lin-x86_64 | mac-x86_64 | win-x86_64 | lin-i686 | mac-i686 | win-i686 | lin-arm64 | mac-arm64 | win-arm64
|
||||
# --------------+------------+------------+------------+------------+------------+------------+------------+------------+------------
|
||||
@ -61,9 +63,9 @@ jobs:
|
||||
#########################################################
|
||||
############# BEGIN BLOCK FOR COPYING BELOW #############
|
||||
#########################################################
|
||||
machine_short: [x86_64, i686, arm64]
|
||||
platform_short: [lin, mac, win]
|
||||
toolset_short: [gcc, msvc, mingw]
|
||||
machine_short: [x86_64, i686, arm64]
|
||||
static_dynamic: [static, dynamic]
|
||||
exclude:
|
||||
- toolset_short: mingw
|
||||
@ -114,9 +116,7 @@ jobs:
|
||||
- if: matrix.platform_short == 'lin' && matrix.toolset_short == 'mingw'
|
||||
run: sudo apt update && sudo apt install g++-mingw-w64-x86-64
|
||||
- if: matrix.platform_short == 'mac'
|
||||
uses: Homebrew/actions/setup-homebrew@master
|
||||
- if: matrix.platform_short == 'mac'
|
||||
run: brew install pkg-config
|
||||
run: brew install pkg-config coreutils
|
||||
- if: matrix.platform_short == 'mac' && matrix.static_dynamic != 'static'
|
||||
run: brew install luajit curl fftw zlib sdl2
|
||||
- if: matrix.platform_short == 'lin' && matrix.static_dynamic != 'static'
|
||||
@ -150,13 +150,14 @@ jobs:
|
||||
needs: [build, release]
|
||||
if: needs.release.outputs.can_publish == 'yes' && startsWith(github.ref, 'refs/tags/') # not a perfect match but get-type.py takes care of this in job build
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
#########################################################
|
||||
############# BEGIN BLOCK COPIED FROM ABOVE #############
|
||||
#########################################################
|
||||
machine_short: [x86_64, i686, arm64]
|
||||
platform_short: [lin, mac, win]
|
||||
toolset_short: [gcc, msvc, mingw]
|
||||
machine_short: [x86_64, i686, arm64]
|
||||
static_dynamic: [static, dynamic]
|
||||
exclude:
|
||||
- toolset_short: mingw
|
||||
|
38
meson.build
38
meson.build
@ -10,35 +10,32 @@ to_array = generator(
|
||||
)
|
||||
|
||||
cpp_compiler = meson.get_compiler('cpp')
|
||||
|
||||
conf_data = configuration_data()
|
||||
conf_data.set('CURL_STATICLIB', false)
|
||||
conf_data.set('ZLIB_WINAPI', false)
|
||||
|
||||
copt_x86 = host_machine.cpu_family() in [ 'x86_64', 'x86' ]
|
||||
copt_64bit = host_machine.cpu_family() in [ 'x86_64', 'aarch64' ]
|
||||
copt_msvc = cpp_compiler.get_id() in [ 'msvc' ]
|
||||
|
||||
copt_x86 = false
|
||||
copt_64bit = false
|
||||
copt_msvc = false
|
||||
if cpp_compiler.get_id() in [ 'msvc' ]
|
||||
copt_compiler = 'msvc'
|
||||
copt_msvc = true
|
||||
elif cpp_compiler.get_id() in [ 'gcc', 'clang' ]
|
||||
copt_compiler = 'gcc'
|
||||
else
|
||||
warning('unsupported compiler: ' + cpp_compiler.get_id() + '; you are on your own')
|
||||
copt_compiler = 'gcc'
|
||||
endif
|
||||
|
||||
if host_machine.cpu_family() in [ 'x86_64' ]
|
||||
copt_architecture = 'x86_64'
|
||||
copt_x86 = true
|
||||
copt_64bit = true
|
||||
elif host_machine.cpu_family() in [ 'x86' ]
|
||||
copt_architecture = 'i686'
|
||||
copt_x86 = true
|
||||
elif host_machine.cpu_family() in [ 'aarch64' ]
|
||||
copt_architecture = 'arm64'
|
||||
copt_64bit = true
|
||||
else
|
||||
warning('unsupported architecture: ' + host_machine.cpu_family() + '; you are on your own')
|
||||
copt_architecture = 'i686'
|
||||
endif
|
||||
|
||||
if host_machine.system() in [ 'linux', 'freebsd' ]
|
||||
copt_platform = 'lin'
|
||||
elif host_machine.system() in [ 'windows' ]
|
||||
@ -49,14 +46,8 @@ else
|
||||
warning('unsupported platform: ' + host_machine.system() + '; you are on your own')
|
||||
copt_platform = 'lin'
|
||||
endif
|
||||
|
||||
if get_option('ogli') or get_option('oglr')
|
||||
error('OpenGL features are currently unavailable')
|
||||
endif
|
||||
|
||||
uopt_static = get_option('static')
|
||||
use_tpt_libs = 'no'
|
||||
tpt_libs_vtag = 'v20220217170412'
|
||||
if uopt_static == 'system'
|
||||
if copt_platform == 'win'
|
||||
error('no way to find static system libraries on windows')
|
||||
@ -68,6 +59,19 @@ else
|
||||
use_tpt_libs = 'dynamic'
|
||||
endif
|
||||
endif
|
||||
|
||||
conf_data = configuration_data()
|
||||
conf_data.set('CURL_STATICLIB', false)
|
||||
conf_data.set('ZLIB_WINAPI', false)
|
||||
|
||||
if get_option('ogli') or get_option('oglr')
|
||||
error('OpenGL features are currently unavailable')
|
||||
endif
|
||||
|
||||
tpt_libs_vtag = get_option('tpt_libs_vtag')
|
||||
if tpt_libs_vtag == ''
|
||||
tpt_libs_vtag = 'v20220217170412'
|
||||
endif
|
||||
if use_tpt_libs != 'no'
|
||||
nope = false
|
||||
if copt_architecture == 'i686' and not copt_msvc
|
||||
|
@ -136,3 +136,9 @@ option(
|
||||
value: true,
|
||||
description: 'Pass -no-pie to gcc manually to work around meson\'s -Db_pie=false doing nothing'
|
||||
)
|
||||
option(
|
||||
'tpt_libs_vtag',
|
||||
type: 'string',
|
||||
value: '',
|
||||
description: 'tpt-libs vtag override, not useful outside tpt-libs development'
|
||||
)
|
||||
|
Reference in New Issue
Block a user