mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-22 16:18:50 -05:00
d4c1c40c1d
* hacks to align strings for clang... wow just wow
* start work to getting built with clang
* fix issues with struct constructors, all builds, doesn't link still
* fix some narrowing issues that clang complains about
* fix compliation of zapd
* fix null deref in VersionInfo
* builds with clang
* make stringbuilding use StringHelper instead of addition
* fix linking
* add CLANG SHIP overlay on clang built versions
* doesn't need to be volatile
* mark unknown strings as extern
* rename some stuff
* can't align extern
* hopefully fix compilation for everythign
* expandtab
* allow setting LD
* Revert "allow setting LD"
This reverts commit 711aba6db2
.
maybe to use lld it should be a LDFLAG?
* -Wno-deprecated-declarations is required for newer versions of clang
on macOS 13 beta sdk, the version of apple clang requires this
* Add jenkins support for clang
* Forward CXX flags to stormlib compilation
* Move GCC only flags to check
* use exports to set multiarch setup
* Fix Jenkins forever
* use make instead of cmake --build
add some flags to build with clang-11 as well
* address review coments
- rework extraction to allow multi thread
- misc readability cleanup
* update makefile to add WARN on linux+clang
Co-authored-by: David Chavez <david@dcvz.io>
159 lines
7.3 KiB
Groovy
159 lines
7.3 KiB
Groovy
pipeline {
|
|
agent none
|
|
|
|
options {
|
|
timestamps()
|
|
skipDefaultCheckout(true)
|
|
}
|
|
|
|
stages {
|
|
stage('Build SoH') {
|
|
parallel {
|
|
stage ('Build Windows') {
|
|
options {
|
|
timeout(time: 20)
|
|
}
|
|
environment {
|
|
MSBUILD='C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Msbuild\\Current\\Bin\\msbuild.exe'
|
|
CONFIG='Release'
|
|
OTRPLATFORM='x64'
|
|
PLATFORM='x64'
|
|
ZIP='C:\\Program Files\\7-Zip\\7z.exe'
|
|
PYTHON='C:\\Users\\jenkins\\AppData\\Local\\Programs\\Python\\Python310\\python.exe'
|
|
CMAKE='C:\\Program Files\\CMake\\bin\\cmake.exe'
|
|
TOOLSET='v142'
|
|
}
|
|
agent {
|
|
label "SoH-Builders"
|
|
}
|
|
steps {
|
|
checkout([
|
|
$class: 'GitSCM',
|
|
branches: scm.branches,
|
|
doGenerateSubmoduleConfigurations: scm.doGenerateSubmoduleConfigurations,
|
|
extensions: scm.extensions,
|
|
userRemoteConfigs: scm.userRemoteConfigs
|
|
])
|
|
|
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
|
bat """
|
|
|
|
"${env.MSBUILD}" ".\\OTRExporter\\OTRExporter.sln" -t:build -p:Configuration=${env.CONFIG};Platform=${env.OTRPLATFORM};PlatformToolset=${env.TOOLSET};RestorePackagesConfig=true /restore /nodeReuse:false /m
|
|
|
|
xcopy "..\\..\\ZELOOTD.z64" "OTRExporter\\"
|
|
|
|
cd "OTRExporter"
|
|
"${env.PYTHON}" ".\\extract_assets.py"
|
|
cd "..\\"
|
|
|
|
"${env.MSBUILD}" ".\\soh\\soh.sln" -t:build -p:Configuration=${env.CONFIG};Platform=${env.PLATFORM};PlatformToolset=${env.TOOLSET} /nodeReuse:false /m
|
|
|
|
cd OTRGui
|
|
mkdir build
|
|
cd build
|
|
|
|
"${env.CMAKE}" ..
|
|
"${env.CMAKE}" --build . --config Release
|
|
|
|
cd "..\\..\\"
|
|
|
|
move "soh\\x64\\Release\\soh.exe" ".\\"
|
|
move "OTRGui\\build\\assets" ".\\"
|
|
move ".\\OTRExporter\\x64\\Release\\ZAPD.exe" ".\\assets\\extractor\\"
|
|
move ".\\OTRGui\\build\\Release\\OTRGui.exe" ".\\"
|
|
rename README.md readme.txt
|
|
|
|
"${env.ZIP}" a soh.7z soh.exe OTRGui.exe assets readme.txt
|
|
|
|
"""
|
|
archiveArtifacts artifacts: 'soh.7z', followSymlinks: false, onlyIfSuccessful: true
|
|
}
|
|
}
|
|
post {
|
|
always {
|
|
step([$class: 'WsCleanup']) // Clean workspace
|
|
}
|
|
}
|
|
}
|
|
stage ('Build Linux') {
|
|
options {
|
|
timeout(time: 20)
|
|
}
|
|
agent {
|
|
label "SoH-Linux-Builders"
|
|
}
|
|
steps {
|
|
checkout([
|
|
$class: 'GitSCM',
|
|
branches: scm.branches,
|
|
doGenerateSubmoduleConfigurations: scm.doGenerateSubmoduleConfigurations,
|
|
extensions: scm.extensions,
|
|
userRemoteConfigs: scm.userRemoteConfigs
|
|
])
|
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
|
sh '''
|
|
|
|
cp ../../ZELOOTD.z64 OTRExporter/baserom_non_mq.z64
|
|
docker build . -t soh
|
|
docker run --name sohcont -dit --rm -v $(pwd):/soh soh /bin/bash
|
|
cp ../../buildsoh.bash soh
|
|
docker exec sohcont soh/buildsoh.bash
|
|
|
|
mkdir build
|
|
mv soh/soh.elf build/
|
|
mv OTRGui/build/OTRGui build/
|
|
mv OTRGui/build/assets build/
|
|
mv ZAPDTR/ZAPD.out build/assets/extractor/
|
|
mv README.md readme.txt
|
|
|
|
docker exec sohcont appimage/appimage.sh
|
|
|
|
7z a soh-linux.7z SOH-Linux.AppImage readme.txt
|
|
|
|
'''
|
|
}
|
|
sh 'sudo docker container stop sohcont'
|
|
archiveArtifacts artifacts: 'soh-linux.7z', followSymlinks: false, onlyIfSuccessful: true
|
|
}
|
|
post {
|
|
always {
|
|
step([$class: 'WsCleanup']) // Clean workspace
|
|
}
|
|
}
|
|
}
|
|
stage ('Build macOS') {
|
|
agent {
|
|
label "SoH-Mac-Builders"
|
|
}
|
|
steps {
|
|
checkout([
|
|
$class: 'GitSCM',
|
|
branches: scm.branches,
|
|
doGenerateSubmoduleConfigurations: scm.doGenerateSubmoduleConfigurations,
|
|
extensions: scm.extensions,
|
|
userRemoteConfigs: scm.userRemoteConfigs
|
|
])
|
|
catchError(buildResult: 'FAILURE', stageResult: 'FAILURE') {
|
|
sh '''
|
|
cp ../../ZELOOTD.z64 OTRExporter/baserom_non_mq.z64
|
|
cd soh
|
|
export CC="clang -arch arm64 -arch x86_64"; export CXX="clang++ -arch arm64 -arch x86_64"; make setup -j4 OPTFLAGS=-O2 DEBUG=0 LD="ld"
|
|
export CC="clang -arch arm64 -arch x86_64"; export CXX="clang++ -arch arm64 -arch x86_64"; make -j4 DEBUG=0 OPTFLAGS=-O2 LD="ld"
|
|
make -j4 appbundle
|
|
mv ../README.md readme.txt
|
|
7z a soh-mac.7z soh.app readme.txt
|
|
'''
|
|
}
|
|
archiveArtifacts artifacts: 'soh/soh-mac.7z', followSymlinks: false, onlyIfSuccessful: true
|
|
}
|
|
post {
|
|
always {
|
|
step([$class: 'WsCleanup']) // Clean workspace
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|