2019-03-05 06:59:54 +00:00
|
|
|
# Only build version tags
|
2019-03-04 19:38:27 +00:00
|
|
|
skip_non_tags: true
|
2019-03-05 06:59:54 +00:00
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- /v\d*\.\d*\.\d*/
|
|
|
|
|
|
|
|
# Build for the x86_64 Windows target
|
2019-03-04 19:38:27 +00:00
|
|
|
platform: x64
|
2019-03-04 15:53:35 +00:00
|
|
|
environment:
|
2019-03-04 16:07:40 +00:00
|
|
|
SSL_CERT_FILE: "C:\\OpenSSL\\cacert.pem"
|
2019-03-04 15:53:35 +00:00
|
|
|
RUSTUP_USE_HYPER: 1
|
|
|
|
CARGO_HTTP_CHECK_REVOKE: false
|
|
|
|
GITHUB_TOKEN:
|
|
|
|
secure: jqZ4q5oOthKX/pBL1tRsBJsfGPIee3q+N/UBSCZNjCrlFUNfQSfibBPzzICYg1he
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
- TARGET: x86_64-pc-windows-msvc
|
2019-03-04 16:07:40 +00:00
|
|
|
BITS: 64
|
|
|
|
OPENSSL_VERSION: 1_1_0j
|
|
|
|
OPENSSL_DIR: C:\OpenSSL
|
2019-03-04 15:53:35 +00:00
|
|
|
|
2019-03-05 06:59:54 +00:00
|
|
|
# Extract release binary artifacts
|
2019-03-04 19:38:27 +00:00
|
|
|
artifacts:
|
|
|
|
- path: .\ffsend*.exe
|
|
|
|
|
2019-03-04 15:53:35 +00:00
|
|
|
install:
|
2019-03-05 06:59:54 +00:00
|
|
|
# # Quit early if FFSEND_VESRION is not available
|
|
|
|
# # These builds must be started from a webhook, initiated by a release build on
|
|
|
|
# # GitLab CI
|
|
|
|
# - ps: if ([string]::IsNullOrEmpty($FFSEND_VERSION)) { Exit-AppveyorBuild }
|
2019-03-04 19:38:27 +00:00
|
|
|
|
2019-03-04 16:07:40 +00:00
|
|
|
# Install OpenSSL
|
|
|
|
- mkdir C:\OpenSSL
|
|
|
|
- ps: if (Test-Path env:OPENSSL_VERSION) { Start-FileDownload "http://slproweb.com/download/Win${env:BITS}OpenSSL-${env:OPENSSL_VERSION}.exe" }
|
|
|
|
- if defined OPENSSL_VERSION Win%BITS%OpenSSL-%OPENSSL_VERSION%.exe /SILENT /VERYSILENT /SP- /DIR="C:\OpenSSL"
|
|
|
|
- appveyor DownloadFile https://curl.haxx.se/ca/cacert.pem -FileName C:\OpenSSL\cacert.pem
|
|
|
|
|
|
|
|
# Install Rust
|
2019-03-04 15:53:35 +00:00
|
|
|
- appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
|
|
|
|
- rustup-init.exe -y --default-host x86_64-pc-windows-msvc --default-toolchain nightly
|
|
|
|
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
|
|
|
|
- rustc -V
|
|
|
|
- cargo -V
|
|
|
|
- git submodule update --init
|
|
|
|
|
|
|
|
build_script:
|
2019-03-04 17:49:38 +00:00
|
|
|
# Build dynamic release binary
|
2019-03-04 19:38:27 +00:00
|
|
|
- cargo build --release --features no-color --verbose
|
2019-03-04 17:49:38 +00:00
|
|
|
- copy .\target\release\ffsend.exe .\ffsend-%TARGET%.exe
|
|
|
|
|
|
|
|
# Build static release binary
|
2019-03-04 17:18:38 +00:00
|
|
|
- set RUSTFLAGS=-Ctarget-feature=+crt-static
|
2019-03-04 19:38:27 +00:00
|
|
|
- cargo build --release --features no-color --verbose
|
2019-03-04 17:49:38 +00:00
|
|
|
- copy .\target\release\ffsend.exe .\ffsend-%TARGET%-static.exe
|
|
|
|
|
|
|
|
# Install github-release
|
|
|
|
- appveyor DownloadFile https://github.com/tfausak/github-release/releases/download/1.2.4/github-release-windows.zip -FileName github-release.zip
|
|
|
|
- 7z e github-release.zip
|
|
|
|
|
|
|
|
# Upload release binaries to GitHub
|
2019-03-05 07:20:16 +00:00
|
|
|
- .\github-release.exe upload --token %GITHUB_TOKEN% --owner timvisee --repo ffsend --tag %APPVEYOR_REPO_TAG_NAME% --file .\ffsend-%TARGET%.exe --name ffsend-%APPVEYOR_REPO_TAG_NAME%-windows-x64.exe
|
|
|
|
- .\github-release.exe upload --token %GITHUB_TOKEN% --owner timvisee --repo ffsend --tag %APPVEYOR_REPO_TAG_NAME% --file .\ffsend-%TARGET%-static.exe --name ffsend-%APPVEYOR_REPO_TAG_NAME%-windows-x64-static.exe
|
2019-03-04 15:53:35 +00:00
|
|
|
|
|
|
|
test: false
|