From 56e73b133586c9204ebe8710770766f5f436be3c Mon Sep 17 00:00:00 2001 From: alemuntoni Date: Sun, 28 Mar 2021 11:44:10 +0200 Subject: [PATCH] setup for nightly build on linux --- .github/workflows/Linux.yml | 6 ++---- scripts/Linux/1_build.sh | 7 ++++++- scripts/Linux/3_appimage.sh | 8 +++++++- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/Linux.yml b/.github/workflows/Linux.yml index 3f225286f..9998bca9a 100644 --- a/.github/workflows/Linux.yml +++ b/.github/workflows/Linux.yml @@ -27,15 +27,13 @@ jobs: shell: bash run: | if [ "${{matrix.precision}}" == "double_precision" ]; then - echo ::set-output name=version::"$(cat ML_VERSION)d" echo ::set-output name=artifact_suffix::"_double" else - echo ::set-output name=version::"$(cat ML_VERSION)" echo ::set-output name=artifact_suffix::"" fi - name: Configure and Build run: | - sh scripts/${{ runner.os }}/1_build.sh --${{ matrix.precision }} + sh scripts/${{ runner.os }}/1_build.sh --${{ matrix.precision }} --nightly - name: Deploy run: | sh scripts/${{ runner.os }}/2_deploy.sh @@ -61,7 +59,7 @@ jobs: uses: actions/upload-artifact@v1 with: name: meshlab_linux_appimage${{steps.envs.outputs.artifact_suffix}} - path: src/MeshLab${{steps.envs.outputs.version}}-linux.AppImage + path: src/MeshLab*.AppImage #- name: Upload MeshLab deb # uses: actions/upload-artifact@v2 # with: diff --git a/scripts/Linux/1_build.sh b/scripts/Linux/1_build.sh index 3c3e685f2..fcd3c53bc 100644 --- a/scripts/Linux/1_build.sh +++ b/scripts/Linux/1_build.sh @@ -18,6 +18,7 @@ BUILD_PATH=$SOURCE_PATH/build INSTALL_PATH=$SOURCE_PATH/install/usr/ CORES="-j4" DOUBLE_PRECISION_OPTION="" +NIGHTLY_OPTION="" #check parameters for i in "$@" @@ -39,6 +40,10 @@ case $i in DOUBLE_PRECISION_OPTION="-DBUILD_WITH_DOUBLE_SCALAR=ON" shift # past argument=value ;; + --nightly) + NIGHTLY_OPTION="-DMESHLAB_IS_NIGHTLY_VERSION=ON" + shift # past argument=value + ;; *) # unknown option ;; @@ -61,6 +66,6 @@ BUILD_PATH=$(realpath $BUILD_PATH) INSTALL_PATH=$(realpath $INSTALL_PATH) cd $BUILD_PATH -cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH $DOUBLE_PRECISION_OPTION $SOURCE_PATH +cmake -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_INSTALL_PREFIX=$INSTALL_PATH $DOUBLE_PRECISION_OPTION $NIGHTLY_OPTION $SOURCE_PATH make $CORES make install diff --git a/scripts/Linux/3_appimage.sh b/scripts/Linux/3_appimage.sh index c4155f16e..00a5c68ad 100644 --- a/scripts/Linux/3_appimage.sh +++ b/scripts/Linux/3_appimage.sh @@ -11,7 +11,6 @@ SCRIPTS_PATH="$(dirname "$(realpath "$0")")" INSTALL_PATH=$SCRIPTS_PATH/../../src/install -ML_VERSION=$(cat $SCRIPTS_PATH/../../ML_VERSION) #checking for parameters @@ -34,6 +33,13 @@ done PARENT_NAME="$(dirname $INSTALL_PATH)" +#get version +IFS=' ' #space delimiter +STR_VERSION=$($INSTALL_PATH/usr/bin/meshlab --version) +read -a strarr <<< "$STR_VERSION" +ML_VERSION=${strarr[1]} #get the meshlab version from the string + + export VERSION=$ML_VERSION $SCRIPTS_PATH/resources/appimagetool $INSTALL_PATH