1 Star 0 Fork 127

搬砖现场 / xmake

forked from tboox / xmake 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.appveyor.yml 4.26 KB
一键复制 编辑 原始数据 按行查看 历史
OpportunityLiu 提交于 2019-06-18 19:12 . support download tag from ci
#version: v2.1.8.{build}
image:
- Visual Studio 2013
- Visual Studio 2015
- Visual Studio 2017
platform:
- x86
- x64
install:
# prepare tools
- ps: Push-Location C:/
- ps: (New-Item ./winenv/bin -ItemType Directory).FullName
# NSIS
- ps: Invoke-WebRequest "https://svwh.dl.sourceforge.net/project/nsis/NSIS 3/3.04/nsis-3.04.zip" -UseBasicParsing -OutFile ./nsis.zip
- ps: Invoke-WebRequest "https://svwh.dl.sourceforge.net/project/nsis/NSIS 3/3.04/nsis-3.04-strlen_8192.zip" -UseBasicParsing -OutFile ./nsis-longstr.zip
- ps: Expand-Archive ./nsis.zip -DestinationPath ./nsis
- ps: Move-Item ./nsis/*/* ./nsis
- ps: Expand-Archive ./nsis-longstr.zip -DestinationPath ./nsis -Force
# unzip
- ps: Invoke-WebRequest "https://svwh.dl.sourceforge.net/project/gnuwin32/unzip/5.51-1/unzip-5.51-1-bin.zip" -UseBasicParsing -OutFile .\unzip.zip
- ps: Expand-Archive ./unzip.zip -DestinationPath ./unzip
- ps: Copy-Item ./unzip/bin/unzip.exe ./winenv/bin
# curl
- ps: Invoke-WebRequest "https://github.com/xmake-io/xmake-win$(if ($env:platform -eq 'x64') { '64' } else { '32' })env/raw/master/bin/curl.exe" -UseBasicParsing -OutFile .\curl.exe
- ps: Invoke-WebRequest "https://raw.githubusercontent.com/xmake-io/xmake-win$(if ($env:platform -eq 'x64') { '64' } else { '32' })env/master/bin/curl-ca-bundle.crt" -UseBasicParsing -OutFile .\curl-ca-bundle.crt
- ps: Copy-Item ./curl.exe ./winenv/bin
- ps: Copy-Item ./curl-ca-bundle.crt ./winenv/bin
#
- ps: Pop-Location
# install xmake
- ps: ./scripts/get.ps1 -branch master
before_build:
- ps: (Get-Command xmake).FileVersionInfo.ProductVersion
build_script:
# self build
- ps: Push-Location ./core
- ps: xmake config --arch=$env:platform
- ps: xmake build
- ps: Pop-Location
# use new xmake
- ps: Set-AppveyorBuildVariable -Name XMAKE_PROGRAM_DIR -Value $(Resolve-Path ./xmake)
- ps: Copy-Item -Force .\core\build\xmake.exe $(Get-Command xmake).Path
- ps: (Get-Command xmake).FileVersionInfo.ProductVersion
after_build:
# publish exe
- ps: Push-AppveyorArtifact .\core\build\xmake.exe -FileName xmake.exe -DeploymentName "xmake-executable"
# compose & publish installer
- ps: Copy-Item C:\winenv\ . -Recurse
- ps: $version = (Get-Command xmake).FileVersionInfo
- ps: C:\nsis\makensis.exe
/DMAJOR=$($version.ProductMajorPart)
/DMINOR=$($version.ProductMinorPart)
/DALTER=$($version.ProductBuildPart)
/DBUILD=$($($version.ProductVersion -split '\+')[1])
/D$($env:platform)
.\scripts\installer.nsi
- ps: Push-AppveyorArtifact .\scripts\xmake.exe -FileName xmake-installer.exe -DeploymentName "xmake-installer"
# publish zip archive
- ps: Copy-Item .\*.md .\xmake
- ps: Copy-Item C:\winenv\ .\xmake -Recurse
- ps: Copy-Item .\core\build\xmake.exe .\xmake
- ps: Compress-Archive -Path .\xmake\* -DestinationPath .\archive.zip -CompressionLevel Optimal
- ps: Push-AppveyorArtifact .\archive.zip -FileName xmake.zip -DeploymentName "xmake-archive"
test_script:
- ps: xmake --version
- ps: Push-Location ./tests
- ps: |-
$tests = Get-ChildItem test.lua -Recurse | ForEach-Object {
$testname = "$(Resolve-Path $_.Directory -Relative)"
$filename = "$(Resolve-Path $_ -Relative)"
$fullname = "$($_.FullName)"
Add-AppveyorTest -Name $testname -Framework "xmake-test" -FileName $filename -Outcome None
return @{ testname = $testname; filename = $filename; fullname = $fullname }
}
- ps: $all_success = $true
- ps: |-
$tests | ForEach-Object {
$testname = $_.testname
$filename = $_.filename
Update-AppveyorTest -Name $testname -Framework "xmake-test" -FileName $filename -Outcome Running
$time = Measure-Command {
$results = xmake lua --verbose --diagnosis runner.lua $_.fullname
$outcome = if ($?) { "Passed" } else { $all_success = $false; "Failed" }
$stdout = [string]::Join("`n", $results)
}
Update-AppveyorTest -Name $testname -Framework "xmake-test" -FileName $filename -Outcome $outcome -Duration $time.TotalMilliseconds -StdOut $stdout
}
- ps: Pop-Location
- ps: if ($all_success) { Write-Host "All tests passed!" } else { Write-Error "Some tests failed!" }
Lua
1
https://gitee.com/zhaowx_admin/xmake.git
git@gitee.com:zhaowx_admin/xmake.git
zhaowx_admin
xmake
xmake
master

搜索帮助