environment: global: RUST_BACKTRACE: 1 matrix: - RUST_TOOLCHAIN: 1.22.1 branches: only: - master cache: - '%USERPROFILE%\.cargo' - '%APPVEYOR_BUILD_FOLDER%\target' clone_depth: 1 install: - ps: | $url = "https://github.com/maidsafe/QA/raw/master/appveyor/install_rustup.ps1" Invoke-WebRequest $url -OutFile "install_rustup.ps1" . ".\install_rustup.ps1" platform: - x86 - x64 configuration: - Release skip_tags: true before_build: - ps: | $COMMIT_MESSAGE = "$env:APPVEYOR_REPO_COMMIT_MESSAGE $env:APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED" if ($COMMIT_MESSAGE -match "[Vv]ersion change to ([^;]+)") { $COMMIT_MESSAGE_VERSION = "v" + $Matches[1] $env:VERSION = (cargo pkgid) -Replace '.*[:#](.*)', 'v$1' if ($COMMIT_MESSAGE_VERSION -ne $env:VERSION) { Write-Error "Version mismatch between commit message and Cargo.toml." exit 1 } } else { $env:VERSION = $env:APPVEYOR_REPO_COMMIT.Substring(0,7) } build_script: - cargo check --verbose --release --lib --tests after_build: - ps: | if (git diff --shortstat) { Write-Error "Working tree is dirty after building. Probably Cargo.lock should be updated." git status exit 1 } test_script: - cargo test --verbose --release -- --test-threads=1 before_deploy: - cargo build --verbose --release - strip target\release\system_uri.dll - 7z a -mx9 system_uri-%VERSION%-win-%PLATFORM%.zip %APPVEYOR_BUILD_FOLDER%\target\release\system_uri.dll - appveyor PushArtifact system_uri-%VERSION%-win-%PLATFORM%.zip deploy: provider: S3 access_key_id: AKIAIA2TXTG7EV5VIG2Q secret_access_key: secure: WtcjRuYVPF9Fhv1qBVBG+rP6VR7HEa+IayW1L8GqhgUJmp1M8gV4J9u/TdY5Fsb2 bucket: system-uri region: eu-west-2 set_public: true artifact: /.*\.zip/ on: branch: master RUST_TOOLCHAIN: 1.22.1