appveyor / build-images Goto Github PK
View Code? Open in Web Editor NEWAutomation scripts for creating AppVeyor build worker images
License: MIT License
Automation scripts for creating AppVeyor build worker images
License: MIT License
It seems that when I build our own AWS build image based on Linux the standard nuget.org package source is not present in ~/.nuget/NuGet/NuGet.Config when build starts
1. BYOC Windows: (works as expected)
nuget:
disable_publish_on_pr: true
account_feed: true
project_feed: true
install:
- cmd: |
nuget
nuget sources
type %appdata%\NuGet\NuGet.Config
output:
NuGet Version: 5.11.0.10
Registered Sources:
1. nuget.org [Enabled]
https://api.nuget.org/v3/index.json
2. AppveyorAccountFeed [Enabled]
https://ci.appveyor.com/nuget/abcde-323ubderfg349
3. AppveyorProjectFeed [Enabled]
https://ci.appveyor.com/nuget/abcde-m5sdafsdfslmw
4. Microsoft Visual Studio Offline Packages [Enabled]
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="AppveyorAccountFeed" value="https://ci.appveyor.com/nuget/abcde-22348sdg8wh3" />
<add key="AppveyorProjectFeed" value="https://ci.appveyor.com/nuget/abcde-m5sdafsdfslmw" />
</packageSources>
<packageSourceCredentials>
<AppveyorAccountFeed>
<add key="Username" value="nuget" />
<add key="ClearTextPassword" value="6feac921a39" />
</AppveyorAccountFeed>
<AppveyorProjectFeed>
<add key="Username" value="nuget" />
<add key="ClearTextPassword" value="6feac921a39" />
</AppveyorProjectFeed>
</packageSourceCredentials>
</configuration>
2. Standard Linux Ubuntu image: (works as expected)
nuget:
disable_publish_on_pr: true
account_feed: true
project_feed: true
install:
- sh: >-
nuget
cat ~/.nuget/NuGet/NuGet.Config
output:
NuGet Version: 6.4.0.123
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="AppveyorAccountFeed" value="https://ci.appveyor.com/nuget/abcde-2dfdf5435sdfg" />
<add key="AppveyorProjectFeed" value="https://ci.appveyor.com/nuget/abcde-m5sdafsdfslmw" />
</packageSources>
<packageSourceCredentials>
<AppveyorAccountFeed>
<add key="Username" value="nuget" />
<add key="ClearTextPassword" value="291e42dd2" />
</AppveyorAccountFeed>
<AppveyorProjectFeed>
<add key="Username" value="nuget" />
<add key="ClearTextPassword" value="291e42dd66cd" />
</AppveyorProjectFeed>
</packageSourceCredentials>
</configuration>
3. BYOC Linux: (nuget.org feed missing)
nuget:
disable_publish_on_pr: true
account_feed: true
project_feed: true
install:
- sh: >-
dotnet nuget
dotnet nuget list source
cat ~/.nuget/NuGet/NuGet.Config
output:
NuGet Command Line 6.3.2.9
Registered Sources:
1. AppveyorAccountFeed [Enabled]
https://ci.appveyor.com/nuget/abcde-2qsadsasdasda
2. AppveyorProjectFeed [Enabled]
https://ci.appveyor.com/nuget/abcde-m5sdafsdfslmw
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="AppveyorAccountFeed" value="https://ci.appveyor.com/nuget/abcde-2qsadsasdasda" />
<add key="AppveyorProjectFeed" value="https://ci.appveyor.com/nuget/abcde-m5sdafsdfslmw" />
</packageSources>
<packageSourceCredentials>
<AppveyorAccountFeed>
<add key="Username" value="nuget" />
<add key="ClearTextPassword" value="eb3b2sfd" />
</AppveyorAccountFeed>
<AppveyorProjectFeed>
<add key="Username" value="nuget" />
<add key="ClearTextPassword" value="eb3b2659" />
</AppveyorProjectFeed>
</packageSourceCredentials>
</configuration>
as you can see both the standard Linux and the Windows BYOC images do add the nuget.org source as expected. However when running our build on Linux BYOC that source is missing and only AppveyorAccountFeed
and AppveyorProjectFeed
are added automatically
When attempting to setup my own cloud with the build-cloud wizard and select Ubuntu 18.04 minimal it does not work at all. Firstly the specified ISO is no longer available (2 versions out of date?) but manually updating that still leaves me with an error once it gets to
build-images/minimal-ubuntu.json
Lines 40 to 44 in 2107b26
Where it returns something like:
==> hyperv-iso: Downloading versions-20200926223335.log => ./
==> hyperv-iso: Download failed: scp: versions-20200926223335.log: No such file or directory
Attempting to build for hyper-v fails due to conflict in New-IsoFile
function.
PS C:\Users\Mike> Connect-AppVeyorToHyperV -AppVeyorUrl https://ci.appveyor.com -ApiToken XXXXXXXXX -CpuCores 16 -RamMb 2048 -ImageName "windows-hv" -ImageOs "Windows" -ImageTemplate "minimal-windows-server.json" -ImageFeatures "" -ImageCustomScript "Z2l0IGNsb25lIGh0dHBzOi8vZ2l0aHViLmNvbS9TbWluZ0h1Yi9TbWluZyAtLWJyYW5jaCBkZXZlbG9wIC0tZGVwdGggMSAvdG1wL3NtaW5nCi90bXAvc21pbmcvVG9vbHMvRG9ja2VyL2FwcHZleW9yL3NldHVwLnBzMQ==" -ImageCustomScriptAfterReboot ""
Checking AppVeyor API access...
Checking if Hyper-V tools are installed...
WARNING:
This command will create Hyper-V resources such as virtual switch and related subnet and NAT. For Linux VMs it will also create a new firewall rule. Also, it will run Hashicorp Packer which will create its own temporary Hyper-V resources and leave VHD for future use by AppVeyor build VMs.
If this server contains production resources you might consider using separate one.
Press Enter to continue or Ctrl-C to exit the command. Use '-SkipDisclaimer' switch parameter to skip this message next time.
New-IsoFile: M:\Users\Mike\Documents\PowerShell\Modules\AppVeyorBYOC\1.0.178\Connect-AppVeyorToHyperV.ps1:312
Line |
312 | New-IsoFile -Path $FileName -Source $Files -Force -Media "CDR …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| A parameter cannot be found that matches parameter name 'CompilerParameters'.
I've managed to get past this as follows:
Add current
New-ISOFile.ps1 from https://github.com/TheDotSource/New-ISOFile
diff --git a/Connect-AppVeyorToHyperV.ps1 b/Connect-AppVeyorToHyperV.ps1
index db3adb6..6c7d8fb 100644
--- a/Connect-AppVeyorToHyperV.ps1
+++ b/Connect-AppVeyorToHyperV.ps1
@@ -309,7 +309,13 @@ Function Connect-AppVeyorToHyperV {
"$ParentFolder/hyper-v/Windows/scripts/shutdown_vm.bat",
"$ParentFolder/hyper-v/Windows/scripts/win-updates.ps1"
)
- New-IsoFile -Path $FileName -Source $Files -Force -Media "CDR"
+ $StagingFolder="$ParentFolder/iso-source"
+ mkdir -f "$StagingFolder"
+ foreach ($f in $Files)
+ {
+ Copy-Item -Force "$f" "$StagingFolder"
+ }
+ New-IsoFile -destinationIso "$FileName" -source "$StagingFolder" -Force -Media "CDR"
}
elseif ($imageOs -eq "Linux")
{
However the resulting image isn't bootable so clearly isn't a full fix. Am I missing something simple?
NB. Work in progress at https://github.com/mikee47/appveyor-build-images/tree/fix/hyperv-build
It seems that the "Visual Studio 2019" image provides compiled binaries for Boost 1.73 but merely the source package for Boost 1.77. Or am I missing something?
It would be great to have binaries for Boost 1.77 as well.
While it is possible to run git pull && ./bootstrap-vcpkg && vcpkg update && vcpkg update XXXX --no-dry-run
on each build it is obviously not a good idea.
Can you please update the two images (ideally the newer ones, too) to a reasonable set with the following commands?
pushd c:\tools\vcpkg
git pull
bootstrap-vcpkg
vcpkg update
vcpkg install vcpkg-cmake vcpkg-cmake-config
vcpkg update vcpkg-cmake vcpkg-cmake-config --no-dry-run
The 2015 worker image currently has a vcpkg older than 11/2019.
Seen when updating it manually:
A suitable version of git was not found (required v2.32.0). Downloading portable git v2.32.0...
Downloading git...
https://github.com/git-for-windows/git/releases/download/v2.32.0.windows.2/PortableGit-2.32.0.2-32-bit.7z.exe -> C:\Tools\vcpkg\downloads\PortableGit-2.32.0.2-32-bit.7z.exe
Extracting git...
A suitable version of powershell-core was not found (required v7.1.4). Downloading portable powershell-core v7.1.4...
Downloading powershell-core...
https://github.com/PowerShell/PowerShell/releases/download/v7.1.4/PowerShell-7.1.4-win-x86.zip -> C:\Tools\vcpkg\downloads\PowerShell-7.1.4-win-x86.zip
So please try to update those, too.
Getting the next warning since this morning with Visual Studio 2022 image. Any ideas? CC: @OwenMcDonnell.
We have not changed anything in appveyor.yml or our code.
Please, could you add support for NET8.0 to the VS2022 image. https://dotnet.microsoft.com/en-us/download/dotnet/8.0.
Thanks
Install Nunit.Console
instead of Nunit.ConsoleRunner
.
Any chance an option to build an image using focal could be added?
The VS 2019 compiler supports Address Sanitizer, which requires an extra library. At the moment, compiling with -fsanitize=address
results in a linker error:
LINK : fatal error LNK1104: cannot open file 'clang_rt.asan_dbg-x86_64.lib'
Please add the Address Sanitizer component to the VS 2019 install. The MS docs list it as:
Microsoft.VisualStudio.Component.VC.ASAN
Self-explanatory, related to inability to add python 3.10 support for other things
Visual Studio 2022 is now in Preview! Features include .NET 6 and C++20 Support. CMake has added experimental support since version 3.21 (see #86).
So hereby the request to add an Visual Studio 2022 image. This can be used as a tracking issue.
Optionally, the Visual Studio 2022 image could be based on Windows Server 2022, which is also in preview. This is not necessary however.
See also
Golang 1.18 https://tip.golang.org/doc/go1.18 is now released and it would be great if AppVeyor could support it as per the default build-images. Thanks!
MinGW.org has been moving to being hosted on OSDN.net, with newer releases of their packages (and updated catalogue files) being hosted exclusively on the new site, including the newer mingw-get version 0.6.3-pre-20170905-1 (instead of the 0.6.2-beta-20131004-1 on SourceForge).
Whereas mingw-get version 0.6.2-beta-20131004-1 installs (for me):
version 0.6.3-pre-20170905-1 currently installs:
(and will probably install newer versions of these and other packages, as they get updated).
Updating to the newer version of mingw-get should be as simple as replacing scripts/Windows/install_mingw.ps1 lines 11-14:
$zipPath = "$($env:TEMP)\mingw-get-0.6.2-mingw32-beta-20131004-1-bin.tar.xz"
$tarPath = "$($env:TEMP)\mingw-get-0.6.2-mingw32-beta-20131004-1-bin.tar"
Write-Host "Downloading..."
(New-Object Net.WebClient).DownloadFile('http://sourceforge.net/projects/mingw/files/Installer/mingw-get/mingw-get-0.6.2-beta-20131004-1/mingw-get-0.6.2-mingw32-beta-20131004-1-bin.tar.xz/download', $zipPath)
with:
$zipPath = "$($env:TEMP)\mingw-get-0.6.3-mingw32-pre-20170905-1-bin.tar.xz"
$tarPath = "$($env:TEMP)\mingw-get-0.6.3-mingw32-pre-20170905-1-bin.tar"
Write-Host "Downloading..."
(New-Object Net.WebClient).DownloadFile('https://osdn.net/dl/mingw/mingw-get-0.6.3-mingw32-pre-20170905-1-bin.tar.xz', $zipPath)
I emphasize that it "should" work because, though I have succeeded manually downloading and installing from the link, and have been doing something similar with the AppVeyor build for one of my GitHub projects with success, I haven't tried running the updated PowerShell script I suggest (especially not in the context of creating an appveyor image).
Latest is now 5.14.2, and not 5.14.
https://www.appveyor.com/docs/windows-images-software/#qt
Thanks
It would be great to have more recent Windows Versions up to at least 20H2. The point is that when building Windows Docker image, with Windows Server 2019 you are extremely limited so you cannot build images for 1903, 1909, 2004, 20H2 (see https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility?tabs=windows-server-2019%2Cwindows-10-1909).
But building those images is necessary in order to provide the ability to run the images in-process mode.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.