diff options
author | Tim Oram <dev@mitmaro.ca> | 2018-03-03 20:29:23 -0330 |
---|---|---|
committer | Tim Oram <dev@mitmaro.ca> | 2018-03-03 20:52:26 -0330 |
commit | 294093981e472d1677e4b39b03368f70bd634efb (patch) | |
tree | 96d86c5251cca0d7be013d13cf037d3e420b7e5d /appveyor.yml | |
parent | 39c82b56529fb865b34dec28d8cafd224ea60014 (diff) |
Added deployment to GitHub in CI
The project will now build binaries for MacOS, Debian and Windows automatically
and deploy them to GitHub.
Diffstat (limited to 'appveyor.yml')
-rw-r--r-- | appveyor.yml | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..0ada0af --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,73 @@ +clone_depth: 1 +clone_folder: c:\projects\git-interactive-rebase-tool + +# Based on the "trust" template v0.1.2 +# https://github.com/japaric/trust/tree/v0.1.2 + +environment: + global: + RUST_VERSION: stable + CRATE_NAME: git-interactive-rebase-tool + + 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 + +test_script: + - if [%APPVEYOR_REPO_TAG%]==[false] ( + cargo build --target %TARGET% && + cargo build --target %TARGET% --release && + cargo test --target %TARGET% && + cargo test --target %TARGET% --release && + cargo run --target %TARGET% -- --version && + cargo run --target %TARGET% --release -- --version + ) + +before_deploy: + - cargo rustc --target %TARGET% --release --bin git-interactive-rebase-tool -- -C lto + - ps: ci\before-deploy.ps1 + +deploy: + artifact: /.*\.zip/ + auth_token: + secure: swMVdXZ3hh2gofrHrTJdXfsdddyngiC+nZieGWbu66PH1vGzPoYC1Rviy9/9kqFF + description: '' + on: + RUST_VERSION: stable + appveyor_repo_tag: true + provider: GitHub + +cache: + - C:\Users\appveyor\.cargo\registry + - target + + +branches: + only: + - master + - /^\d+\.\d+\.\d+.*$/ + +notifications: + - provider: Email + on_build_success: false + +# Building is done in the test phase, so we disable Appveyor's build phase. +build: false |