1
0
mirror of https://github.com/simh/simh.git synced 2026-04-18 08:57:25 +00:00

APPVEYOR: Build on earlier OS versions to extend pre-built binary compatibility

This commit is contained in:
Mark Pizzolato
2023-07-27 06:33:14 -10:00
parent 63028863e4
commit 86d365d42b

View File

@@ -1,90 +1,95 @@
image: image:
- macos-monterey # - macos-monterey
- Ubuntu2004 - Ubuntu2004
- Visual Studio 2015 # - Visual Studio 2015
platform: platform:
- x86 - x86
environment: environment:
access_token: access_token:
secure: Me2UWjTL1G91AfTT9ruasivTMxtSO0SZbv3wIFRS2RygMiZhU8r9sSQ3a9QB7h70wnl2W2Cv8o1v0Z2hONpltyxKxlSP4OqXeIIIx0ssRMgg8rkm2qlDWcCzZur3tM4v secure: Me2UWjTL1G91AfTT9ruasivTMxtSO0SZbv3wIFRS2RygMiZhU8r9sSQ3a9QB7h70wnl2W2Cv8o1v0Z2hONpltyxKxlSP4OqXeIIIx0ssRMgg8rkm2qlDWcCzZur3tM4v
matrix: matrix:
fast_finish: true fast_finish: true
cache: cache:
- ../windows-build - ../windows-build
skip_commits: skip_commits:
files: files:
- doc/* - doc/*
- '**/*.md' - '**/*.md'
- '**/*.txt' - '**/*.txt'
before_build: before_build:
- ps: | - ps: |
$platform = uname -s $platform = uname -s
if ($platform -eq 'Linux') { if ($platform -eq 'Linux') {
sudo apt-get update -yqqm 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 sudo apt-get install -ym gcc libpcap-dev libvdeplug-dev libpcre3-dev libedit-dev libsdl2-dev libpng-dev libsdl2-ttf-dev
} else { } else {
if ($platform -eq 'Darwin') { if ($platform -eq 'Darwin') {
brew install vde pcre libedit sdl2 libpng zlib sdl2_ttf make brew install vde pcre libedit sdl2 libpng zlib sdl2_ttf make
} }
} }
build_script: build_script:
- cmd: | - cmd: |
"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
cd "Visual Studio Projects" & vcbuild /M%NUMBER_OF_PROCESSORS% /useenv /rebuild simh.sln "Release|Win32" & cd .. echo Building with %NUMBER_OF_PROCESSORS% processors
- ps: | cd "Visual Studio Projects" & vcbuild /M%NUMBER_OF_PROCESSORS% /useenv /rebuild simh.sln "Release|Win32" & cd ..
if ($isWindows) { - ps: |
$platform = 'Windows' if ($isWindows) {
$commit_id_file = 'Visual Studio Projects\.git-commit-id.h' $platform = 'Windows'
} else { $commit_id_file = 'Visual Studio Projects\.git-commit-id.h'
$platform = uname -s } else {
if ($platform -eq 'Linux') { $platform = uname -s
$ncpus = nproc if ($platform -eq 'Linux') {
$parallel = '-j' + $ncpus $ncpus = nproc
} else { $parallel = '-j' + $ncpus
$platform = 'macOS' Write-Host "Building with $ncpus processors"
} } else {
$commit_id_file = '.git-commit-id' $platform = 'macOS'
make QUIET=1 $parallel }
} $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' on_success:
$id = $id_line.Line.SubString($id_line.line.IndexOf("SIM_GIT_COMMIT_ID") + 18, 8) - ps: |
$datetime = Get-Date -Format "yyyy-MM-dd_HH-mm-ss" $id_line = Select-String -Path $commit_id_file -Pattern 'SIM_GIT_COMMIT_ID'
$version_major = (Select-String -Path 'sim_rev.h' -Pattern '#define\s+SIM_MAJOR\s+(\d+)').Matches.Groups[1].Value $id = $id_line.Line.SubString($id_line.line.IndexOf("SIM_GIT_COMMIT_ID") + 18, 8)
$version_minor = (Select-String -Path 'sim_rev.h' -Pattern '#define\s+SIM_MINOR\s+(\d+)').Matches.Groups[1].Value $datetime = Get-Date -Format "yyyy-MM-dd_HH-mm-ss"
$version_mode = (Select-String -Path 'sim_rev.h' -Pattern '#define\s+SIM_VERSION_MODE\s+"(.+?)"').Matches.Groups[1].Value $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 - 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 - 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 credential.helper store
- git config --global user.email "mark@infocomm.com" - git config --global user.email "mark@infocomm.com"
- git config --global user.name "Mark Pizzolato" - git config --global user.name "Mark Pizzolato"
- git clone "https://github.com/simh/Development-Binaries" - git clone "https://github.com/simh/Development-Binaries"
- ps: | - ps: |
cd Development-Binaries cd Development-Binaries
$pkg_filename = "simh-$datetime-$platform-$version_major.$version_minor-$version_mode-$id" $pkg_filename = "simh-$datetime-$platform-$version_major.$version_minor-$version_mode-$id"
if ($isWindows) { if ($isWindows) {
Compress-Archive -Path ..\BIN\NT\Win32-Release\*.exe -DestinationPath "$pkg_filename.zip" $pkg_filename = $pkg_filename + '.zip'
} else { Compress-Archive -Path ..\BIN\NT\Win32-Release\*.exe -DestinationPath "$pkg_filename"
pushd ../BIN } else {
tar -cvzf ../Development-Binaries/$pkg_filename.tgz --exclude=buildtools '--exclude=*-build' * $pkg_filename = $pkg_filename + '.tgz'
popd pushd ../BIN
} tar -cvzf ../Development-Binaries/$pkg_filename --exclude=buildtools '--exclude=*-build' *
"$platform Build results for simh Commit: https://github.com/simh/simh/commit/$id" | Out-File -FilePath ../pkg_commit_message -Encoding ascii 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 add *
- git commit -F ../pkg_commit_message - git commit -F ../pkg_commit_message
- git push -u origin master - git push -u origin master
notifications: notifications:
- provider: Email - provider: Email
to: to:
- Mark@infocomm.com - Mark@infocomm.com
on_build_success: false on_build_success: false