mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-27 20:58:47 +00:00
don't build the macOS version twice on GitHub
We need some additional options when building the package, so let that script handle the details and use the generic build script mainly for the dependencies. Also let's not mix building for testing and building the DMG - just so I can stay somewhat sane. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
3a98b8a722
commit
d2f2f22dc1
2 changed files with 24 additions and 38 deletions
31
.github/workflows/mac.yml
vendored
31
.github/workflows/mac.yml
vendored
|
@ -28,34 +28,13 @@ jobs:
|
|||
export CMAKE_PREFIX_PATH=$QT_ROOT/lib/cmake
|
||||
DIR=$(pwd)
|
||||
|
||||
# now build Subsurface with WebKit, using the generic build script
|
||||
bash -e -x ./subsurface/scripts/build.sh -desktop -build-with-webkit -release -build-deps -ftdi
|
||||
# now setup Subsurface with WebKit and build the dependencies, using the generic build script
|
||||
bash -e -x ./subsurface/scripts/build.sh -desktop -build-with-webkit -release -build-deps -ftdi -prep-only
|
||||
|
||||
echo "finished initial build of Subsurface"
|
||||
|
||||
# make sure we have FTDI enabled for the package
|
||||
echo "finished initial cmake setup of Subsurface - next build the package"
|
||||
cd subsurface/build
|
||||
FTDI=$(grep FTDISUPPORT:BOOL CMakeCache.txt | grep ON)
|
||||
if [ "$FTDI" != "FTDISUPPORT:BOOL=ON" ] ; then
|
||||
cmake -D FTDISUPPORT:BOOL=ON .
|
||||
fi
|
||||
echo "run the packaging script"
|
||||
bash -e -x ../packaging/macos/make-package.sh
|
||||
IMG=$(grep ^created: ../trigger-daily.log | tail -1 | cut -b10-)
|
||||
bash -e -x ../packaging/macosx/make-package.sh | tee mp.log 2>&1
|
||||
IMG=$(grep ^created: mp.log | tail -1 | cut -b10-)
|
||||
echo "Created $IMG"
|
||||
|
||||
- name: test desktop build
|
||||
run: |
|
||||
# build export-html to make sure that didn't get broken
|
||||
cd ${GITHUB_WORKSPACE}/build
|
||||
cmake -DMAKE_TESTS=ON
|
||||
make -j
|
||||
make -j export-html
|
||||
echo "------------------------------------"
|
||||
echo "run tests for desktop build"
|
||||
export QT_ROOT=${GITHUB_WORKSPACE}/Qt/5.13.0/clang_64
|
||||
export QT_QPA_PLATFORM_PLUGIN_PATH=$QT_ROOT/plugins
|
||||
cd tests
|
||||
# ./TestGitStorage -v2
|
||||
make check
|
||||
|
||||
|
|
|
@ -77,6 +77,11 @@ while [[ $# -gt 0 ]] ; do
|
|||
# call this script with -build-deps
|
||||
BUILD_DEPS="1"
|
||||
;;
|
||||
-prep-only)
|
||||
# use this script to build dependencies and set things up with default values, but don't actually run
|
||||
# the build
|
||||
PREP_ONLY="1"
|
||||
;;
|
||||
-fat-build)
|
||||
# build a fat binary for macOS
|
||||
# ignored on other platforms
|
||||
|
@ -151,7 +156,7 @@ while [[ $# -gt 0 ]] ; do
|
|||
;;
|
||||
*)
|
||||
echo "Unknown command line argument $arg"
|
||||
echo "Usage: build.sh [-no-bt] [-quick] [-build-deps] [-fat-build] [-src-dir <SUBSURFACE directory>] [-build-prefix <PREFIX>] [-build-with-webkit] [-build-with-map] [-mobile] [-desktop] [-downloader] [-both] [-all] [-ftdi] [-create-appdir] [-release]"
|
||||
echo "Usage: build.sh [-no-bt] [-quick] [-build-deps] [-prep-only] [-fat-build] [-src-dir <SUBSURFACE directory>] [-build-prefix <PREFIX>] [-build-with-webkit] [-build-with-map] [-mobile] [-desktop] [-downloader] [-both] [-all] [-ftdi] [-create-appdir] [-release]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
@ -645,17 +650,19 @@ for (( i=0 ; i < ${#BUILDS[@]} ; i++ )) ; do
|
|||
rm -rf Subsurface-mobile.app
|
||||
fi
|
||||
|
||||
LIBRARY_PATH=$INSTALL_ROOT/lib make -j4
|
||||
LIBRARY_PATH=$INSTALL_ROOT/lib make install
|
||||
if [ ! "$PREP_ONLY" = "1" ] ; then
|
||||
LIBRARY_PATH=$INSTALL_ROOT/lib make -j4
|
||||
LIBRARY_PATH=$INSTALL_ROOT/lib make install
|
||||
|
||||
if [ "$CREATE_APPDIR" = "1" ] ; then
|
||||
# if we create an AppImage this makes gives us a sane starting point
|
||||
cd "$SRC"
|
||||
mkdir -p ./appdir
|
||||
mkdir -p appdir/usr/share/metainfo
|
||||
mkdir -p appdir/usr/share/icons/hicolor/256x256/apps
|
||||
cp -r ./install-root/* ./appdir/usr
|
||||
cp ${SRC_DIR}/appdata/subsurface.appdata.xml appdir/usr/share/metainfo/
|
||||
cp ${SRC_DIR}/icons/subsurface-icon.png appdir/usr/share/icons/hicolor/256x256/apps/
|
||||
if [ "$CREATE_APPDIR" = "1" ] ; then
|
||||
# if we create an AppImage this makes gives us a sane starting point
|
||||
cd "$SRC"
|
||||
mkdir -p ./appdir
|
||||
mkdir -p appdir/usr/share/metainfo
|
||||
mkdir -p appdir/usr/share/icons/hicolor/256x256/apps
|
||||
cp -r ./install-root/* ./appdir/usr
|
||||
cp ${SRC_DIR}/appdata/subsurface.appdata.xml appdir/usr/share/metainfo/
|
||||
cp ${SRC_DIR}/icons/subsurface-icon.png appdir/usr/share/icons/hicolor/256x256/apps/
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue