Skip to content

Commit

Permalink
Only do snap in one build environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimver committed Oct 18, 2018
1 parent 3e8ca12 commit b5d5c4a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ env:
- CRATE_NAME=catsay
matrix:
include:
- env: TARGET=snap
- env: TARGET=aarch64-unknown-linux-gnu
- env: TARGET=i686-unknown-linux-gnu
- env: TARGET=x86_64-unknown-linux-gnu
Expand Down Expand Up @@ -41,6 +42,7 @@ deploy:
channel: stable
skip_cleanup: true
on:
condition: $TARGET = snap
tags: true
# - provider: launchpad
# slug: "~jimver/catsay"
Expand Down
8 changes: 8 additions & 0 deletions ci/before_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
set -ex

main() {
if [ $TARGET = 'snap' ]
then
sudo apt update
sudo apt install snapd
return
fi

local src=$(pwd) \
stage=

Expand All @@ -17,6 +24,7 @@ main() {
;;
esac


test -f Cargo.lock || cargo generate-lockfile

cross rustc --bin catsay --target $TARGET --release -- -C lto
Expand Down
5 changes: 5 additions & 0 deletions ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
set -ex

main() {
if [ $TARGET = snap ]
then
return
fi

local target=
if [ $TRAVIS_OS_NAME = linux ]; then
target=x86_64-unknown-linux-musl
Expand Down
5 changes: 5 additions & 0 deletions ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
set -ex

main() {
if [ $TARGET = snap ]
then
return
fi

cross build --target $TARGET
cross build --target $TARGET --release

Expand Down

0 comments on commit b5d5c4a

Please sign in to comment.