version: '{build}.{branch}'
skip_branch_with_pr: true
clone_folder: C:\denoclone_depth: 1
environment: RUSTC_WRAPPER: sccache APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 DENO_BUILD_MODE: release DENO_BUILD_PATH: $(APPVEYOR_BUILD_FOLDER)\target\release DENO_THIRD_PARTY_PATH: $(APPVEYOR_BUILD_FOLDER)\third_party RELEASE_ARTIFACT: deno_win_x64.zip RUST_VERSION: 1.37.0 RUST_DIR: $(USERPROFILE)\rust-$(RUST_VERSION) CARGO_HOME: $(RUST_DIR)\cargo RUSTUP_HOME: $(RUST_DIR)\rustup RUST_BACKTRACE: full SCCACHE_IDLE_TIMEOUT: 0 SCCACHE_BUCKET: deno-sccache AWS_ACCESS_KEY_ID: AKIAIVRN52PLDBP55LBQ AWS_SECRET_ACCESS_KEY: secure: 8ybpi/y5qE2baChsCBhNHmykng3FitELAtTYOiqZd0mw38i88dzdAX8ETNtBogMV
APPVEYOR_CACHE_ENTRY_ZIP_ARGS: -t7z -snl -mtc -mx=1
PS_UTILS: |- function Exec([ScriptBlock] $Command, [switch] $NoNewLines) { "$Command".TrimStart(" &") | Write-Host & $Command 2>&1 | Write-Host -NoNewLine:$NoNewLines if ($NoNewLines) { Write-Host } if ($LastExitCode -ne 0) { throw "Failure. Exit code: $LastExitCode" } }
function Delete-Tree([string[]] $Path) { $Path | foreach { "Deleting '$_'" | Write-Host -NoNewLine if (Test-Path $_) { Remove-Item $_ -Recurse -Force -ErrorAction Ignore $(if ($?) { " - ok" } else { " - failed" }) | Write-Host } else { " - not found" | Write-Host } } }
for: - branches: except: - master environment: APPVEYOR_CACHE_SKIP_SAVE: true
cache: - $(RUST_DIR) - $(APPVEYOR_BUILD_FOLDER)\target\release\ - $(APPVEYOR_BUILD_FOLDER)\prebuilt\win\
init: - ps: Invoke-Expression $env:PS_UTILS
- ps: |- $git_setup_uri = "https://github.com/git-for-windows/git/releases/" + "download/v2.23.0.windows.1/Git-2.23.0-64-bit.exe" Invoke-WebRequest -Uri $git_setup_uri -OutFile "$env:TEMP\git-setup.exe" Start-Process -FilePath "$env:TEMP\git-setup.exe" ` -ArgumentList "/verysilent" ` -Wait
- git config --global core.symlinks true
install: - set PATH=%PATH%;%CD%\prebuilt\win\
- ps: |- try { Exec { & git submodule update --init --force --depth 1 --jobs 4 } } catch { Delete-Tree $env:DENO_THIRD_PARTY_PATH Exec -NoNewLines { & git submodule update --init --force --depth 1 } }
- ps: Install-Product -Product node -Version 12 -Platform x64
- ps: |- $p = $env:PATH -split ";" | where { -not (Test-Path "$_\python.exe") } $p += "C:\Python27-x64" $env:PATH = $p -join ";"
- ps: $env:PATH += ";$env:CARGO_HOME\bin"
- ps: |- if (-not (Test-Path $env:CARGO_HOME)) { Invoke-WebRequest -Uri "https://win.rustup.rs" ` -OutFile "$env:TEMP\rustup-init.exe" Exec -NoNewLines { & "$env:TEMP\rustup-init.exe" -y --default-toolchain $env:RUST_VERSION } Delete-Tree @( "$env:RUSTUP_HOME\downloads", "$env:RUSTUP_HOME\tmp", "$env:RUSTUP_HOME\toolchains\stable-x86_64-pc-windows-msvc\share\doc" ) } Exec { rustup component add clippy } Exec { rustup component add rustfmt }
- node -p "`Node ${process.version} ${process.arch}`"
- ps: |- @("from sys import version", "print 'Python', version") -join "`n" | & python -
- rustc --version - cargo --version
before_build: - python tools\setup.py
- ps: |- prebuilt\win\sccache --start-server $env:AWS_SECRET_ACCESS_KEY = $null
build_script: - cargo clippy --all-targets --release --locked -- -D clippy::all - cargo build -vv --release --all-targets --locked
test_script: - python tools\lint.py - python tools\test_format.py - cargo test -vv --release --all-targets --locked
after_test: - prebuilt\win\sccache --stop-server
- ps: |- if ($env:APPVEYOR_REPO_TAG -eq "true") { Compress-Archive -CompressionLevel Optimal -Force ` -Path "$env:DENO_BUILD_PATH\deno.exe" ` -DestinationPath "$env:APPVEYOR_BUILD_FOLDER\$env:RELEASE_ARTIFACT" }
artifacts: path: $(RELEASE_ARTIFACT)
deploy: provider: GitHub auth_token: secure: HQIIUEOtep3yRiBacZCtX8hVmgtdNvt6Hx7u9fP4Wj2ZYp+eBFP2OLf67RKVa5VZ on: APPVEYOR_REPO_NAME: denoland/deno APPVEYOR_REPO_TAG: true