From 064aa6775db69386e4c6fd1988d4e62086674d84 Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Sun, 4 Oct 2020 21:15:35 +0200 Subject: [PATCH 01/26] Appveyor using build cache for ProxSpace --- appveyor.yml | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index d5ef4ac7f..f261e2b15 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,8 @@ version: 3.0.1.{build} image: Visual Studio 2019 clone_folder: C:\ProxSpace\pm3\proxmark +cache: + - C:\cache environment: proxspace_url: https://github.com/Gator96100/ProxSpace/archive/master.zip proxspace_zip_file: \proxspace.zip @@ -101,17 +103,7 @@ clone_script: Write-Host "[ OK ]" -ForegroundColor Green } - Write-Host "ProxSpace: Removing folder..." -NoNewLine - $PSInstallTime=[System.Environment]::TickCount - - cd \ - - Remove-Item -Recurse -Force -Path $env:proxspace_path - - Write-Host "[ OK ]" -ForegroundColor Green - - Receive-Job -Job $WSLjob Write-Host "ProxSpace: downloading..." -NoNewLine @@ -137,6 +129,12 @@ clone_script: Get-ChildItem -Path "\$env:proxspace_zip_folder_name" | Rename-Item -NewName (Split-Path $env:proxspace_path -Leaf) + Write-Host "[ OK ]" -ForegroundColor Gree + + Write-Host "ProxSpace: move cache..." -NoNewLine + + Move-Item -Path "C:\cache" -Destination "$env:proxspace_path\msys2\var\chache" + Write-Host "[ OK ]" -ForegroundColor Gree ExecUpdate "ProxSpace: initial msys2 startup..." $true @@ -152,8 +150,6 @@ clone_script: GitClone "ProxSpace: Cloning repository <$env:appveyor_repo_name> to $env:appveyor_build_folder ..." $env:appveyor_build_folder - Receive-Job -Wait -Job $WSLjob - GitClone "WSL: Cloning repository <$env:appveyor_repo_name> to $env:wsl_git_path ..." $env:wsl_git_path @@ -202,6 +198,9 @@ build_script: throw "Tests error." } } + + #WSL: wait for installation to finish + Receive-Job -Wait -Name WSLInstall #Windows Subsystem for Linux (WSL) Write-Host "---------- WSL make ----------" -ForegroundColor Yellow @@ -276,6 +275,14 @@ build_script: ExecCheck "PS cmake Tests" + Write-Host "ProxSpace: create new cache..." -NoNewLine + + ExecMinGWCmd 'yes | pacman -Sc > /dev/null 2>&1' + + Move-Item -Path "$env:proxspace_path\msys2\var\chache" -Destination "C:\cache" + + Write-Host "[ OK ]" -ForegroundColor Gree + Receive-Job -Wait -Job $WSLjob From c2799c528ab5ea0ecfc2b8044f062fed7e12fb78 Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Sun, 4 Oct 2020 21:23:45 +0200 Subject: [PATCH 02/26] Appveyor continue if cache does not exist --- appveyor.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index f261e2b15..ef07fd286 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -103,7 +103,15 @@ clone_script: Write-Host "[ OK ]" -ForegroundColor Green } + Write-Host "ProxSpace: Removing folder..." -NoNewLine + $PSInstallTime=[System.Environment]::TickCount + + cd \ + + Remove-Item -Recurse -Force -Path $env:proxspace_path -ErrorAction SilentlyContinue + + Write-Host "[ OK ]" -ForegroundColor Green Write-Host "ProxSpace: downloading..." -NoNewLine @@ -133,7 +141,7 @@ clone_script: Write-Host "ProxSpace: move cache..." -NoNewLine - Move-Item -Path "C:\cache" -Destination "$env:proxspace_path\msys2\var\chache" + Move-Item -Path "C:\cache" -Destination "$env:proxspace_path\msys2\var\chache" -ErrorAction SilentlyContinue Write-Host "[ OK ]" -ForegroundColor Gree From 16dd79e5fd22e41feefb132750fe2622d758c38b Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Sun, 4 Oct 2020 22:01:57 +0200 Subject: [PATCH 03/26] Appveyor create cache even if build fails --- appveyor.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index ef07fd286..3d533492c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -147,8 +147,7 @@ clone_script: ExecUpdate "ProxSpace: initial msys2 startup..." $true - ExecUpdate "ProxSpace: installing required packages..." $false - + ExecUpdate "ProxSpace: installing required packages..." $false $psversion = (Select-String -Pattern 'PSVERSION=' -SimpleMatch -Path "$env:proxspace_path\msys2\ps\09-proxspace_setup.post").Line.Split("""")[1] @@ -241,6 +240,14 @@ build_script: #ProxSpace + Write-Host "ProxSpace: create new cache..." -NoNewLine + + ExecMinGWCmd 'yes | pacman -Sc > /dev/null 2>&1' + + Move-Item -Path "$env:proxspace_path\msys2\var\chache" -Destination "C:\cache" + + Write-Host "[ OK ]" -ForegroundColor Gree + Write-Host "---------- PS make ----------" -ForegroundColor Yellow $TestTime=[System.Environment]::TickCount @@ -283,14 +290,6 @@ build_script: ExecCheck "PS cmake Tests" - Write-Host "ProxSpace: create new cache..." -NoNewLine - - ExecMinGWCmd 'yes | pacman -Sc > /dev/null 2>&1' - - Move-Item -Path "$env:proxspace_path\msys2\var\chache" -Destination "C:\cache" - - Write-Host "[ OK ]" -ForegroundColor Gree - Receive-Job -Wait -Job $WSLjob From 42c3be5a34dee1663a14b80c855e4e125205eb2b Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Sun, 4 Oct 2020 22:17:37 +0200 Subject: [PATCH 04/26] typo --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 3d533492c..00803b339 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -141,7 +141,7 @@ clone_script: Write-Host "ProxSpace: move cache..." -NoNewLine - Move-Item -Path "C:\cache" -Destination "$env:proxspace_path\msys2\var\chache" -ErrorAction SilentlyContinue + Move-Item -Path "C:\cache" -Destination "$env:proxspace_path\msys2\var\cache" -ErrorAction SilentlyContinue Write-Host "[ OK ]" -ForegroundColor Gree @@ -244,7 +244,7 @@ build_script: ExecMinGWCmd 'yes | pacman -Sc > /dev/null 2>&1' - Move-Item -Path "$env:proxspace_path\msys2\var\chache" -Destination "C:\cache" + Move-Item -Path "$env:proxspace_path\msys2\var\cache" -Destination "C:\cache" Write-Host "[ OK ]" -ForegroundColor Gree From 9b801434e90be001f457a52787519bd8153591d2 Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Sun, 4 Oct 2020 22:51:01 +0200 Subject: [PATCH 05/26] Appveyor test --- appveyor.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 00803b339..ecf85de1b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -71,6 +71,11 @@ clone_script: } } + Function ExecMinGWCmd($Cmd) { + cd $env:proxspace_path + ./runme64.bat -c "$Cmd" + } + $WSLjob = Start-Job -Name WSLInstall -ScriptBlock { Function WSLExec($Text, $Cmd) { Write-Host "$Text" @@ -145,9 +150,13 @@ clone_script: Write-Host "[ OK ]" -ForegroundColor Gree - ExecUpdate "ProxSpace: initial msys2 startup..." $true + #ExecUpdate "ProxSpace: initial msys2 startup..." $true - ExecUpdate "ProxSpace: installing required packages..." $false + ExecMinGWCmd exit + + ExecMinGWCmd exit + + #ExecUpdate "ProxSpace: installing required packages..." $false $psversion = (Select-String -Pattern 'PSVERSION=' -SimpleMatch -Path "$env:proxspace_path\msys2\ps\09-proxspace_setup.post").Line.Split("""")[1] From c315e7b30bb3ef32d2fdf1b138200979a95363a8 Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Sun, 4 Oct 2020 23:17:44 +0200 Subject: [PATCH 06/26] Appveyor use ScriptBlock for ProxSpace install --- appveyor.yml | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index ecf85de1b..3cb87d2be 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -38,29 +38,38 @@ clone_script: Function ExecUpdate($Text, $firstStart) { Write-Host "$Text" - Start-Process "cmd.exe" "/c ""cd /D $env:proxspace_path && runme64.bat -c ""exit""""" + + $PSjob = Start-Job -Name PSInstall -ScriptBlock { + cd $env:proxspace_path + ./runme64.bat -c "exit" + } + $StartTime=[System.Environment]::TickCount Start-Sleep -s 10 - while($true) { - $cmdprocess = Get-Process "cmd" -ErrorAction SilentlyContinue - - if (!$cmdprocess -Or $cmdprocess.HasExited) { + while($true) { + if ($PSjob.State -eq 'Completed') { Write-Host "$Text" -NoNewLine Write-Host "[ OK ]" -ForegroundColor Green break } + if ($PSjob.State -eq 'Failed') { + Write-Host "$Text" -NoNewLine + Write-Host "[ Failed ]" -ForegroundColor Red + break + } + if ($firstStart -And (Test-Path "$env:proxspace_path\msys2\etc\pacman.conf.pacnew")) { Start-Sleep -s 5 - $tmp = $cmdprocess.CloseMainWindow() + Stop-Job -Job $PSjob Start-Sleep -s 5 - Stop-Process -Name "cmd" -Force -ErrorAction SilentlyContinue Write-Host "$Text" -NoNewLine Write-Host "Exit by pacman.conf" -ForegroundColor Green break } if ([System.Environment]::TickCount-$StartTime -gt 1000000) { + Stop-Job -Job $PSjob Write-Host "$Text" -NoNewLine Write-host "Exit by timeout" -ForegroundColor Yellow break @@ -69,11 +78,8 @@ clone_script: Start-Sleep -s 5 Receive-Job -Job $WSLjob } - } - - Function ExecMinGWCmd($Cmd) { - cd $env:proxspace_path - ./runme64.bat -c "$Cmd" + + Receive-Job -Wait -Job $PSjob } $WSLjob = Start-Job -Name WSLInstall -ScriptBlock { @@ -150,13 +156,9 @@ clone_script: Write-Host "[ OK ]" -ForegroundColor Gree - #ExecUpdate "ProxSpace: initial msys2 startup..." $true + ExecUpdate "ProxSpace: initial msys2 startup..." $true - ExecMinGWCmd exit - - ExecMinGWCmd exit - - #ExecUpdate "ProxSpace: installing required packages..." $false + ExecUpdate "ProxSpace: installing required packages..." $false $psversion = (Select-String -Pattern 'PSVERSION=' -SimpleMatch -Path "$env:proxspace_path\msys2\ps\09-proxspace_setup.post").Line.Split("""")[1] From 19462c124f1263d135e956cc5737cac0a31caeba Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Sun, 4 Oct 2020 23:33:35 +0200 Subject: [PATCH 07/26] Removed debug output --- appveyor.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 3cb87d2be..1dfd8a762 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -78,8 +78,6 @@ clone_script: Start-Sleep -s 5 Receive-Job -Job $WSLjob } - - Receive-Job -Wait -Job $PSjob } $WSLjob = Start-Job -Name WSLInstall -ScriptBlock { From b3c85dc0ab53b7fa59ef230f342d5f420d0c6de7 Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Sun, 4 Oct 2020 23:41:04 +0200 Subject: [PATCH 08/26] Appveyor save cache on failed build --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 1dfd8a762..5f19abdce 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,6 +10,7 @@ environment: proxspace_path: \ProxSpace proxspace_home_path: \ProxSpace\pm3 wsl_git_path: C:\proxmark + APPVEYOR_SAVE_CACHE_ON_ERROR: true init: - ps: >- From d1526a6fc7dc3e80c01084e362f5e2f83b15a096 Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Mon, 5 Oct 2020 00:18:07 +0200 Subject: [PATCH 09/26] Appveyor test --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index 5f19abdce..6bec35c00 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -79,6 +79,7 @@ clone_script: Start-Sleep -s 5 Receive-Job -Job $WSLjob } + Receive-Job -Wait -Job $PSjob } $WSLjob = Start-Job -Name WSLInstall -ScriptBlock { From 3efa218cbf230ce4251daced8a77e65fcf14b7e5 Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Mon, 5 Oct 2020 00:31:45 +0200 Subject: [PATCH 10/26] Copy cache instead of moving --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 6bec35c00..16aa2e7b9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -152,7 +152,7 @@ clone_script: Write-Host "ProxSpace: move cache..." -NoNewLine - Move-Item -Path "C:\cache" -Destination "$env:proxspace_path\msys2\var\cache" -ErrorAction SilentlyContinue + Copy-Item -Path "C:\cache\*" -Destination "$env:proxspace_path\msys2\var\cache\pacman\pkg" -Recurse -Force -ErrorAction SilentlyContinue Write-Host "[ OK ]" -ForegroundColor Gree @@ -255,7 +255,7 @@ build_script: ExecMinGWCmd 'yes | pacman -Sc > /dev/null 2>&1' - Move-Item -Path "$env:proxspace_path\msys2\var\cache" -Destination "C:\cache" + Copy-Item -Path "$env:proxspace_path\msys2\var\cache\pacman\pkg\*" -Destination "C:\cache" -Recurse -Force Write-Host "[ OK ]" -ForegroundColor Gree From 7a62e7d90fb6fe58ce0a295317849ef877f38b6a Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Mon, 5 Oct 2020 01:05:41 +0200 Subject: [PATCH 11/26] Clean cache on appveyor.yml changes --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 16aa2e7b9..be92483f0 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,7 +2,7 @@ version: 3.0.1.{build} image: Visual Studio 2019 clone_folder: C:\ProxSpace\pm3\proxmark cache: - - C:\cache + - C:\cache -> appveyor.yml environment: proxspace_url: https://github.com/Gator96100/ProxSpace/archive/master.zip proxspace_zip_file: \proxspace.zip From b629e3550caf17e7aee89d8bff8b7777837964f3 Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Mon, 5 Oct 2020 01:32:45 +0200 Subject: [PATCH 12/26] Tests --- appveyor.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index be92483f0..e1f66c9df 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -152,6 +152,8 @@ clone_script: Write-Host "ProxSpace: move cache..." -NoNewLine + Get-ChildItem C:\cache + Copy-Item -Path "C:\cache\*" -Destination "$env:proxspace_path\msys2\var\cache\pacman\pkg" -Recurse -Force -ErrorAction SilentlyContinue Write-Host "[ OK ]" -ForegroundColor Gree @@ -255,8 +257,12 @@ build_script: ExecMinGWCmd 'yes | pacman -Sc > /dev/null 2>&1' + Remove-Item -Recurse -Force -Path "C:\cache\*" -ErrorAction SilentlyContinue + Copy-Item -Path "$env:proxspace_path\msys2\var\cache\pacman\pkg\*" -Destination "C:\cache" -Recurse -Force + Get-ChildItem C:\cache + Write-Host "[ OK ]" -ForegroundColor Gree Write-Host "---------- PS make ----------" -ForegroundColor Yellow From 79595769967f0c4e35353dbad9b2c3a4a5fb0796 Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Mon, 5 Oct 2020 01:35:10 +0200 Subject: [PATCH 13/26] Tests --- appveyor.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index e1f66c9df..ea6d318d4 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,7 +7,7 @@ environment: proxspace_url: https://github.com/Gator96100/ProxSpace/archive/master.zip proxspace_zip_file: \proxspace.zip proxspace_zip_folder_name: ProxSpace-* - proxspace_path: \ProxSpace + proxspace_path: C:\ProxSpace proxspace_home_path: \ProxSpace\pm3 wsl_git_path: C:\proxmark APPVEYOR_SAVE_CACHE_ON_ERROR: true @@ -156,6 +156,8 @@ clone_script: Copy-Item -Path "C:\cache\*" -Destination "$env:proxspace_path\msys2\var\cache\pacman\pkg" -Recurse -Force -ErrorAction SilentlyContinue + Get-ChildItem $env:proxspace_path\msys2\var\cache\pacman\pkg + Write-Host "[ OK ]" -ForegroundColor Gree ExecUpdate "ProxSpace: initial msys2 startup..." $true From b833ea5e75d15394f40c2b9d39b6acd558449401 Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Mon, 5 Oct 2020 01:58:48 +0200 Subject: [PATCH 14/26] Tests --- appveyor.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index ea6d318d4..7e25e82e7 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -152,10 +152,12 @@ clone_script: Write-Host "ProxSpace: move cache..." -NoNewLine - Get-ChildItem C:\cache + Get-ChildItem "C:\cache" Copy-Item -Path "C:\cache\*" -Destination "$env:proxspace_path\msys2\var\cache\pacman\pkg" -Recurse -Force -ErrorAction SilentlyContinue + Get-ChildItem "C:\cache" + Get-ChildItem $env:proxspace_path\msys2\var\cache\pacman\pkg Write-Host "[ OK ]" -ForegroundColor Gree @@ -181,6 +183,8 @@ build_script: $pmfolder = Split-Path $env:appveyor_build_folder -Leaf + Get-ChildItem "C:\cache" + Function ExecMinGWCmd($Cmd) { cd $env:proxspace_path ./runme64.bat -c "cd $pmfolder && $Cmd" @@ -257,13 +261,17 @@ build_script: Write-Host "ProxSpace: create new cache..." -NoNewLine + Get-ChildItem "$env:proxspace_path\msys2\var\cache\pacman\pkg\" + ExecMinGWCmd 'yes | pacman -Sc > /dev/null 2>&1' Remove-Item -Recurse -Force -Path "C:\cache\*" -ErrorAction SilentlyContinue Copy-Item -Path "$env:proxspace_path\msys2\var\cache\pacman\pkg\*" -Destination "C:\cache" -Recurse -Force - Get-ChildItem C:\cache + Get-ChildItem "C:\cache" + + Get-ChildItem "$env:proxspace_path\msys2\var\cache\pacman\pkg\" Write-Host "[ OK ]" -ForegroundColor Gree From 504ba622e3db319e84896dac803e012dea1664e5 Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Mon, 5 Oct 2020 01:59:52 +0200 Subject: [PATCH 15/26] Tests --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 7e25e82e7..a87815baf 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,7 +2,7 @@ version: 3.0.1.{build} image: Visual Studio 2019 clone_folder: C:\ProxSpace\pm3\proxmark cache: - - C:\cache -> appveyor.yml + - C:\cache environment: proxspace_url: https://github.com/Gator96100/ProxSpace/archive/master.zip proxspace_zip_file: \proxspace.zip From 30a770cfdc2915924acc43b27fd775579ad56172 Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Mon, 5 Oct 2020 02:24:46 +0200 Subject: [PATCH 16/26] Tests --- appveyor.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index a87815baf..4ffcadf1a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -152,13 +152,11 @@ clone_script: Write-Host "ProxSpace: move cache..." -NoNewLine - Get-ChildItem "C:\cache" + Copy-Item -Path "C:\cache\*" -Destination "$env:proxspace_path\msys2\var\cache\pacman\pkg" -Recurse -Force - Copy-Item -Path "C:\cache\*" -Destination "$env:proxspace_path\msys2\var\cache\pacman\pkg" -Recurse -Force -ErrorAction SilentlyContinue + Get-ChildItem "C:\cache\" - Get-ChildItem "C:\cache" - - Get-ChildItem $env:proxspace_path\msys2\var\cache\pacman\pkg + Get-ChildItem "$env:proxspace_path\msys2\var\cache\pacman\pkg\" Write-Host "[ OK ]" -ForegroundColor Gree @@ -176,6 +174,10 @@ clone_script: GitClone "WSL: Cloning repository <$env:appveyor_repo_name> to $env:wsl_git_path ..." $env:wsl_git_path + Get-ChildItem "C:\cache\" + + Get-ChildItem "$env:proxspace_path\msys2\var\cache\pacman\pkg\" + install: build_script: @@ -261,15 +263,17 @@ build_script: Write-Host "ProxSpace: create new cache..." -NoNewLine - Get-ChildItem "$env:proxspace_path\msys2\var\cache\pacman\pkg\" - ExecMinGWCmd 'yes | pacman -Sc > /dev/null 2>&1' - Remove-Item -Recurse -Force -Path "C:\cache\*" -ErrorAction SilentlyContinue + #Remove-Item -Recurse -Force -Path "C:\cache\*" -ErrorAction SilentlyContinue + + Get-ChildItem "C:\cache\" + + Get-ChildItem "$env:proxspace_path\msys2\var\cache\pacman\pkg\" Copy-Item -Path "$env:proxspace_path\msys2\var\cache\pacman\pkg\*" -Destination "C:\cache" -Recurse -Force - Get-ChildItem "C:\cache" + Get-ChildItem "C:\cache\" Get-ChildItem "$env:proxspace_path\msys2\var\cache\pacman\pkg\" From f09403bae596972a0c9558cbe1ff59002f7c292c Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Mon, 5 Oct 2020 03:23:02 +0200 Subject: [PATCH 17/26] WIP --- appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index 4ffcadf1a..4e31c1832 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -271,6 +271,8 @@ build_script: Get-ChildItem "$env:proxspace_path\msys2\var\cache\pacman\pkg\" + New-Item -ItemType Directory -Force -Path "C:\cache" + Copy-Item -Path "$env:proxspace_path\msys2\var\cache\pacman\pkg\*" -Destination "C:\cache" -Recurse -Force Get-ChildItem "C:\cache\" From 3d0449a63a0f98e570feb7bb2e00ba840ef8069a Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Mon, 5 Oct 2020 04:06:45 +0200 Subject: [PATCH 18/26] WIP --- appveyor.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 4e31c1832..b3db4b210 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,7 +2,7 @@ version: 3.0.1.{build} image: Visual Studio 2019 clone_folder: C:\ProxSpace\pm3\proxmark cache: - - C:\cache + - C:\cache -> appveyor.yml environment: proxspace_url: https://github.com/Gator96100/ProxSpace/archive/master.zip proxspace_zip_file: \proxspace.zip @@ -152,7 +152,7 @@ clone_script: Write-Host "ProxSpace: move cache..." -NoNewLine - Copy-Item -Path "C:\cache\*" -Destination "$env:proxspace_path\msys2\var\cache\pacman\pkg" -Recurse -Force + Move-Item -Path "C:\cache" -Destination "$env:proxspace_path\msys2\var\cache" -Force Get-ChildItem "C:\cache\" @@ -265,15 +265,11 @@ build_script: ExecMinGWCmd 'yes | pacman -Sc > /dev/null 2>&1' - #Remove-Item -Recurse -Force -Path "C:\cache\*" -ErrorAction SilentlyContinue - Get-ChildItem "C:\cache\" - Get-ChildItem "$env:proxspace_path\msys2\var\cache\pacman\pkg\" + Get-ChildItem "$env:proxspace_path\msys2\var\cache\pacman\pkg\" - New-Item -ItemType Directory -Force -Path "C:\cache" - - Copy-Item -Path "$env:proxspace_path\msys2\var\cache\pacman\pkg\*" -Destination "C:\cache" -Recurse -Force + Move-Item -Path "$env:proxspace_path\msys2\var\cache" -Destination "C:\cache" -Force Get-ChildItem "C:\cache\" From c94c17139a498092c835202d84b8ac01c9a3fef9 Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Mon, 5 Oct 2020 04:14:46 +0200 Subject: [PATCH 19/26] WIP --- appveyor.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b3db4b210..5012a9630 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,7 +2,7 @@ version: 3.0.1.{build} image: Visual Studio 2019 clone_folder: C:\ProxSpace\pm3\proxmark cache: - - C:\cache -> appveyor.yml + - C:\cache environment: proxspace_url: https://github.com/Gator96100/ProxSpace/archive/master.zip proxspace_zip_file: \proxspace.zip @@ -79,7 +79,6 @@ clone_script: Start-Sleep -s 5 Receive-Job -Job $WSLjob } - Receive-Job -Wait -Job $PSjob } $WSLjob = Start-Job -Name WSLInstall -ScriptBlock { From 786686cf8212c7f9ead485950f699af2ad3cab82 Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Mon, 5 Oct 2020 04:32:09 +0200 Subject: [PATCH 20/26] WIP --- appveyor.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 5012a9630..b6eae83f2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -153,7 +153,7 @@ clone_script: Move-Item -Path "C:\cache" -Destination "$env:proxspace_path\msys2\var\cache" -Force - Get-ChildItem "C:\cache\" + Get-ChildItem "C:\" Get-ChildItem "$env:proxspace_path\msys2\var\cache\pacman\pkg\" @@ -184,8 +184,6 @@ build_script: $pmfolder = Split-Path $env:appveyor_build_folder -Leaf - Get-ChildItem "C:\cache" - Function ExecMinGWCmd($Cmd) { cd $env:proxspace_path ./runme64.bat -c "cd $pmfolder && $Cmd" @@ -268,6 +266,8 @@ build_script: Get-ChildItem "$env:proxspace_path\msys2\var\cache\pacman\pkg\" + Remove-Item -Recurse -Force -Path C:\cache -ErrorAction SilentlyContinue + Move-Item -Path "$env:proxspace_path\msys2\var\cache" -Destination "C:\cache" -Force Get-ChildItem "C:\cache\" From fd6c8eb7d48a3f4934ddcc9674d91256d7353437 Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Mon, 5 Oct 2020 05:00:19 +0200 Subject: [PATCH 21/26] WIP --- appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index b6eae83f2..8a89d1c14 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -151,6 +151,8 @@ clone_script: Write-Host "ProxSpace: move cache..." -NoNewLine + "dummy" > C\cache\update_cache.txt + Move-Item -Path "C:\cache" -Destination "$env:proxspace_path\msys2\var\cache" -Force Get-ChildItem "C:\" From 3b8c54ad5227ff0dd8c8b4e4122b5711f59c0348 Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Mon, 5 Oct 2020 05:10:25 +0200 Subject: [PATCH 22/26] Appveyor cache fixes --- appveyor.yml | 141 +++++++++++++++++++++++++++------------------------ 1 file changed, 74 insertions(+), 67 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 8a89d1c14..71b2e709b 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -35,6 +35,78 @@ init: # iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) clone_script: +- ps: >- + + Function GitClone($Text, $Folder) { + Write-Host "$Text" -NoNewLine + if(-not $env:appveyor_pull_request_number) { + git clone -q --branch=$env:appveyor_repo_branch https://github.com/$env:appveyor_repo_name.git $Folder + cd $Folder + git checkout -qf $env:appveyor_repo_commit + } else { + git clone -q https://github.com/$env:appveyor_repo_name.git $Folder + cd $Folder + git fetch -q origin +refs/pull/$env:appveyor_pull_request_number/merge: + git checkout -qf FETCH_HEAD + } + Write-Host "[ OK ]" -ForegroundColor Green + } + + $WSLjob = Start-Job -Name WSLInstall -ScriptBlock { + Function WSLExec($Text, $Cmd) { + Write-Host "$Text" + wsl -- bash -c $Cmd + Write-Host "$Text" -NoNewLine + Write-Host "[ OK ]" -ForegroundColor Green + } + + $WSLInstallTime=[System.Environment]::TickCount + WSLExec "WSL update..." "sudo apt-get update 1>/dev/null" + WSLExec "WSL upgrade..." "sudo apt-get upgrade -y 1>/dev/null" + WSLExec "WSL cleanup..." "sudo apt-get auto-remove -y 1>/dev/null" + WSLExec "WSL install..." "sudo apt-get -y install --reinstall --no-install-recommends git ca-certificates build-essential pkg-config libreadline-dev gcc-arm-none-eabi libnewlib-dev libbz2-dev qtbase5-dev cmake 1>/dev/null" + WSLExec "WSL QT fix..." "sudo strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5" + Add-AppveyorMessage -Message "WSL setup took $(([System.Environment]::TickCount-$WSLInstallTime) / 1000) sec" -Category Information + } + + Write-Host "ProxSpace: Removing folder..." -NoNewLine + + Remove-Item -Recurse -Force -Path $env:proxspace_path -ErrorAction SilentlyContinue + + Write-Host "[ OK ]" -ForegroundColor Green + + Write-Host "ProxSpace: downloading..." -NoNewLine + + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 + + Invoke-WebRequest "$env:proxspace_url" -outfile "$env:proxspace_zip_file" + + Write-Host "[ OK ]" -ForegroundColor Green + + Write-Host "ProxSpace: extracting..." -NoNewLine + + Expand-Archive -LiteralPath "$env:proxspace_zip_file" -DestinationPath "\" + + Remove-Item "$env:proxspace_zip_file" + + Write-Host "[ OK ]" -ForegroundColor Green + + Write-Host "ProxSpace: renaming folder..." -NoNewLine + + Get-ChildItem -Path "\$env:proxspace_zip_folder_name" | Rename-Item -NewName (Split-Path $env:proxspace_path -Leaf) + + Write-Host "[ OK ]" -ForegroundColor Gree + + $psversion = (Select-String -Pattern 'PSVERSION=' -SimpleMatch -Path "$env:proxspace_path\msys2\ps\09-proxspace_setup.post").Line.Split("""")[1] + + Write-Host "ProxSpace version: $psversion" -ForegroundColor Yellow + + GitClone "ProxSpace: Cloning repository <$env:appveyor_repo_name> to $env:appveyor_build_folder ..." $env:appveyor_build_folder + + GitClone "WSL: Cloning repository <$env:appveyor_repo_name> to $env:wsl_git_path ..." $env:wsl_git_path + + +install: - ps: >- Function ExecUpdate($Text, $firstStart) { @@ -77,27 +149,10 @@ clone_script: } Start-Sleep -s 5 - Receive-Job -Job $WSLjob + Receive-Job -Name WSLInstall } } - $WSLjob = Start-Job -Name WSLInstall -ScriptBlock { - Function WSLExec($Text, $Cmd) { - Write-Host "$Text" - wsl -- bash -c $Cmd - Write-Host "$Text" -NoNewLine - Write-Host "[ OK ]" -ForegroundColor Green - } - - $WSLInstallTime=[System.Environment]::TickCount - WSLExec "WSL update..." "sudo apt-get update 1>/dev/null" - WSLExec "WSL upgrade..." "sudo apt-get upgrade -y 1>/dev/null" - WSLExec "WSL cleanup..." "sudo apt-get auto-remove -y 1>/dev/null" - WSLExec "WSL install..." "sudo apt-get -y install --reinstall --no-install-recommends git ca-certificates build-essential pkg-config libreadline-dev gcc-arm-none-eabi libnewlib-dev libbz2-dev qtbase5-dev cmake 1>/dev/null" - WSLExec "WSL QT fix..." "sudo strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5" - Add-AppveyorMessage -Message "WSL setup took $(([System.Environment]::TickCount-$WSLInstallTime) / 1000) sec" -Category Information - } - Function GitClone($Text, $Folder) { Write-Host "$Text" -NoNewLine if(-not $env:appveyor_pull_request_number) { @@ -113,46 +168,12 @@ clone_script: Write-Host "[ OK ]" -ForegroundColor Green } - Write-Host "ProxSpace: Removing folder..." -NoNewLine - $PSInstallTime=[System.Environment]::TickCount - cd \ - - Remove-Item -Recurse -Force -Path $env:proxspace_path -ErrorAction SilentlyContinue - - Write-Host "[ OK ]" -ForegroundColor Green - - Write-Host "ProxSpace: downloading..." -NoNewLine - - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 - - Invoke-WebRequest "$env:proxspace_url" -outfile "$env:proxspace_zip_file" - - Write-Host "[ OK ]" -ForegroundColor Green - - Receive-Job -Job $WSLjob - - Write-Host "ProxSpace: extracting..." -NoNewLine - - Expand-Archive -LiteralPath "$env:proxspace_zip_file" -DestinationPath "\" - - Remove-Item "$env:proxspace_zip_file" - - Write-Host "[ OK ]" -ForegroundColor Green - - Receive-Job -Job $WSLjob - - Write-Host "ProxSpace: renaming folder..." -NoNewLine - - Get-ChildItem -Path "\$env:proxspace_zip_folder_name" | Rename-Item -NewName (Split-Path $env:proxspace_path -Leaf) - Write-Host "[ OK ]" -ForegroundColor Gree Write-Host "ProxSpace: move cache..." -NoNewLine - "dummy" > C\cache\update_cache.txt - Move-Item -Path "C:\cache" -Destination "$env:proxspace_path\msys2\var\cache" -Force Get-ChildItem "C:\" @@ -163,24 +184,10 @@ clone_script: ExecUpdate "ProxSpace: initial msys2 startup..." $true - ExecUpdate "ProxSpace: installing required packages..." $false - - $psversion = (Select-String -Pattern 'PSVERSION=' -SimpleMatch -Path "$env:proxspace_path\msys2\ps\09-proxspace_setup.post").Line.Split("""")[1] - - Write-Host "ProxSpace version: $psversion" -ForegroundColor Yellow + ExecUpdate "ProxSpace: installing required packages..." $false Add-AppveyorMessage -Message "ProxSpace download and update took $(([System.Environment]::TickCount-$PSInstallTime) / 1000) sec" -Category Information - - GitClone "ProxSpace: Cloning repository <$env:appveyor_repo_name> to $env:appveyor_build_folder ..." $env:appveyor_build_folder - - GitClone "WSL: Cloning repository <$env:appveyor_repo_name> to $env:wsl_git_path ..." $env:wsl_git_path - - Get-ChildItem "C:\cache\" - - Get-ChildItem "$env:proxspace_path\msys2\var\cache\pacman\pkg\" - -install: build_script: - ps: >- From 585781ad089d8d64c7b3aa52e18979927c4f541a Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Mon, 5 Oct 2020 05:14:34 +0200 Subject: [PATCH 23/26] Appveyor cleanup --- appveyor.yml | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 71b2e709b..da2ade65a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -9,6 +9,7 @@ environment: proxspace_zip_folder_name: ProxSpace-* proxspace_path: C:\ProxSpace proxspace_home_path: \ProxSpace\pm3 + proxspace_cache_path: C:\cache wsl_git_path: C:\proxmark APPVEYOR_SAVE_CACHE_ON_ERROR: true @@ -71,6 +72,8 @@ clone_script: Write-Host "ProxSpace: Removing folder..." -NoNewLine + cd \ + Remove-Item -Recurse -Force -Path $env:proxspace_path -ErrorAction SilentlyContinue Write-Host "[ OK ]" -ForegroundColor Green @@ -174,11 +177,7 @@ install: Write-Host "ProxSpace: move cache..." -NoNewLine - Move-Item -Path "C:\cache" -Destination "$env:proxspace_path\msys2\var\cache" -Force - - Get-ChildItem "C:\" - - Get-ChildItem "$env:proxspace_path\msys2\var\cache\pacman\pkg\" + Move-Item -Path "$env:proxspace_cache_path" -Destination "$env:proxspace_path\msys2\var\cache" -Force Write-Host "[ OK ]" -ForegroundColor Gree @@ -271,17 +270,9 @@ build_script: ExecMinGWCmd 'yes | pacman -Sc > /dev/null 2>&1' - Get-ChildItem "C:\cache\" + Remove-Item -Recurse -Force -Path "$env:proxspace_cache_path" -ErrorAction SilentlyContinue - Get-ChildItem "$env:proxspace_path\msys2\var\cache\pacman\pkg\" - - Remove-Item -Recurse -Force -Path C:\cache -ErrorAction SilentlyContinue - - Move-Item -Path "$env:proxspace_path\msys2\var\cache" -Destination "C:\cache" -Force - - Get-ChildItem "C:\cache\" - - Get-ChildItem "$env:proxspace_path\msys2\var\cache\pacman\pkg\" + Move-Item -Path "$env:proxspace_path\msys2\var\cache" -Destination "$env:proxspace_cache_path" -Force Write-Host "[ OK ]" -ForegroundColor Gree From bebdf6dc2751842481195a34c66349bde3012773 Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Mon, 5 Oct 2020 05:21:56 +0200 Subject: [PATCH 24/26] Tests --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index da2ade65a..329bf74c6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -173,12 +173,12 @@ install: $PSInstallTime=[System.Environment]::TickCount - Write-Host "[ OK ]" -ForegroundColor Gree - Write-Host "ProxSpace: move cache..." -NoNewLine Move-Item -Path "$env:proxspace_cache_path" -Destination "$env:proxspace_path\msys2\var\cache" -Force + Get-ChildItem "$env:proxspace_path\msys2\var\cache\pacman\pkg\" + Write-Host "[ OK ]" -ForegroundColor Gree ExecUpdate "ProxSpace: initial msys2 startup..." $true From 656f7dd580dc4cc7ca9d0707365670fe14b15222 Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Mon, 5 Oct 2020 05:30:21 +0200 Subject: [PATCH 25/26] Appveyor cleanup --- appveyor.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 329bf74c6..815c4fab1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,7 +2,7 @@ version: 3.0.1.{build} image: Visual Studio 2019 clone_folder: C:\ProxSpace\pm3\proxmark cache: - - C:\cache + - C:\cache -> appveyor.yml environment: proxspace_url: https://github.com/Gator96100/ProxSpace/archive/master.zip proxspace_zip_file: \proxspace.zip @@ -70,6 +70,8 @@ clone_script: Add-AppveyorMessage -Message "WSL setup took $(([System.Environment]::TickCount-$WSLInstallTime) / 1000) sec" -Category Information } + $env:PSInstallTime=[System.Environment]::TickCount + Write-Host "ProxSpace: Removing folder..." -NoNewLine cd \ @@ -171,21 +173,17 @@ install: Write-Host "[ OK ]" -ForegroundColor Green } - $PSInstallTime=[System.Environment]::TickCount - Write-Host "ProxSpace: move cache..." -NoNewLine Move-Item -Path "$env:proxspace_cache_path" -Destination "$env:proxspace_path\msys2\var\cache" -Force - Get-ChildItem "$env:proxspace_path\msys2\var\cache\pacman\pkg\" - Write-Host "[ OK ]" -ForegroundColor Gree ExecUpdate "ProxSpace: initial msys2 startup..." $true ExecUpdate "ProxSpace: installing required packages..." $false - Add-AppveyorMessage -Message "ProxSpace download and update took $(([System.Environment]::TickCount-$PSInstallTime) / 1000) sec" -Category Information + Add-AppveyorMessage -Message "ProxSpace download and update took $(([System.Environment]::TickCount-$env:PSInstallTime) / 1000) sec" -Category Information build_script: - ps: >- From 82806379ce946fd177afc33e5a2b9eec8b816f61 Mon Sep 17 00:00:00 2001 From: Gator96100 Date: Mon, 5 Oct 2020 05:33:39 +0200 Subject: [PATCH 26/26] Fix --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 815c4fab1..8586bb48a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -175,7 +175,7 @@ install: Write-Host "ProxSpace: move cache..." -NoNewLine - Move-Item -Path "$env:proxspace_cache_path" -Destination "$env:proxspace_path\msys2\var\cache" -Force + Move-Item -Path "$env:proxspace_cache_path" -Destination "$env:proxspace_path\msys2\var\cache" -Force -ErrorAction SilentlyContinue Write-Host "[ OK ]" -ForegroundColor Gree