diff --git a/.travis.yml b/.travis.yml index 5db8037..350865c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,8 +24,22 @@ jobs: # before_install: Scripts to run before the install stage # install: Scripts to run at the install stage install: | + echo "Rust: ${TRAVIS_RUST_VERSION}" + echo "Event: ${TRAVIS_EVENT_TYPE}" + echo "Tag: ${TRAVIS_TAG}" if [[ "$TRAVIS_RUST_VERSION" == stable ]]; then cargo install cargo-tarpaulin + if [[ "$TRAVIS_TAG" != "" ]]; then + echo "Installing additional targets." + rustup target add x86_64-apple-darwin + rustup target add aarch64-apple-darwin + rustup target add armv7-unknown-linux-gnueabihf + rustup target add aarch64-unknown-linux-gnu + rustup target add x86_64-unknown-linux-gnu + rustup target add x86_64-pc-windows-gnu + # rustup target add x86_64-pc-windows-msvctarget + echo "finished rustup installation" + fi fi # before_script: Scripts to run before the script stage @@ -69,7 +83,7 @@ after_success: | echo "Tag name: -${TRAVIS_TAG}-" # If this build is not from a tag, create one if [[ "$TRAVIS_TAG" == "" ]]; then - if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_EVENT_TYPE" != "cron" ]]; then + if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_EVENT_TYPE" == "pull_request" ]]; then # If the build is from master we actually create a tag # Build a tag # This prints the version number @@ -97,28 +111,35 @@ after_success: | before_deploy: | if [[ "$TRAVIS_RUST_VERSION" != stable ]]; then travis_terminate 0 - else # Create the releases - # Macs - cargo build --release --target x86_64-apple-darwin & + else + # Create the releases + # Macs + sudo snap install tree + # cargo build --release --target x86_64-apple-darwin # New macs - cargo build --release --target aarch64-apple-darwin & + # cargo build --release --target aarch64-apple-darwin # Raspberry - cargo build --release --target armv7-unknown-linux-gnueabihf & + # cargo build --release --target armv7-unknown-linux-gnueabihf # Linux ARM - cargo build --release --target aarch64-unknown-linux-gnu & + # cargo build --release --target aarch64-unknown-linux-gnu # Linux x86 - cargo build --release --target x86_64-unknown-linux-gnu & + # cargo build --release --target x86_64-unknown-linux-gnu # Windows - cargo build --release --target x86_64-pc-windows-gnu & - cargo build --release --target x86_64-pc-windows-msvc & - wait + cargo build --release --target x86_64-pc-windows-gnu + tree /home/travis/build/frosklis/dinero-rs/target/ -L 3 + # cargo build --release --target x86_64-pc-windows-msvc + + # Package everything + # tar -czf dinero-mac-x86_64.tar.gz /home/travis/build/frosklis/dinero-rs/target/x86_64-apple-darwin/release/dinero + # tar -czf dinero-mac-aarch64.tar.gz /home/travis/build/frosklis/dinero-rs/target/aarch64-apple-darwin/release/dinero + tar -czf dinero-windows-x86_64.tar.gz /home/travis/build/frosklis/dinero-rs/target/x86_64-pc-windows-gnu/release/dinero.exe fi deploy: provider: releases token: $GITHUB_TOKEN - file: - release_notes_file: Changelog.md + file: "*.gz" + release_notes_file: CHANGELOG.md edge: true # opt in to dpl v2 on: tags: true