diff --git a/.github/workflows/appimage_latest.yml b/.github/workflows/appimage_latest.yml new file mode 100644 index 000000000..45c68837e --- /dev/null +++ b/.github/workflows/appimage_latest.yml @@ -0,0 +1,93 @@ +name: Create AppImage latest + +on: workflow_dispatch +#on: push + +env: + BUILD_TYPE: Release + +jobs: + build: + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v2 + + - name: Install Deps + run: | + sudo add-apt-repository ppa:beineri/opt-qt-5.14.2-bionic + sudo apt-get update + sudo apt-get install libsndfile1-dev libsamplerate0-dev libjack-jackd2-dev ladspa-sdk liblo-dev dssi-dev \ + lv2-dev libsamplerate0-dev libsndfile1-dev libfluidsynth-dev libgtkmm-2.4-dev librtaudio-dev \ + libinstpatch-dev liblilv-dev liblrdf0-dev liblash-compat-dev librubberband-dev python3-dev + # sudo apt-get install qt5-default qttools5-dev qttools5-dev-tools libqt5svg5-dev + sudo apt-get install mesa-common-dev libglu1-mesa-dev + sudo apt-get install qt514base qt514tools qt514svg + + - name: Check Qt Installation + run: | + #cat /opt/qt513/bin/qt514-env.sh + QT_BASE_DIR=/opt/qt514 + export QTDIR=$QT_BASE_DIR + export PATH=$QT_BASE_DIR/bin:$PATH + export LD_LIBRARY_PATH=$QT_BASE_DIR/lib/x86_64-linux-gnu:$QT_BASE_DIR/lib:$LD_LIBRARY_PATH + export PKG_CONFIG_PATH=$QT_BASE_DIR/lib/pkgconfig:$PKG_CONFIG_PATH + + echo "$PATH" >> $GITHUB_PATH + echo "QT_BASE_DIR=$QT_BASE_DIR" >> $GITHUB_ENV + echo "QTDIR=$QT_BASE_DIR" >> $GITHUB_ENV + echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV + echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV + + - name: Create Build Environment + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Configure CMake + working-directory: ${{runner.workspace}}/build + run: | + REPO_PATH=$GITHUB_WORKSPACE/muse3 + cmake $REPO_PATH -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=/usr #-DMODULES_BUILD_STATIC:BOOL=ON + - name: Build + working-directory: ${{runner.workspace}}/build + run: cmake --build . --config $BUILD_TYPE -j3 + + - name: Create AppImage + working-directory: ${{runner.workspace}}/build + run: | + make DESTDIR=appdir install ; find appdir/ + + find appdir \( -name "moc_*" -or -name "*.o" -or -name "qrc_*" -or -name "Makefile*" -or -name "*.a" \) -exec rm {} \; + wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage + wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage + wget https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage + chmod +x linuxdeploy*.AppImage + + # wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" + # chmod a+x linuxdeployqt-continuous-x86_64.AppImage + + LIB_MODULES=${{runner.workspace}}/build/appdir/usr/lib/muse-3.1/modules + LIB_PLUGINS=${{runner.workspace}}/build/appdir/usr/lib/muse-3.1/plugins + LIB_SYNTHI=${{runner.workspace}}/build/appdir/usr/lib/muse-3.1/synthi + LIB_CONV=${{runner.workspace}}/build/appdir/usr/lib/muse-3.1/converters + export LD_LIBRARY_PATH=$LIB_MODULES:$LIB_PLUGINS:$LIB_SYNTHI:$LIB_CONV:$LD_LIBRARY_PATH + # ./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -appimage -bundle-non-qt-libs -verbose=2 + #./linuxdeploy-x86_64.AppImage --appdir appdir --plugin qt --output appimage + ./linuxdeploy-x86_64.AppImage --appdir appdir --plugin qt + + echo '#! /usr/bin/env bash' > appdir/AppRun + echo 'set -e' >> appdir/AppRun + echo 'this_dir=$(readlink -f $(dirname "$0"))' >> appdir/AppRun + echo 'export LD_LIBRARY_PATH="$this_dir"/usr/lib:$LD_LIBRARY_PATH' >> appdir/AppRun + echo 'exec "$this_dir"/AppRun.wrapped "$@"' >> appdir/AppRun + + export VERSION=master #linuxdeployqt uses this for naming the file + ./linuxdeploy-plugin-appimage-x86_64.AppImage --appdir appdir + + - name: Upload AppImage + uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "latest" + prerelease: true + title: "Current master (experimental)" + files: ${{runner.workspace}}/build/MusE*.AppImage