Skip to content

Commit

Permalink
Merge pull request #6 from snapcrafters/core-migration
Browse files Browse the repository at this point in the history
Migrate core
  • Loading branch information
popey committed Nov 16, 2020
2 parents 11ed722 + 7dbfd2a commit 669af82
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 36 deletions.
34 changes: 20 additions & 14 deletions .travis.yml
@@ -1,27 +1,33 @@
language: bash
os: linux
sudo: enabled
dist: xenial

env:
global:
- LC_ALL: C.UTF-8
- LANG: C.UTF-8
- SNAPCRAFT_ENABLE_SILENT_REPORT: y
- SNAPCRAFT_ENABLE_DEVELOPER_DEBUG: y

addons:
snaps:
- name: snapcraft
channel: candidate
classic: true
- name: http
- name: transfer
- name: lxd
channel: stable

install:
script:
- sudo apt update
- sudo apt install -y snapd
- sudo snap install lxd --channel 3.0/stable
- sudo snap install snapcraft --candidate --classic
- sudo /snap/bin/lxd.migrate -yes
- sudo /snap/bin/lxd waitready
- sudo /snap/bin/lxd init --auto
- mkdir -p "$TRAVIS_BUILD_DIR/snaps-cache"
script:
- export PATH=/snap/bin:$PATH
- sudo snapcraft cleanbuild
- sudo cp *.snap "$(echo "$TRAVIS_REPO_SLUG" | sed -e 's|.*/\(.*\)|\1|')-pr$TRAVIS_PULL_REQUEST.snap"
- sudo snapcraft --use-lxd
after_success:
- sudo snap install transfer
- timeout 180 sudo /snap/bin/transfer "$(echo "$TRAVIS_REPO_SLUG" | sed -e 's|.*/\(.*\)|\1|')-pr$TRAVIS_PULL_REQUEST.snap"
- cp *.snap "$(echo "$TRAVIS_REPO_SLUG" | sed -e 's|.*/\(.*\)|\1|')-pr$TRAVIS_PULL_REQUEST.snap"
- timeout 180 /snap/bin/transfer "$(echo "$TRAVIS_REPO_SLUG" | sed -e 's|.*/\(.*\)|\1|')-pr$TRAVIS_PULL_REQUEST.snap"
after_failure:
- sudo journalctl -u snapd
- sudo snap install http
- /snap/bin/http https://api.snapcraft.io/v2/snaps/info/core architecture==amd64 Snap-Device-Series:16
- http https://api.snapcraft.io/v2/snaps/info/core architecture==amd64 Snap-Device-Series:16
61 changes: 39 additions & 22 deletions snap/snapcraft.yaml
Expand Up @@ -8,6 +8,7 @@ description: |
a catchy soundtrack and lots of throwing people around in pseudo-randomly
generated buildings.
adopt-info: mrrescue
base: core20

grade: stable
confinement: strict
Expand All @@ -18,13 +19,32 @@ architectures:
- build-on: armhf

parts:
love0.10.2:
plugin: dump
source:
- on amd64: https://bitbucket.org/rude/love/downloads/love_0.10.2ppa1_amd64.deb
- on i386: https://bitbucket.org/rude/love/downloads/love_0.10.2ppa1_i386.deb
- on armhf: https://bitbucket.org/rude/love/downloads/love_0.10.2ppa1_armhf.deb
# Suitable stage-packages for LOVE 0.9.x and 0.10.x
love:
source: https://github.com/love2d/love.git
source-tag: "0.10.2"
override-pull: |
snapcraftctl pull
sed -i -e 's/luaL_reg/luaL_Reg/g' src/libraries/luasocket/libluasocket/*
override-build: |
./platform/unix/automagic
snapcraftctl build
plugin: autotools
build-packages:
- build-essential
- autotools-dev
- automake
- libtool
- pkg-config
- libfreetype6-dev
- libluajit-5.1-dev
- libphysfs-dev
- libsdl2-dev
- libopenal-dev
- libogg-dev
- libvorbis-dev
- libmodplug-dev
- libmpg123-dev
- libtheora-dev
stage-packages:
- libdevil1c2
- libfreetype6
Expand All @@ -39,16 +59,6 @@ parts:
- libstdc++6
- libtheora0
- libvorbisfile3
- zlib1g

liblove0.10.2:
source:
- on amd64: https://bitbucket.org/rude/love/downloads/liblove0_0.10.2ppa1_amd64.deb
- on i386: https://bitbucket.org/rude/love/downloads/liblove0_0.10.2ppa1_i386.deb
- on armhf: https://bitbucket.org/rude/love/downloads/liblove0_0.10.2ppa1_armhf.deb
plugin: dump
after:
- love0.10.2

mrrescue:
plugin: nil
Expand All @@ -67,21 +77,28 @@ parts:
- jq
- sed
- wget
after:
- desktop-glib-only
- liblove0.10.2
desktop-glib-only:
build-packages:
- libglib2.0-dev
plugin: make
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
source-subdir: glib-only
stage-packages:
- libglib2.0-bin

apps:
mrrescue:
command: bin/desktop-launch $SNAP/usr/bin/love $SNAP/game.love
command-chain:
- bin/desktop-launch
command: usr/bin/love $SNAP/game.love
plugs:
- audio-playback
- desktop
- gsettings
- home
- joystick
- network
- opengl
- pulseaudio
- screen-inhibit-control
- wayland
- x11

0 comments on commit 669af82

Please sign in to comment.