forked from darfink/detour-rs
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
161 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Based on the "trust" template v0.1.1 | ||
# https://github.com/japaric/trust/tree/v0.1.1 | ||
|
||
dist: trusty | ||
language: rust | ||
services: docker | ||
sudo: required | ||
|
||
env: | ||
global: | ||
- CRATE_NAME=detour | ||
|
||
matrix: | ||
include: | ||
# Linux | ||
- env: TARGET=i686-unknown-linux-gnu | ||
rust: nightly | ||
- env: TARGET=x86_64-unknown-linux-gnu | ||
rust: nightly | ||
|
||
# OSX | ||
- env: TARGET=i686-apple-darwin | ||
os: osx | ||
rust: nightly | ||
- env: TARGET=x86_64-apple-darwin | ||
os: osx | ||
rust: nightly | ||
|
||
before_install: set -e | ||
|
||
install: | ||
- sh ci/install.sh | ||
- source ~/.cargo/env || true | ||
|
||
script: | ||
- bash ci/script.sh | ||
|
||
after_script: set +e | ||
|
||
deploy: off | ||
|
||
cache: cargo | ||
before_cache: | ||
# Travis can't cache files that are not readable by "others" | ||
- chmod -R a+r $HOME/.cargo | ||
|
||
branches: | ||
only: | ||
# release tags | ||
- /^v\d+\.\d+\.\d+.*$/ | ||
- master | ||
|
||
notifications: | ||
email: | ||
on_success: never |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Based on the "trust" template v0.1.1 | ||
# https://github.com/japaric/trust/tree/v0.1.1 | ||
|
||
environment: | ||
global: | ||
RUST_VERSION: nightly | ||
CRATE_NAME: region | ||
matrix: | ||
# MinGW | ||
- TARGET: i686-pc-windows-gnu | ||
- TARGET: x86_64-pc-windows-gnu | ||
|
||
# MSVC | ||
- TARGET: i686-pc-windows-msvc | ||
- TARGET: x86_64-pc-windows-msvc | ||
|
||
install: | ||
- ps: >- | ||
If ($Env:TARGET -eq 'x86_64-pc-windows-gnu') { | ||
$Env:PATH += ';C:\msys64\mingw64\bin' | ||
} ElseIf ($Env:TARGET -eq 'i686-pc-windows-gnu') { | ||
$Env:PATH += ';C:\msys64\mingw32\bin' | ||
} | ||
- curl -sSf -o rustup-init.exe https://win.rustup.rs/ | ||
- rustup-init.exe -y --default-host %TARGET% --default-toolchain %RUST_VERSION% | ||
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin | ||
- rustc -Vv | ||
- cargo -V | ||
|
||
# This is the "test phase" | ||
test_script: | ||
# Don't run the "test phase" when doing deploys | ||
- if [%APPVEYOR_REPO_TAG%]==[false] ( | ||
cargo build --target %TARGET% && | ||
cargo build --target %TARGET% --release && | ||
cargo test --target %TARGET% && | ||
cargo test --target %TARGET% --release | ||
) | ||
|
||
deploy: off | ||
|
||
cache: | ||
- C:\Users\appveyor\.cargo\registry | ||
- target | ||
|
||
branches: | ||
only: | ||
# Release tags | ||
- /^v\d+\.\d+\.\d+.*$/ | ||
- master | ||
|
||
notifications: | ||
- provider: Email | ||
on_build_success: false | ||
|
||
# Building is done in the test phase, so we disable Appveyor's build phase. | ||
build: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
set -ex | ||
|
||
main() { | ||
local target= | ||
if [ $TRAVIS_OS_NAME = linux ]; then | ||
target=x86_64-unknown-linux-musl | ||
sort=sort | ||
else | ||
target=x86_64-apple-darwin | ||
sort=gsort # for `sort --sort-version`, from brew's coreutils. | ||
fi | ||
|
||
# This fetches latest stable release | ||
local tag=$(git ls-remote --tags --refs --exit-code https://github.com/japaric/cross \ | ||
| cut -d/ -f3 \ | ||
| grep -E '^v[0.1.0-9.]+$' \ | ||
| $sort --version-sort \ | ||
| tail -n1) | ||
curl -LSfs https://japaric.github.io/trust/install.sh | \ | ||
sh -s -- \ | ||
--force \ | ||
--git japaric/cross \ | ||
--tag $tag \ | ||
--target $target | ||
} | ||
|
||
main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# This script takes care of testing your crate | ||
|
||
set -ex | ||
|
||
main() { | ||
cross build --target $TARGET | ||
cross build --target $TARGET --release | ||
|
||
if [ ! -z $DISABLE_TESTS ]; then | ||
return | ||
fi | ||
|
||
cross test --target $TARGET | ||
cross test --target $TARGET --release | ||
} | ||
|
||
# Don't run the "test phase" when doing deploys | ||
if [ -z $TRAVIS_TAG ]; then | ||
main | ||
fi |