when building with .NET Core using multiple steps, Travis-CI reinstalls the .NET Core sdk every time.
Secondly it does seem to ignore the flags DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 and DOTNET_CLI_TELEMETRY_OPTOUT=1.
There was originally an issue on github that has been closed but I didn’t seem to find it here.
Any help would be very much appreciated since this is causing the build time to be quite long.
Hello,
I’ve seen the same issue.
First build on travis, 2min just for a dotnet build… it’s pretty long!
As we’re not able to add env var for the installation, we even can’t test or workaround it.
Or, well, we can workaround it by pulling mcr.microsoft.com/dotnet/core/sdk:2.2-alpine docker image and running scripts in it, but I don’t know if it’s as easy to do with Travis as in Gitlab CI.
Yeah I thought about that too but I’d prefer not to do so. I can live with the build-time, just thought there might be a way to improve it that I don’t know of (yet).
Travis-CI spins up a fresh virtual machine on every build, so we have to re-install .Net Core every time.
Short of pre-installing C# on the virtual machine image, which isn’t possible right now (Travis-CI tries to minimize the amount of software preinstalled on the image), I don’t think there’s much we can do.
The straightforward solution would be to set the environment variable directly in the command that needs it (and the exports wouldn’t be needed). Line 152:
The other solution would be to update the sudoers file with env_keep options for the required variables. Without trying it, I’m not sure whether that would work, because it might require the user session to log out to apply sudoers changes.
I haven’t been able to build FluentMigrator CI pull requests on GitHub due to the enormous increase in build time.
Would it be faster to use Docker and just install docker-ce via apt and pull down the dotnet sdk image form the Docker Registry than build mono from scratch?