diff options
-rw-r--r-- | appveyor.yml | 49 | ||||
-rw-r--r-- | ci/before_deploy.ps1 | 25 | ||||
-rw-r--r-- | src/bat/.travis.yml | 3 |
3 files changed, 74 insertions, 3 deletions
diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..a8f36ad3 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,49 @@ +environment: + global: + TARGET: x86_64-pc-windows-msvc + RUST_VERSION: stable + CRATE_NAME: delta + CARGO_HOME: "c:\\cargo" + RUSTUP_HOME: "c:\\rustup" + +install: + - appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe + - rustup-init.exe -y --default-host %TARGET% + - set PATH=%PATH%;C:\cargo\bin + - rustc -Vv + - cargo -V + +build: false +test_script: + - cargo test --target %TARGET% --verbose + - cargo run --target %TARGET% -- --compare-themes + +before_deploy: + # Generate artifacts for release + - cargo build --release --verbose + - ps: ci\before_deploy.ps1 + +deploy: + description: 'Automatically deployed release' + artifact: /.*\.zip/ + # Here's how: + # - Go to 'https://github.com/settings/tokens/new' and generate a Token with only the + # `public_repo` scope enabled + # - Then go to 'https://ci.appveyor.com/tools/encrypt' and enter the newly generated token. + # - Enter the "encrypted value" below + auth_token: + secure: cXYUTdv/KNy1SLsiKzp5+0W/roNCgQJOpAw2CA0CFzkvHC1XoLts88VBSBAZn7yU + provider: GitHub + on: + RUST_VERSION: stable + appveyor_repo_tag: true + +cache: + - C:\Users\appveyor\.cargo\registry + - target + +notifications: + - provider: Email + on_build_success: false + on_build_failure: false + on_build_status_changed: false diff --git a/ci/before_deploy.ps1 b/ci/before_deploy.ps1 new file mode 100644 index 00000000..918b1d93 --- /dev/null +++ b/ci/before_deploy.ps1 @@ -0,0 +1,25 @@ +# This script takes care of packaging the build artifacts that will go in the +# release zipfile + +$SRC_DIR = $PWD.Path +$STAGE = [System.Guid]::NewGuid().ToString() + +Set-Location $ENV:Temp +New-Item -Type Directory -Name $STAGE +Set-Location $STAGE + +$ZIP = "$SRC_DIR\$($Env:CRATE_NAME)-$($Env:APPVEYOR_REPO_TAG_NAME)-$($Env:TARGET).zip" + +Copy-Item "$SRC_DIR\target\release\delta.exe" '.\' + +# readme and license +Copy-Item $SRC_DIR\README.md '.\' +Copy-Item $SRC_DIR\LICENSE '.\' + +7z a "$ZIP" * + +Push-AppveyorArtifact "$ZIP" + +Set-Location .. +Remove-Item $STAGE -Force -Recurse +Set-Location $SRC_DIR diff --git a/src/bat/.travis.yml b/src/bat/.travis.yml index 02ef3497..324db53b 100644 --- a/src/bat/.travis.yml +++ b/src/bat/.travis.yml @@ -6,9 +6,6 @@ matrix: - os: linux rust: stable env: TARGET=x86_64-unknown-linux-gnu - - os: windows - rust: stable - env: TARGET=x86_64-pc-windows-msvc - os: linux rust: stable env: |