From 65ab59503acd100a84eeb6402c29dcd06593480d Mon Sep 17 00:00:00 2001 From: Maximilian Federle Date: Sat, 8 Feb 2020 15:42:01 +0100 Subject: [PATCH] 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. --- .travis.yml | 16 ++++++++++------ .travis/build-snap.sh | 15 ++------------- .travis/launchpad-credentials.enc | Bin 224 -> 0 bytes 3 files changed, 12 insertions(+), 19 deletions(-) delete mode 100644 .travis/launchpad-credentials.enc diff --git a/.travis.yml b/.travis.yml index 9e3fa792..0d215176 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,14 +25,16 @@ jobs: on: repo: solvespace/solvespace tags: true - - stage: deploy - name: "Snap" + - &deploy-snap + stage: deploy + name: Snap amd64 os: linux + arch: amd64 dist: bionic addons: - snaps: - - name: snapcraft - confinement: classic + snaps: + - name: snapcraft + confinement: classic script: ./.travis/build-snap.sh deploy: - provider: script @@ -47,4 +49,6 @@ jobs: on: branch: master tags: true - + - <<: *deploy-snap + name: Snap arm64 + arch: arm64 diff --git a/.travis/build-snap.sh b/.travis/build-snap.sh index d824b383..634e01c4 100755 --- a/.travis/build-snap.sh +++ b/.travis/build-snap.sh @@ -1,15 +1,4 @@ #!/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 +sudo apt-get update +sudo ./pkg/snap/build.sh --destructive-mode diff --git a/.travis/launchpad-credentials.enc b/.travis/launchpad-credentials.enc deleted file mode 100644 index 5eba3cca8d33bb4a74b3ba3e16e2ba9386aed6af..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 224 zcmV<603ZKgph6-3zoy0tXgIY!>i6M+dUZj*-`(E?wsYF>r!Bz8^PiU?4`vw|Q}>Z;pZ8$`R6EG`(BcE13d zh~XeM$}hlxwwL6)TL{i;WIzkkOi?;2=>tTznXKORAsBjGLMdj$%@Q+W413Zvex?me zZB6|=cmIC>y%bkY2?aB?;W7Ia&uE#hM1y^ST?Es&E!tbbfi?|+K>b$RcBNIOnt