Skip to content

Commit 65ab595

Browse files
ppdwhitequark
authored andcommittedFeb 8, 2020
snap: Build snaps on Travis without remote-build & drop i386 + armhf
Snapcraft's remote-build does not fit the requirements of CI, so replace it with builds running directly on Travis: 1. Builds on Travis can run independently, whereas remote-build competes for the same resource (Launchpad) and will potentially block if multiple commits require building in succession. 2. Snapcrafts CLI for remote-build is not designed to be easily scriptable. 3. Travis recently introduced building on arm64, so builds for arm64 are now very fast and don't require emulation. We do not build for armhf and i386 any more because they are of little relevance on the desktop.
1 parent 3ed1719 commit 65ab595

File tree

3 files changed

+12
-19
lines changed

3 files changed

+12
-19
lines changed
 

‎.travis.yml

+10-6
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,16 @@ jobs:
2525
on:
2626
repo: solvespace/solvespace
2727
tags: true
28-
- stage: deploy
29-
name: "Snap"
28+
- &deploy-snap
29+
stage: deploy
30+
name: Snap amd64
3031
os: linux
32+
arch: amd64
3133
dist: bionic
3234
addons:
33-
snaps:
34-
- name: snapcraft
35-
confinement: classic
35+
snaps:
36+
- name: snapcraft
37+
confinement: classic
3638
script: ./.travis/build-snap.sh
3739
deploy:
3840
- provider: script
@@ -47,4 +49,6 @@ jobs:
4749
on:
4850
branch: master
4951
tags: true
50-
52+
- <<: *deploy-snap
53+
name: Snap arm64
54+
arch: arm64

‎.travis/build-snap.sh

+2-13
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
11
#!/bin/sh -xe
22

3-
lp_data_dir="$HOME/.local/share/snapcraft/provider/launchpad"
4-
lp_credentials="$lp_data_dir/credentials"
5-
6-
mkdir -p "$lp_data_dir"
7-
openssl aes-256-cbc -K $encrypted_c4bc81f026a2_key -iv $encrypted_c4bc81f026a2_iv \
8-
-in .travis/launchpad-credentials.enc \
9-
-out "$lp_credentials" -d
10-
chmod 600 "$lp_credentials"
11-
12-
./pkg/snap/build.sh remote-build \
13-
--launchpad-user solvespace \
14-
--launchpad-accept-public-upload \
15-
--build-on=amd64,arm64,armhf,i386
3+
sudo apt-get update
4+
sudo ./pkg/snap/build.sh --destructive-mode

‎.travis/launchpad-credentials.enc

-224 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)