Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Commit

Permalink
Improve CI configs
Browse files Browse the repository at this point in the history
  • Loading branch information
emmatyping committed Jun 1, 2018
1 parent 0c1ee6a commit 106e440
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 36 deletions.
8 changes: 0 additions & 8 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,10 @@ before_deploy:

deploy:
artifact: /.*\.zip/
# TODO update `auth_token.secure`
# - Create a `public_repo` GitHub token. Go to: https://github.com/settings/tokens/new
# - Encrypt it. Go to https://ci.appveyor.com/tools/encrypt
# - Paste the output down here
auth_token:
secure: lB0ukkdklnOQ2mtvAGbDnZDCGo82HfTwJmjXbS14/2B0R1xzrwCNPB4Kuh3LdxSG
description: ''
on:
# TODO Here you can pick which targets will generate binary releases
# In this example, there are some targets that are tested using the stable
# and nightly channels. This condition makes sure there is only one release
# for such targets and that's generated using the stable channel
RUST_VERSION: stable
appveyor_repo_tag: true
provider: GitHub
Expand Down
4 changes: 2 additions & 2 deletions ci/before_deploy.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Set-Location $STAGE

$ZIP = "$SRC_DIR\$($Env:CRATE_NAME)-$($Env:APPVEYOR_REPO_TAG_NAME)-$($Env:TARGET).zip"

# TODO Update this to package the right artifacts
Copy-Item "$SRC_DIR\target\$($Env:TARGET)\release\hello.exe" '.\'

Copy-Item "$SRC_DIR\target\$($Env:TARGET)\release\cce.*" '.\'

7z a "$ZIP" *

Expand Down
5 changes: 1 addition & 4 deletions ci/before_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ main() {

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

# TODO Update this to build the artifacts that matter to you
cross rustc --bin hello --target $TARGET --release -- -C lto

# TODO Update this to package the right artifacts
cp target/$TARGET/release/hello $stage/
cp target/$TARGET/release/cce $stage/

cd $stage
tar czf $src/$CRATE_NAME-$TRAVIS_TAG-$TARGET.tar.gz *
Expand Down
38 changes: 19 additions & 19 deletions ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@ main() {
sort=gsort # for `sort --sort-version`, from brew's coreutils.
fi

# Builds for iOS are done on OSX, but require the specific target to be
# installed.
case $TARGET in
aarch64-apple-ios)
rustup target install aarch64-apple-ios
;;
armv7-apple-ios)
rustup target install armv7-apple-ios
;;
armv7s-apple-ios)
rustup target install armv7s-apple-ios
;;
i386-apple-ios)
rustup target install i386-apple-ios
;;
x86_64-apple-ios)
rustup target install x86_64-apple-ios
;;
esac
# # Builds for iOS are done on OSX, but require the specific target to be
# # installed.
# case $TARGET in
# aarch64-apple-ios)
# rustup target install aarch64-apple-ios
# ;;
# armv7-apple-ios)
# rustup target install armv7-apple-ios
# ;;
# armv7s-apple-ios)
# rustup target install armv7s-apple-ios
# ;;
# i386-apple-ios)
# rustup target install i386-apple-ios
# ;;
# x86_64-apple-ios)
# rustup target install x86_64-apple-ios
# ;;
# esac

# This fetches latest stable release
local tag=$(git ls-remote --tags --refs --exit-code https://github.com/japaric/cross \
Expand Down
5 changes: 2 additions & 3 deletions ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

set -ex

# TODO This is the "test phase", tweak it as you see fit
main() {
cross build --target $TARGET
cross build --target $TARGET --release
Expand All @@ -14,8 +13,8 @@ main() {
cross test --target $TARGET
cross test --target $TARGET --release

cross run --target $TARGET
cross run --target $TARGET --release
cross run --target $TARGET -- --help
cross run --target $TARGET --release -- --help
}

# we don't run the "test phase" when doing deploys
Expand Down

0 comments on commit 106e440

Please sign in to comment.