Skip to content

Commit

Permalink
snap: build snaps on Travis via remote-build.
Browse files Browse the repository at this point in the history
We invoke builds on Launchpad in stage "deploy" and release it into
the edge channel of the Snap Store.

The deploy stage is blocked on fails of the test stage, so we don't
release snaps with failing tests.
  • Loading branch information
ppd authored and whitequark committed Jan 21, 2020
1 parent 16c5fa6 commit d5351c4
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .travis.yml
Expand Up @@ -25,3 +25,28 @@ jobs:
on:
repo: solvespace/solvespace
tags: true
- stage: deploy
name: "Snap"
os: linux
dist: bionic
addons:
snaps:
- name: snapcraft
confinement: classic
script: ./.travis/build-snap.sh
deploy:
- provider: snap
skip_cleanup: true
snap: pkg/snap/*.snap
channel: edge
on:
branch: master
tags: false
- provider: snap
skip_cleanup: true
snap: pkg/snap/*.snap
channel: edge,beta
on:
branch: master
tags: true

15 changes: 15 additions & 0 deletions .travis/build-snap.sh
@@ -0,0 +1,15 @@
#!/bin/sh -xe

lp_data_dir="$HOME/.local/share/snapcraft/provider/launchpad"
lp_credentials="$lp_data_dir/credentials"

mkdir -p "$lp_data_dir"
openssl aes-256-cbc -K $encrypted_c4bc81f026a2_key -iv $encrypted_c4bc81f026a2_iv \
-in .travis/launchpad-credentials.enc \
-out "$lp_credentials" -d
chmod 600 "$lp_credentials"

./pkg/snap/build.sh remote-build \
--launchpad-user solvespace \
--launchpad-accept-public-upload \
--build-on=amd64,arm64,armhf,i386
Binary file added .travis/launchpad-credentials.enc
Binary file not shown.

0 comments on commit d5351c4

Please sign in to comment.