From 4b3c97edb9912c9dd94845ed206417fdaed8a98f Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Mon, 31 Jul 2023 12:39:09 -1000 Subject: [PATCH] APPVEYOR: Fix README.md update for Windows builds, add arch to artifacts --- appveyor.yml | 186 ++++++++++++++++++++++++++------------------------- 1 file changed, 94 insertions(+), 92 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 1b9c9c3e..4867f872 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,95 +1,97 @@ -image: +image: - macos-bigsur - Ubuntu1604 - - Visual Studio 2015 - -platform: - - x86 - -environment: - access_token: - secure: Me2UWjTL1G91AfTT9ruasivTMxtSO0SZbv3wIFRS2RygMiZhU8r9sSQ3a9QB7h70wnl2W2Cv8o1v0Z2hONpltyxKxlSP4OqXeIIIx0ssRMgg8rkm2qlDWcCzZur3tM4v - -matrix: - fast_finish: true - -cache: - - ../windows-build - -skip_commits: - files: - - doc/* - - '**/*.md' - - '**/*.txt' - -before_build: - - ps: | - $platform = uname -s - if ($platform -eq 'Linux') { - sudo apt-get update -yqqm - sudo apt-get install -ym gcc libpcap-dev libvdeplug-dev libpcre3-dev libedit-dev libsdl2-dev libpng-dev libsdl2-ttf-dev - } else { - if ($platform -eq 'Darwin') { - brew install vde pcre libedit sdl2 libpng zlib sdl2_ttf make - } - } - -build_script: - - cmd: | - "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" - echo Building with %NUMBER_OF_PROCESSORS% processors - cd "Visual Studio Projects" & vcbuild /M%NUMBER_OF_PROCESSORS% /useenv /rebuild simh.sln "Release|Win32" & cd .. - - ps: | - if ($isWindows) { - $platform = 'Windows' - $commit_id_file = 'Visual Studio Projects\.git-commit-id.h' - } else { - $platform = uname -s - if ($platform -eq 'Linux') { - $ncpus = nproc - $parallel = '-j' + $ncpus - Write-Host "Building with $ncpus processors" - } else { - $platform = 'macOS' - } - $commit_id_file = '.git-commit-id' - make QUIET=1 $parallel - } - -on_success: - - ps: | - $id_line = Select-String -Path $commit_id_file -Pattern 'SIM_GIT_COMMIT_ID' - $id = $id_line.Line.SubString($id_line.line.IndexOf("SIM_GIT_COMMIT_ID") + 18, 8) - $datetime = Get-Date -Format "yyyy-MM-dd_HH-mm-ss" - $version_major = (Select-String -Path 'sim_rev.h' -Pattern '#define\s+SIM_MAJOR\s+(\d+)').Matches.Groups[1].Value - $version_minor = (Select-String -Path 'sim_rev.h' -Pattern '#define\s+SIM_MINOR\s+(\d+)').Matches.Groups[1].Value - $version_mode = (Select-String -Path 'sim_rev.h' -Pattern '#define\s+SIM_VERSION_MODE\s+"(.+?)"').Matches.Groups[1].Value - - git config --global credential.helper store - - ps: Set-Content -Path "$HOME\.git-credentials" -Value "https://$($env:access_token):x-oauth-basic@github.com`n" -NoNewline - - git config --global credential.helper store - - git config --global user.email "mark@infocomm.com" - - git config --global user.name "Mark Pizzolato" - - git clone "https://github.com/simh/Development-Binaries" - - ps: | - cd Development-Binaries - $pkg_filename = "simh-$datetime-$platform-$version_major.$version_minor-$version_mode-$id" - if ($isWindows) { - $pkg_filename = $pkg_filename + '.zip' - Compress-Archive -Path ..\BIN\NT\Win32-Release\*.exe -DestinationPath "$pkg_filename" - } else { - $pkg_filename = $pkg_filename + '.tgz' - pushd ../BIN - tar -cvzf ../Development-Binaries/$pkg_filename --exclude=buildtools '--exclude=*-build' * - popd - } - "$platform Build results for simh Commit: https://github.com/simh/simh/commit/$id" | Out-File -FilePath ../pkg_commit_message -Encoding ascii - (Get-Content README.md) -replace ('(\['+$platform+' is here\]\(https\:\/\/github\.com\/simh\/Development-Binaries\/blob\/master\/)([a-zA-Z0-9._-]+)(.+\.)'),('$1'+$pkg_filename+'$3') | Out-File -FilePath README.md - - git add * - - git commit -F ../pkg_commit_message - - git push -u origin master - -notifications: - - provider: Email - to: - - Mark@infocomm.com + - Visual Studio 2015 + +platform: + - x86 + +environment: + access_token: + secure: Me2UWjTL1G91AfTT9ruasivTMxtSO0SZbv3wIFRS2RygMiZhU8r9sSQ3a9QB7h70wnl2W2Cv8o1v0Z2hONpltyxKxlSP4OqXeIIIx0ssRMgg8rkm2qlDWcCzZur3tM4v + +matrix: + fast_finish: true + +cache: + - ../windows-build + +skip_commits: + files: + - doc/* + - '**/*.md' + - '**/*.txt' + +before_build: + - ps: | + $platform = uname -s + if ($platform -eq 'Linux') { + sudo apt-get update -yqqm + sudo apt-get install -ym gcc libpcap-dev libvdeplug-dev libpcre3-dev libedit-dev libsdl2-dev libpng-dev libsdl2-ttf-dev + } else { + if ($platform -eq 'Darwin') { + brew install vde pcre libedit sdl2 libpng zlib sdl2_ttf make + } + } + +build_script: + - cmd: | + "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" + echo Building with %NUMBER_OF_PROCESSORS% processors + cd "Visual Studio Projects" & vcbuild /M%NUMBER_OF_PROCESSORS% /useenv /rebuild simh.sln "Release|Win32" & cd .. + - ps: | + if ($isWindows) { + $platform = 'Windows' + $arch = 'Win32' + $commit_id_file = 'Visual Studio Projects\.git-commit-id.h' + } else { + $platform = uname -s + $arch = arch + if ($platform -eq 'Linux') { + $ncpus = nproc + $parallel = '-j' + $ncpus + Write-Host "Building with $ncpus processors" + } else { + $platform = 'macOS' + } + $commit_id_file = '.git-commit-id' + make QUIET=1 $parallel + } + +on_success: + - ps: | + $id_line = Select-String -Path $commit_id_file -Pattern 'SIM_GIT_COMMIT_ID' + $id = $id_line.Line.SubString($id_line.line.IndexOf("SIM_GIT_COMMIT_ID") + 18, 8) + $datetime = Get-Date -Format "yyyy-MM-dd_HH-mm-ss" + $version_major = (Select-String -Path 'sim_rev.h' -Pattern '#define\s+SIM_MAJOR\s+(\d+)').Matches.Groups[1].Value + $version_minor = (Select-String -Path 'sim_rev.h' -Pattern '#define\s+SIM_MINOR\s+(\d+)').Matches.Groups[1].Value + $version_mode = (Select-String -Path 'sim_rev.h' -Pattern '#define\s+SIM_VERSION_MODE\s+"(.+?)"').Matches.Groups[1].Value + - git config --global credential.helper store + - ps: Set-Content -Path "$HOME\.git-credentials" -Value "https://$($env:access_token):x-oauth-basic@github.com`n" -NoNewline + - git config --global credential.helper store + - git config --global user.email "mark@infocomm.com" + - git config --global user.name "Mark Pizzolato" + - git clone "https://github.com/simh/Development-Binaries" + - ps: | + cd Development-Binaries + $pkg_filename = "simh-$datetime-$platform-$arch-$version_major.$version_minor-$version_mode-$id" + if ($isWindows) { + $pkg_filename = $pkg_filename + '.zip' + Compress-Archive -Path ..\BIN\NT\Win32-Release\*.exe -DestinationPath "$pkg_filename" + } else { + $pkg_filename = $pkg_filename + '.tgz' + pushd ../BIN + tar -cvzf ../Development-Binaries/$pkg_filename --exclude=buildtools '--exclude=*-build' * + popd + } + "$platform Build results for simh Commit: https://github.com/simh/simh/commit/$id" | Out-File -FilePath ../pkg_commit_message -Encoding ascii + (Get-Content README.md) -replace ('(\['+$platform+' is here\]\(https\:\/\/github\.com\/simh\/Development-Binaries\/blob\/master\/)([a-zA-Z0-9._-]+)(.+\.)'),('$1'+$pkg_filename+'$3') | Out-File -FilePath README.md -Encoding ascii + - git add * + - git commit -F ../pkg_commit_message + - git push -u origin master + +notifications: + - provider: Email + to: + - Mark@infocomm.com on_build_success: false \ No newline at end of file