Skip to content

Commit

Permalink
Merge pull request #24 from antony-jr/mk2
Browse files Browse the repository at this point in the history
AppImage Updater v2.0.0
  • Loading branch information
antony-jr authored Apr 1, 2021
2 parents 900ea84 + a6daaf9 commit b22a5c5
Show file tree
Hide file tree
Showing 123 changed files with 4,859 additions and 3,071 deletions.
320 changes: 320 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,320 @@
name: Deploy

on:
push:
branches:
- master

jobs:
Check:
runs-on: ubuntu-16.04
outputs:
deploy: ${{ steps.check.outputs.check }}
steps:
- uses: actions/checkout@v2
- uses: lukka/get-cmake@latest

- name: Install Python3
run: |
sudo apt install -y python3
- id: check
name: Check Commit Message
run: |
git clone https://github.com/antony-jr/AppImageUpdater
cd AppImageUpdater
git tag > /tmp/tags.txt
cd ..
rm -rf AppImageUpdater
cat /tmp/tags.txt
result=$(python3 scripts/check.py "$(git log -1 --pretty=%B)" "/tmp/tags.txt")
echo "::set-output name=check::$result"
BuildAndDeploy:
name: "Build And Deploy"
runs-on: ubuntu-16.04
needs: Check
steps:
- uses: actions/checkout@v2
- uses: lukka/get-cmake@latest

- name: Install Qt and other Dependencies
run: |
sudo add-apt-repository ppa:beineri/opt-qt-5.12.9-xenial -y
sudo apt-get update -qq
sudo apt-get -y install build-essential libgl1-mesa-dev xvfb qt512base \
qt512quickcontrols2 qt512quickcontrols qt512declarative \
automake libtool \
libcairo-dev libfuse-dev zsync desktop-file-utils \
ca-certificates autoconf libtool patch wget \
vim-common desktop-file-utils pkg-config \
libarchive-dev librsvg2-dev librsvg2-bin liblzma-dev
- name: Install OpenSSL
run: |
wget -q "https://www.openssl.org/source/openssl-1.1.1h.tar.gz"
tar -xf openssl-1.1.1h.tar.gz
cd openssl-1.1.1h
./config shared --prefix=/usr/ --openssldir=/usr/
make -j$(nproc) > /dev/null
sudo make install > /dev/null
cd ..
rm -rf openssl-1.1.1h
- name: Install Boost 1.75.0
run: |
wget -q "https://dl.bintray.com/boostorg/release/1.75.0/source/boost_1_75_0.tar.gz"
tar -xf boost_1_75_0.tar.gz
cd boost_1_75_0
./bootstrap.sh
sudo cp b2 /usr/bin/
echo "using gcc ;" > ~/user-config.jam
export BOOST_ROOT=$PWD
export BOOST_BUILD_PATH=$PWD/tools/build
sudo BOOST_ROOT=$PWD BOOST_BUILD_PATH=$PWD/tools/build b2 cxxflags="-std=c++14" variant=release link=static install -j$(nproc) --with-system --with-chrono --with-random > /dev/null
cd ..
sudo rm -rf boost_1_75_0
- name: Install Torrent Rasterbar
run: |
wget -q "https://github.com/arvidn/libtorrent/releases/download/libtorrent-1.2.8/libtorrent-rasterbar-1.2.8.tar.gz"
tar -xvf libtorrent-rasterbar-1.2.8.tar.gz
cd libtorrent-rasterbar-1.2.8
cmake .
make -j$(nproc)
sudo make install -j$(nproc)
# sudo ln -s /usr/local/lib/libtorrent-rasterbar.so.1.2.8 /usr/lib/libtorrent-rasterbar.so.10
cd ..
rm -rf libtorrent-rasterbar-1.2.8
- name: Install QAppImageUpdate
run: |
source /opt/qt*/bin/qt*-env.sh || true
git clone https://github.com/antony-jr/QAppImageUpdate
cd QAppImageUpdate
git checkout v2.0.2
source /opt/qt*/bin/qt*-env.sh || true
cmake -DDECENTRALIZED_UPDATE_ENABLED=ON .
make -j$(nproc)
sudo make install
cd ..
rm -rf QAppImageUpdate
- name: Install libappimage
run: |
git clone https://github.com/AppImage/libappimage --recursive
cd libappimage
git checkout 176f8885690eee830a226ee350e023c6e5e8f9d7
cmake . -DBUILD_TESTING:bool=False
make -j$(nproc)
sudo make install
cd ..
rm -rf libappimage
- name: Build AppImage Updater
id: appimage_build
run: |
git submodule init
git submodule update # Download all required submodules.
export VERSION=$(git rev-parse --short HEAD)
source /opt/qt*/bin/qt*-env.sh || true
cmake -DAPPIMAGE_UPDATER_VERSION=2.0.0 \
-DAPPIMAGE_UPDATER_COMMIT=$(git rev-parse --short HEAD) \
-DAPPIMAGE_UPDATER_BUILD_TIME="$(date +'%A, %B %d %Y %T')" \
-DAPPIMAGE_UPDATER_BUILD_NO=$GITHUB_RUN_NUMBER .
make -j$(nproc)
cd cli
cmake -DAPPIMAGE_UPDATER_VERSION=2.0.0 \
-DAPPIMAGE_UPDATER_COMMIT=$(git rev-parse --short HEAD) \
-DAPPIMAGE_UPDATER_BUILD_TIME="$(date +'%A, %B %d %Y %T')" \
-DAPPIMAGE_UPDATER_BUILD_NO=$GITHUB_RUN_NUMBER .
make -j$(nproc)
cp appimageupdater ..
cd ..
mkdir -p appdir/usr/lib
mkdir -p appdir/usr/bin ;
cp -r appdir appdir-cli
strip AppImageUpdater ; cp AppImageUpdater appdir/usr/bin/
strip appimageupdater ; cp appimageupdater appdir-cli/usr/bin
mkdir -p appdir/usr/share/applications ;
mkdir -p appdir-cli/usr/share/applications;
cp build_resources/AppImageUpdater.desktop appdir/usr/share/applications/
cp build_resources/appimageupdater.desktop appdir-cli/usr/share/applications/
mkdir -p appdir/usr/share/icons/hicolor/256x256/apps/ ;
mkdir -p appdir-cli/usr/share/icons/hicolor/256x256/apps/ ;
cp build_resources/AppImageUpdater.png appdir/usr/share/icons/hicolor/256x256/apps/AppImageUpdater.png
cp build_resources/AppImageUpdater.png appdir-cli/usr/share/icons/hicolor/256x256/apps/AppImageUpdater.png
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
export VERSION=$(git rev-parse --short HEAD)
./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -qmldir=$(qmake -query QT_INSTALL_QML) -bundle-non-qt-libs
./linuxdeployqt-continuous-x86_64.AppImage appdir-cli/usr/share/applications/*.desktop -bundle-non-qt-libs
# Copy QtQuickShapes stuff.
cp -r $(qmake -query QT_INSTALL_QML)/QtQuick/Shapes appdir/usr/qml/QtQuick
cp -r $(qmake -query QT_HOST_LIBS)/libQt5QuickShapes.so* appdir/usr/lib/
wget -c -nv "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod +x appimagetool-x86_64.AppImage
deploy=${{ needs.Check.outputs.deploy }}
if [ "$deploy" = "false" ]
then
export tag="development"
else
export tag="latest"
fi
./appimagetool-x86_64.AppImage -u "gh-releases-zsync|antony-jr|AppImageUpdater|$tag|AppImageUpdater*-x86_64.AppImage.zsync" appdir
./appimagetool-x86_64.AppImage -u "gh-releases-zsync|antony-jr|AppImageUpdater|$tag|appimageupdatercli*-x86_64.AppImage.zsync" appdir-cli
wget -q "https://github.com/antony-jr/MakeAppImageTorrent/releases/download/Mk-2/MakeAppImageTorrent-609383f-x86_64.AppImage"
chmod +x MakeAppImageTorrent-609383f-x86_64.AppImage
mv AppImage_Updater-$VERSION-x86_64.AppImage AppImageUpdater-$VERSION-x86_64.AppImage
rm -rf AppImage_Updater-$VERSION-x86_64.AppImage.zsync
zsyncmake AppImageUpdater-$VERSION-x86_64.AppImage
./MakeAppImageTorrent-609383f-x86_64.AppImage AppImageUpdater-*-x86_64.AppImage
./MakeAppImageTorrent-609383f-x86_64.AppImage appimageupdatercli-*-x86_64.AppImage
echo ::set-output name=appimagefile::AppImageUpdater-$VERSION-x86_64.AppImage
echo ::set-output name=appimagefilecli::appimageupdatercli-$VERSION-x86_64.AppImage
echo ::set-output name=zsyncfile::AppImageUpdater-$VERSION-x86_64.AppImage.zsync
echo ::set-output name=zsyncfilecli::appimageupdatercli-$VERSION-x86_64.AppImage.zsync
echo ::set-output name=torrentfile::AppImageUpdater-$VERSION-x86_64.AppImage.torrent
echo ::set-output name=torrentfilecli::appimageupdatercli-$VERSION-x86_64.AppImage.torrent
# Remove development appimages.
rm -rf MakeAppImageTorrent*
rm -rf appimagetool*
rm -rf linuxdeployqt*
ls
- name: Delete Old Development GUI Builds
if: needs.Check.outputs.deploy == 'false'
uses: mknejp/delete-release-assets@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: development
assets: AppImageUpdater-*-x86_64.AppImage*
fail-if-no-assets: false
fail-if-no-release: false

- name: Delete Old Development CLI Builds
if: needs.Check.outputs.deploy == 'false'
uses: mknejp/delete-release-assets@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: development
assets: appimageupdatercli-*-x86_64.AppImage*
fail-if-no-assets: false
fail-if-no-release: false

- name: Upload Development GUI Build
if: needs.Check.outputs.deploy == 'false'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./AppImageUpdater-*-x86_64.AppImage*
tag: development
overwrite: true
file_glob: true
prerelease: true
release_name: "AppImage Updater Development Builds"
body: "The latest and greatest of AppImage Updater!"

- name: Upload Development CLI Build
if: needs.Check.outputs.deploy == 'false'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./appimageupdatercli-*-x86_64.AppImage*
tag: development
overwrite: true
file_glob: true
prerelease: true
release_name: "AppImage Updater Development Builds"
body: "The latest and greatest of AppImage Updater!"

- name: Create Release
if: needs.Check.outputs.deploy != 'false'
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.Check.outputs.deploy }}
release_name: Release ${{ needs.Check.outputs.deploy }}
body_path: ./release_notes/${{ needs.Check.outputs.deploy }}.md
draft: false
prerelease: false

- name: Upload AppImage Release Asset
if: needs.Check.outputs.deploy != 'false'
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{steps.appimage_build.outputs.appimagefile}}
asset_name: ${{steps.appimage_build.outputs.appimagefile}}
asset_content_type: application/octet-stream

- name: Upload AppImage CLI Release Asset
if: needs.Check.outputs.deploy != 'false'
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{steps.appimage_build.outputs.appimagefilecli}}
asset_name: ${{steps.appimage_build.outputs.appimagefilecli}}
asset_content_type: application/octet-stream

- name: Upload AppImage Zsync File Release Asset
if: needs.Check.outputs.deploy != 'false'
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{steps.appimage_build.outputs.zsyncfile}}
asset_name: ${{steps.appimage_build.outputs.zsyncfile}}
asset_content_type: application/octet-stream


- name: Upload AppImage Zsync File CLI Release Asset
if: needs.Check.outputs.deploy != 'false'
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{steps.appimage_build.outputs.zsyncfilecli}}
asset_name: ${{steps.appimage_build.outputs.zsyncfilecli}}
asset_content_type: application/octet-stream

- name: Upload AppImage Torrent File Release Asset
if: needs.Check.outputs.deploy != 'false'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{steps.appimage_build.outputs.torrentfile}}
asset_name: ${{steps.appimage_build.outputs.torrentfile}}
asset_content_type: application/octet-stream

- name: Upload AppImage Torrent File CLI Release Asset
if: needs.Check.outputs.deploy != 'false'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{steps.appimage_build.outputs.torrentfilecli}}
asset_name: ${{steps.appimage_build.outputs.torrentfilecli}}
asset_content_type: application/octet-stream
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "AppImageUpdaterBridge"]
path = AppImageUpdaterBridge
url = https://github.com/antony-jr/AppImageUpdaterBridge
Binary file modified .img/poster.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 0 additions & 52 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit b22a5c5

Please sign in to comment.