-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add AppImageBuilder #80
Open
lulol
wants to merge
17
commits into
ygrek:master
Choose a base branch
from
lulol:lulol-appimagebuilder
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 6 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
fd0f97c
Add AppImageBuilder
lulol 3b8c99b
Copy ocamlformat.opam
lulol 19d7934
Move AppImageBuilder.yml to the packages dir
lulol e8cc362
Move AppImageBuilder.yml to packages dir
lulol 79b9e54
Add workflow to manually build an mlnet+gui appimage
lulol 81d5f0f
Delete ocamlformat.opam
lulol 32787ea
Add ocaml ocaml-findlib and liblablgtk2-ocaml-dev
lulol c4a0308
remove pipe to true
lulol 172398f
Merge branch 'ygrek:master' into lulol-appimagebuilder
lulol 4fe024f
Update versions and add requested changes
lulol 55986c9
Update build system version, add requested changes
lulol 2a8ec5e
Add version labels to generated artifacts
lulol 85c0444
Build appimage only for x86_64
lulol 493acca
Merge branch 'ygrek:master' into lulol-appimagebuilder
lulol 75606ef
Add static hash check for downloaded appimage-builder
lulol 1e6d34e
Add HEAD commit hash to version
lulol 51702ed
Merge branch 'ygrek:master' into lulol-appimagebuilder
lulol File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Manually triggered build of mlnet, mlgui and utils binaries and appimage with mlnet+gui | ||
|
||
name: Build AppImage | ||
|
||
on: | ||
workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install dependencies | ||
run: sudo apt-get install -y --no-install-recommends camlp4 libnum-ocaml-dev libminiupnpc-dev libnatpmp-dev libbz2-dev librsvg2-dev libmagic-dev libgtk2.0-dev liblablgtk2-ocaml-dev liblablgtk2-gl-ocaml-dev liblablgtk2-gnome-ocaml-dev libgd-dev | ||
|
||
- name: Configure options | ||
run: ./configure --enable-batch --enable-upnp-natpmp --disable-directconnect --disable-fasttrack --disable-gnutella --disable-gnutella2 --enable-gui=newgui2 | ||
|
||
- name: Build binaries | ||
run: make | ||
|
||
- name: Build utils | ||
run: make utils | ||
|
||
- name: Upload mlnet binary | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: mlnet | ||
path: mlnet | ||
|
||
- name: Upload binaries + utils | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Binaries | ||
path: | | ||
mlnet | ||
mlgui | ||
bt_dht_node | ||
copysources | ||
get_range | ||
make_torrent | ||
mld_hash | ||
subconv | ||
svg_converter | ||
if-no-files-found: warn | ||
|
||
- name: Upload mlnet+gui binary | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: mlnet+gui | ||
path: mlnet+gui | ||
if-no-files-found: warn | ||
|
||
# appimage: | ||
# needs: build | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/download-artifact@v3 | ||
# with: | ||
# name: mlnet+gui | ||
|
||
- name: Download AppImageBuilder | ||
run: wget https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.0.3/appimage-builder-1.0.3-x86_64.AppImage && chmod +x appimage-builder-1.0.3-x86_64.AppImage | ||
lulol marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- name: Link recipe since env SOURCE_DIR=. doesn't work | ||
run: ln -s packages/appimage/AppImageBuilder.yml AppImageBuilder.yml | ||
|
||
- name: Build AppImage | ||
run: ./appimage-builder-1.0.3-x86_64.AppImage --skip-tests | ||
|
||
- name: Upload AppImage | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: mldonkey_AppImage | ||
path: mldonkey-*.AppImage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
# appimage-builder recipe see https://appimage-builder.readthedocs.io for details | ||
version: 1 | ||
|
||
script: | ||
# Download, configure and make | ||
# - git clone https://github.com/ygrek/mldonkey.git | ||
# - cd mldonkey | ||
# - ./configure --enable-batch --enable-upnp-natpmp --disable-directconnect --disable-fasttrack --disable-gnutella --disable-gnutella2 --enable-gui=newgui2 --> | ||
# - make | ||
# Remove any previous build | ||
- rm -rf AppDir | true | ||
lulol marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# Get application version | ||
# - ./mlnet+gui -v 2>&1 | sed -ne "s#^.*Starting MLDonkey \([^ ]\+\) .*#APP_VERSION=\1#p" >> $BUILDER_ENV | ||
# - cat "$BUILDER_ENV" | ||
# - APP_VERSION=$("$SOURCE_DIR"/mlnet+gui -v 2>&1 | sed -ne "s#^.*Starting MLDonkey \([^ ]\+\) .*#\1#p") | ||
# - echo "$APP_VERSION" | ||
# Make some needed dirs | ||
- mkdir -p "$TARGET_APPDIR"/usr/bin | ||
- mkdir -p "$TARGET_APPDIR"/usr/share/icons/default | ||
- mkdir -p "$TARGET_APPDIR"/usr/share/applications | ||
# Copy the application data into the AppDir | ||
- cp "$SOURCE_DIR"/mlnet+gui "$TARGET_APPDIR"/usr/bin/ | ||
- cp "$SOURCE_DIR"/distrib/mldonkey.desktop "$TARGET_APPDIR"/usr/share/applications | ||
- cp "$SOURCE_DIR"/icons/rsvg/type_source_normal.svg "$TARGET_APPDIR"/usr/share/icons/default/mldonkey.svg | ||
# Relocatable by bruteforce patching | ||
lulol marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- sed -i -e 's#/usr#././#g' "$TARGET_APPDIR"/usr/bin/mlnet+gui | ||
# Create symlink | ||
- ln -s ./usr/bin/mlnet+gui "$TARGET_APPDIR"/mldonkey_gui | ||
|
||
AppDir: | ||
path: ./AppDir | ||
app_info: | ||
id: mldonkey | ||
name: mldonkey | ||
icon: mldonkey | ||
# version: {{APP_VERSION}} | ||
# version: ${APP_VERSION} | ||
# version: $APP_VERSION | ||
version: 3.1.7.git | ||
lulol marked this conversation as resolved.
Show resolved
Hide resolved
|
||
exec: mldonkey_gui | ||
exec_args: $@ | ||
apt: | ||
arch: | ||
- amd64 | ||
# allow_unauthenticated: true | ||
sources: | ||
- sourceline: 'deb http://archive.ubuntu.com/ubuntu focal main restricted universe multiverse' | ||
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32' | ||
- sourceline: 'deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse' | ||
- sourceline: 'deb http://archive.ubuntu.com/ubuntu focal-backports main restricted universe multiverse' | ||
- sourceline: 'deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse' | ||
- sourceline: 'deb http://archive.canonical.com/ubuntu/ focal partner' | ||
include: | ||
- ca-certificates | ||
- libc6 | ||
- bzip2 | ||
- librsvg2-2 | ||
- libmagic1 | ||
- libmagic-mgc | ||
- libminiupnpc17 | ||
- libnatpmp1 | ||
- libgtk2.0-0 | ||
- libatk-adaptor | ||
- libgail-common | ||
- libgd3 | ||
- perl-base | ||
- dash | ||
- make | ||
files: | ||
include: | ||
- lib64/ld-linux-x86-64.so.2 | ||
- /usr/lib/file/libmagic-mgc | ||
exclude: | ||
- usr/share/man | ||
- usr/share/doc/*/ANNOUNCE* | ||
- usr/share/doc/*/AUTHORS* | ||
- usr/share/doc/*/FAQ* | ||
- usr/share/doc/*/HOWTO* | ||
- usr/share/doc/*/NEWS* | ||
- usr/share/doc/*/README* | ||
- usr/share/doc/*/THANKS* | ||
- usr/share/doc/*/TODO* | ||
- usr/share/doc/*/changelog* | ||
- usr/share/doc/*/copyright* | ||
- usr/share/doc/*/examples/* | ||
test: | ||
fedora-30: | ||
image: appimagecrafters/tests-env:fedora-30 | ||
command: ./AppRun | ||
debian-stable: | ||
image: appimagecrafters/tests-env:debian-stable | ||
command: ./AppRun | ||
archlinux-latest: | ||
image: appimagecrafters/tests-env:archlinux-latest | ||
command: ./AppRun | ||
centos-7: | ||
image: appimagecrafters/tests-env:centos-7 | ||
command: ./AppRun | ||
ubuntu-xenial: | ||
image: appimagecrafters/tests-env:ubuntu-xenial | ||
command: ./AppRun | ||
AppImage: | ||
arch: x86_64 | ||
update-information: None | ||
# sign-key: None | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think ideally this build part of pipeline should be move to main pipeline, and then here keep only appimage (and use artifacts produced by main build pipeline)