travis: windows releases work now
* on windows the target has a .exe suffix we need the file name to add to the release zip * install zip on windows with choco * also remove tests - since there aren't any no code changes
This commit is contained in:
parent
acedfa2a6c
commit
6cdc2b2ada
2 changed files with 12 additions and 14 deletions
24
.travis.yml
24
.travis.yml
|
@ -1,6 +1,5 @@
|
||||||
language: rust
|
language: rust
|
||||||
rust: stable
|
rust: stable
|
||||||
cache: cargo
|
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
@ -14,21 +13,20 @@ matrix:
|
||||||
- os: linux
|
- os: linux
|
||||||
env: TARGET=x86_64-unknown-linux-gnu
|
env: TARGET=x86_64-unknown-linux-gnu
|
||||||
- os: windows
|
- os: windows
|
||||||
env: TARGET=x86_64-pc-windows-msvc
|
env: TARGET=x86_64-pc-windows-msvc SUFFIX=.exe
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- cargo build ${TRAVIS_TAG:+--release} --target $TARGET
|
- cargo build ${TRAVIS_TAG:+--release} --target $TARGET
|
||||||
- cargo test ${TRAVIS_TAG:+--release} --target $TARGET
|
|
||||||
|
|
||||||
before_deploy:
|
before_deploy:
|
||||||
- strip "target/$TARGET/release/$PROJECT_NAME"
|
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then choco install zip ; fi
|
||||||
- zip "$PROJECT_NAME-$TRAVIS_TAG-$TARGET.zip" -j "target/$TARGET/release/$PROJECT_NAME"
|
- strip "target/$TARGET/release/${PROJECT_NAME}${SUFFIX}"
|
||||||
|
- zip ${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}.zip -j "target/$TARGET/release/${PROJECT_NAME}${SUFFIX}"
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: releases
|
provider: releases
|
||||||
api_key: $GIT_TOKEN
|
api_key: $GIT_TOKEN
|
||||||
file_glob: true
|
file: ${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}.zip
|
||||||
file: ${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}*
|
|
||||||
# don't delete the artifacts from previous phases
|
# don't delete the artifacts from previous phases
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
overwrite: true
|
overwrite: true
|
||||||
|
@ -40,10 +38,10 @@ deploy:
|
||||||
|
|
||||||
## Need to cache the whole `.cargo` directory to keep .crates.toml for
|
## Need to cache the whole `.cargo` directory to keep .crates.toml for
|
||||||
## cargo-update to work
|
## cargo-update to work
|
||||||
#cache:
|
cache:
|
||||||
# directories:
|
directories:
|
||||||
# - ${TRAVIS_HOME}/.cargo
|
- ${TRAVIS_HOME}/.cargo
|
||||||
#
|
|
||||||
## But don't cache the cargo registry
|
## But don't cache the cargo registry
|
||||||
#before_cache:
|
before_cache:
|
||||||
# - rm -rf ${TRAVIS_HOME}/.cargo/registry
|
- rm -rf ${TRAVIS_HOME}/.cargo/registry
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "http-server"
|
name = "http-server"
|
||||||
version = "0.10.0"
|
version = "0.10.1"
|
||||||
authors = ["Damjan Georgievski <gdamjan@gmail.com>"]
|
authors = ["Damjan Georgievski <gdamjan@gmail.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
Loading…
Add table
Reference in a new issue