diff options
| author | OpportunityLiu <[email protected]> | 2019-06-20 21:12:46 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-06-20 21:12:46 +0800 |
| commit | 9b7e56f87d7518e36e1409f5dee0671839ae964b (patch) | |
| tree | dda79df18d30487d8571b9fce21f242381d669f1 | |
| parent | 61115371793553c60f46b55152b480245ceee129 (diff) | |
try pwsh
| -rw-r--r-- | .appveyor.yml | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/.appveyor.yml b/.appveyor.yml index 7ec829788..7c2954e76 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -10,72 +10,72 @@ platform: install: # prepare tools - - ps: Push-Location C:/ - - ps: (New-Item ./winenv/bin -ItemType Directory).FullName + - pwsh: Push-Location C:/ + - pwsh: (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 + - pwsh: Invoke-WebRequest "https://svwh.dl.sourceforge.net/project/nsis/NSIS 3/3.04/nsis-3.04.zip" -UseBasicParsing -OutFile ./nsis.zip + - pwsh: Invoke-WebRequest "https://svwh.dl.sourceforge.net/project/nsis/NSIS 3/3.04/nsis-3.04-strlen_8192.zip" -UseBasicParsing -OutFile ./nsis-longstr.zip + - pwsh: Expand-Archive ./nsis.zip -DestinationPath ./nsis + - pwsh: Move-Item ./nsis/*/* ./nsis + - pwsh: 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 + - pwsh: Invoke-WebRequest "https://svwh.dl.sourceforge.net/project/gnuwin32/unzip/5.51-1/unzip-5.51-1-bin.zip" -UseBasicParsing -OutFile .\unzip.zip + - pwsh: Expand-Archive ./unzip.zip -DestinationPath ./unzip + - pwsh: 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 + - pwsh: 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 + - pwsh: 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 + - pwsh: Copy-Item ./curl.exe ./winenv/bin + - pwsh: Copy-Item ./curl-ca-bundle.crt ./winenv/bin # - - ps: Pop-Location + - pwsh: Pop-Location # install xmake - - ps: ./scripts/get.ps1 -branch master + - pwsh: ./scripts/get.ps1 -branch master before_build: - - ps: (Get-Command xmake).FileVersionInfo.ProductVersion + - pwsh: (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 + - pwsh: Push-Location ./core + - pwsh: xmake config --arch=$env:platform + - pwsh: xmake build + - pwsh: 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 + - pwsh: Set-AppveyorBuildVariable -Name XMAKE_PROGRAM_DIR -Value $(Resolve-Path ./xmake) + - pwsh: Copy-Item -Force .\core\build\xmake.exe $(Get-Command xmake).Path + - pwsh: (Get-Command xmake).FileVersionInfo.ProductVersion after_build: # publish exe - - ps: Push-AppveyorArtifact .\core\build\xmake.exe -FileName xmake.exe -DeploymentName "xmake-executable" - - ps: (Get-FileHash .\core\build\xmake.exe -Algorithm SHA256).Hash + " *xmake.exe" >> ./shafile + - pwsh: Push-AppveyorArtifact .\core\build\xmake.exe -FileName xmake.exe -DeploymentName "xmake-executable" + - pwsh: (Get-FileHash .\core\build\xmake.exe -Algorithm SHA256).Hash + " *xmake.exe" >> ./shafile # compose & publish installer - - ps: Copy-Item C:\winenv\ . -Recurse - - ps: $version = (Get-Command xmake).FileVersionInfo - - ps: C:\nsis\makensis.exe + - pwsh: Copy-Item C:\winenv\ . -Recurse + - pwsh: $version = (Get-Command xmake).FileVersionInfo + - pwsh: 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" - - ps: (Get-FileHash .\scripts\xmake.exe -Algorithm SHA256).Hash + " *xmake-installer.exe" >> ./shafile + - pwsh: Push-AppveyorArtifact .\scripts\xmake.exe -FileName xmake-installer.exe -DeploymentName "xmake-installer" + - pwsh: (Get-FileHash .\scripts\xmake.exe -Algorithm SHA256).Hash + " *xmake-installer.exe" >> ./shafile # 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" - - ps: (Get-FileHash .\archive.zip -Algorithm SHA256).Hash + " *xmake.zip" >> ./shafile + - pwsh: Copy-Item .\*.md .\xmake + - pwsh: Copy-Item C:\winenv\ .\xmake -Recurse + - pwsh: Copy-Item .\core\build\xmake.exe .\xmake + - pwsh: Compress-Archive -Path .\xmake -DestinationPath .\archive.zip -CompressionLevel Optimal + - pwsh: Push-AppveyorArtifact .\archive.zip -FileName xmake.zip -DeploymentName "xmake-archive" + - pwsh: (Get-FileHash .\archive.zip -Algorithm SHA256).Hash + " *xmake.zip" >> ./shafile # publish sha file - - ps: Push-AppveyorArtifact ./shafile -FileName xmake.sha256 -DeploymentName "xmake-shafile" + - pwsh: Push-AppveyorArtifact ./shafile -FileName xmake.sha256 -DeploymentName "xmake-shafile" test_script: - - ps: xmake --version - - ps: Push-Location ./tests - - ps: |- + - pwsh: xmake --version + - pwsh: Push-Location ./tests + - pwsh: |- $tests = Get-ChildItem test.lua -Recurse | ForEach-Object { $testname = "$(Resolve-Path $_.Directory -Relative)" $filename = "$(Resolve-Path $_ -Relative)" @@ -83,8 +83,8 @@ test_script: Add-AppveyorTest -Name $testname -Framework "xmake-test" -FileName $filename -Outcome None return @{ testname = $testname; filename = $filename; fullname = $fullname } } - - ps: $all_success = $true - - ps: |- + - pwsh: $all_success = $true + - pwsh: |- $tests | ForEach-Object { $testname = $_.testname $filename = $_.filename @@ -96,6 +96,6 @@ test_script: } 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!" } + - pwsh: Pop-Location + - pwsh: if ($all_success) { Write-Host "All tests passed!" } else { Write-Error "Some tests failed!" } |
