|
@@ -21,90 +21,112 @@ stages:
|
|
|
|
|
|
jobs:
|
|
jobs:
|
|
include:
|
|
include:
|
|
|
|
+ ################################
|
|
|
|
+ # Build stage #
|
|
|
|
+ ################################
|
|
|
|
+
|
|
|
|
+ # Linux with Rust stable/beta/nightly
|
|
- stage: build
|
|
- stage: build
|
|
rust: stable
|
|
rust: stable
|
|
- env: TARGET=x86_64-unknown-linux-gnu
|
|
|
|
script: &build-script
|
|
script: &build-script
|
|
- cargo build --verbose --all
|
|
- cargo build --verbose --all
|
|
- cargo build --no-default-features --verbose --all
|
|
- cargo build --no-default-features --verbose --all
|
|
- cargo build --features no-color --verbose --all
|
|
- cargo build --features no-color --verbose --all
|
|
cache: cargo
|
|
cache: cargo
|
|
- - stage: build
|
|
|
|
- rust: stable
|
|
|
|
- env: TARGET=i686-unknown-linux-gnu
|
|
|
|
- script: &build-script-cross
|
|
|
|
- - cargo install cross
|
|
|
|
- - cross build --target $TARGET --verbose --all
|
|
|
|
- - cross build --target $TARGET --no-default-features --verbose --all
|
|
|
|
- - cross build --target $TARGET --features no-color --verbose --all
|
|
|
|
- - stage: build
|
|
|
|
- rust: stable
|
|
|
|
- env: TARGET=aarch64-unknown-linux-gnu
|
|
|
|
- script: *build-script-cross
|
|
|
|
- - stage: build
|
|
|
|
- rust: stable
|
|
|
|
- env: TARGET=arm-unknown-linux-gnueabi
|
|
|
|
- script: *build-script-cross
|
|
|
|
- - stage: build
|
|
|
|
- rust: stable
|
|
|
|
- env: TARGET=armv7-unknown-linux-gnueabihf
|
|
|
|
- script: *build-script-cross
|
|
|
|
- # - stage: build
|
|
|
|
- # rust: stable
|
|
|
|
- # env: TARGET=i686-unknown-freebsd
|
|
|
|
- # script: *build-script-cross
|
|
|
|
- # - stage: build
|
|
|
|
- # rust: stable
|
|
|
|
- # env: TARGET=x86_64-unknown-freebsd
|
|
|
|
- # script: *build-script-cross
|
|
|
|
- # - stage: build
|
|
|
|
- # rust: stable
|
|
|
|
- # env: TARGET=x86_64-unknown-netbsd
|
|
|
|
- # script: *build-script-cross
|
|
|
|
- stage: build
|
|
- stage: build
|
|
rust: beta
|
|
rust: beta
|
|
- env: TARGET=x86_64-unknown-linux-gnu
|
|
|
|
- script: *build-script-cross
|
|
|
|
|
|
+ script: *build-script
|
|
- stage: build
|
|
- stage: build
|
|
rust: nightly
|
|
rust: nightly
|
|
- env: TARGET=x86_64-unknown-linux-gnu
|
|
|
|
- script: *build-script-cross
|
|
|
|
|
|
+ script: *build-script
|
|
|
|
+
|
|
|
|
+ # macOS with Rust stable
|
|
- stage: build
|
|
- stage: build
|
|
rust: stable
|
|
rust: stable
|
|
os: osx
|
|
os: osx
|
|
- env: TARGET=x86_64-unknown-linux-gnu
|
|
|
|
- script:
|
|
|
|
- - cargo build --verbose --all
|
|
|
|
- - cargo build --no-default-features --verbose --all
|
|
|
|
- - cargo build --features no-color --verbose --all
|
|
|
|
|
|
+ script: *build-script
|
|
|
|
+
|
|
|
|
+ ################################
|
|
|
|
+ # Test stage #
|
|
|
|
+ ################################
|
|
|
|
+
|
|
- stage: test
|
|
- stage: test
|
|
script: cargo test --verbose --all
|
|
script: cargo test --verbose --all
|
|
cache: cargo
|
|
cache: cargo
|
|
|
|
+
|
|
|
|
+ ################################
|
|
|
|
+ # Release stage #
|
|
|
|
+ ################################
|
|
|
|
+
|
|
|
|
+ # Cargo crate release
|
|
|
|
+ - stage: release
|
|
|
|
+ script:
|
|
|
|
+ - echo $CARGO_TOKEN | cargo login
|
|
|
|
+ - cargo publish --verbose
|
|
|
|
+ cache: cargo
|
|
|
|
+
|
|
|
|
+ # GitHub binary release for Linux on x86/x86_64
|
|
- stage: release
|
|
- stage: release
|
|
|
|
+ rust: stable
|
|
env: TARGET=x86_64-unknown-linux-gnu
|
|
env: TARGET=x86_64-unknown-linux-gnu
|
|
script:
|
|
script:
|
|
- - cargo install cross
|
|
|
|
- - cross build --target $TARGET --release --verbose --all
|
|
|
|
|
|
+ - cargo build --release --verbose --all
|
|
- cd target/release
|
|
- cd target/release
|
|
- - tar -czvf $TRAVIS_BUILD_DIR/ffsend-linux-x86_64.tar.gz ffsend
|
|
|
|
|
|
+ - tar -czvf $TRAVIS_BUILD_DIR/ffsend-$TARGET.tar.gz ffsend
|
|
- cd $TRAVIS_BUILD_DIR
|
|
- cd $TRAVIS_BUILD_DIR
|
|
- deploy:
|
|
|
|
|
|
+ deploy: &deploy-github-release-cross
|
|
provider: releases
|
|
provider: releases
|
|
api_key: $GITHUB_OAUTH_TOKEN
|
|
api_key: $GITHUB_OAUTH_TOKEN
|
|
skip_cleanup: true
|
|
skip_cleanup: true
|
|
overwrite: false
|
|
overwrite: false
|
|
- file: ffsend-x86_64-linux.tar.gz
|
|
|
|
|
|
+ file: ffsend-$TARGET.tar.gz
|
|
on:
|
|
on:
|
|
tags: true
|
|
tags: true
|
|
branch: master
|
|
branch: master
|
|
- cache: cargo
|
|
|
|
- stage: release
|
|
- stage: release
|
|
|
|
+ rust: stable
|
|
|
|
+ env: TARGET=i686-unknown-linux-gnu
|
|
|
|
+ install: &install-github-release-cross
|
|
|
|
+ - cargo install cross
|
|
|
|
+ script: &script-github-release-cross
|
|
|
|
+ - cross build --target $TARGET --release --verbose --all
|
|
|
|
+ - cd target/release
|
|
|
|
+ - tar -czvf $TRAVIS_BUILD_DIR/ffsend-$TARGET.tar.gz ffsend
|
|
|
|
+ - cd $TRAVIS_BUILD_DIR
|
|
|
|
+ deploy: *deploy-github-release-cross
|
|
|
|
+
|
|
|
|
+ # GitHub binary release for Linux on arch
|
|
|
|
+ - stage: release
|
|
|
|
+ rust: stable
|
|
|
|
+ env: TARGET=aarch64-unknown-linux-gnu
|
|
|
|
+ install: *install-github-release-cross
|
|
|
|
+ script: *script-github-release-cross
|
|
|
|
+ deploy: *deploy-github-release-cross
|
|
|
|
+ - stage: release
|
|
|
|
+ rust: stable
|
|
|
|
+ install: *install-github-release-cross
|
|
|
|
+ script: *script-github-release-cross
|
|
|
|
+ deploy: *deploy-github-release-cross
|
|
|
|
+ - stage: release
|
|
|
|
+ rust: stable
|
|
|
|
+ env: TARGET=armv7-unknown-linux-gnueabihf
|
|
|
|
+ install: *install-github-release-cross
|
|
|
|
+ script: *script-github-release-cross
|
|
|
|
+ deploy: *deploy-github-release-cross
|
|
|
|
+
|
|
|
|
+ # GitHub binary release for macOX
|
|
|
|
+ - stage: release
|
|
|
|
+ rust: stable
|
|
|
|
+ os: osx
|
|
|
|
+ env: TARGET=x86_64-apple-darwin
|
|
script:
|
|
script:
|
|
- - echo $CARGO_TOKEN | cargo login
|
|
|
|
- - cargo publish --verbose
|
|
|
|
- cache: cargo
|
|
|
|
|
|
+ - cargo build --release --verbose --all
|
|
|
|
+ - cd target/release
|
|
|
|
+ - tar -czvf $TRAVIS_BUILD_DIR/ffsend-$TARGET.tar.gz ffsend
|
|
|
|
+ - cd $TRAVIS_BUILD_DIR
|
|
|
|
+ deploy: *deploy-github-release-cross
|
|
|
|
|
|
-# TODO: add BSD architecture
|
|
|
|
|
|
+# TODO: add (Free)BSD architecture
|
|
# TODO: use regular cargo commands for x86_64 linux
|
|
# TODO: use regular cargo commands for x86_64 linux
|
|
# TODO: release a build for each architecture
|
|
# TODO: release a build for each architecture
|
|
# TODO: enfore the git tag/crate version equality for releases
|
|
# TODO: enfore the git tag/crate version equality for releases
|