mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Change the builds on push (i.e. pull request merges) to build release versions. This seems to be the correct way to build these, as they are now distributed as the official builds on https://subsurface-divelog.org/. For users wanting to help with debugging, build artifacts on pull requests are available, and these are debug builds. Also adding the option to manually trigger builds, so if needed debug builds can be run on `master`. Signed-off-by: Michael Keller <github@ike.ch>
44 lines
1.5 KiB
Bash
Executable file
44 lines
1.5 KiB
Bash
Executable file
#!/bin/bash
|
|
# this gets executed inside the container when building a Windows
|
|
# installer as GitHub Action
|
|
#
|
|
# working directory is assumed to be the directory including all the
|
|
# source directories (subsurface, googlemaps, grantlee, etc)
|
|
# in order to be compatible with the assumed layout in the MXE script, we
|
|
# need to create the secondary build directory
|
|
|
|
set -x
|
|
set -e
|
|
|
|
mkdir -p win32
|
|
cd win32
|
|
|
|
BUILD_EXTRA_ARGS="debug"
|
|
SMTK2SSRF_EXTRA_ARGS="-b debug"
|
|
if [[ "$1" == "-release" ]]; then
|
|
BUILD_EXTRA_ARGS=""
|
|
SMTK2SSRF_BUILD_EXTRA_ARGS="-b release"
|
|
shift
|
|
fi
|
|
|
|
# build Subsurface
|
|
export MXEBUILDTYPE=x86_64-w64-mingw32.shared
|
|
bash -ex ../subsurface/packaging/windows/mxe-based-build.sh ${BUILD_EXTRA_ARGS} installer
|
|
|
|
# the strange two step move is in order to get predictable names to use
|
|
# in the publish step of the GitHub Action
|
|
mv subsurface/subsurface.exe* ${OUTPUT_DIR}/
|
|
fullname=$(cd subsurface ; ls subsurface-*.exe)
|
|
mv subsurface/"$fullname" ${OUTPUT_DIR}/"${fullname%.exe}-installer.exe"
|
|
|
|
# build Subsurface for smtk2ssrf
|
|
|
|
bash -ex ../subsurface/packaging/windows/mxe-based-build.sh -noftdi -nolibraw subsurface
|
|
|
|
bash -ex ../subsurface/packaging/windows/smtk2ssrf-mxe-build.sh ${SMTK2SSRF_BUILD_EXTRA_ARGS} -a -i
|
|
|
|
# the strange two step move is in order to get predictable names to use
|
|
# in the publish step of the GitHub Action
|
|
mv smtk-import/smtk2ssrf.exe ${OUTPUT_DIR}/
|
|
fullname=$(cd smtk-import ; ls smtk2ssrf*.exe)
|
|
mv smtk-import/smtk2ssrf*.exe ${OUTPUT_DIR}/"${fullname%.exe}-installer.exe"
|