mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +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
|
export CMAKE_PREFIX_PATH=$QT_ROOT/lib/cmake
|
||||||
DIR=$(pwd)
|
DIR=$(pwd)
|
||||||
|
|
||||||
# now build Subsurface with WebKit, using the generic build script
|
# 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
|
bash -e -x ./subsurface/scripts/build.sh -desktop -build-with-webkit -release -build-deps -ftdi -prep-only
|
||||||
|
|
||||||
echo "finished initial build of Subsurface"
|
echo "finished initial cmake setup of Subsurface - next build the package"
|
||||||
|
|
||||||
# make sure we have FTDI enabled for the package
|
|
||||||
cd subsurface/build
|
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"
|
echo "run the packaging script"
|
||||||
bash -e -x ../packaging/macos/make-package.sh
|
bash -e -x ../packaging/macosx/make-package.sh | tee mp.log 2>&1
|
||||||
IMG=$(grep ^created: ../trigger-daily.log | tail -1 | cut -b10-)
|
IMG=$(grep ^created: mp.log | tail -1 | cut -b10-)
|
||||||
echo "Created $IMG"
|
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
|
# call this script with -build-deps
|
||||||
BUILD_DEPS="1"
|
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)
|
-fat-build)
|
||||||
# build a fat binary for macOS
|
# build a fat binary for macOS
|
||||||
# ignored on other platforms
|
# ignored on other platforms
|
||||||
|
@ -151,7 +156,7 @@ while [[ $# -gt 0 ]] ; do
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown command line argument $arg"
|
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
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -645,6 +650,7 @@ for (( i=0 ; i < ${#BUILDS[@]} ; i++ )) ; do
|
||||||
rm -rf Subsurface-mobile.app
|
rm -rf Subsurface-mobile.app
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ ! "$PREP_ONLY" = "1" ] ; then
|
||||||
LIBRARY_PATH=$INSTALL_ROOT/lib make -j4
|
LIBRARY_PATH=$INSTALL_ROOT/lib make -j4
|
||||||
LIBRARY_PATH=$INSTALL_ROOT/lib make install
|
LIBRARY_PATH=$INSTALL_ROOT/lib make install
|
||||||
|
|
||||||
|
@ -658,4 +664,5 @@ for (( i=0 ; i < ${#BUILDS[@]} ; i++ )) ; do
|
||||||
cp ${SRC_DIR}/appdata/subsurface.appdata.xml appdir/usr/share/metainfo/
|
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/
|
cp ${SRC_DIR}/icons/subsurface-icon.png appdir/usr/share/icons/hicolor/256x256/apps/
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue