mirror of https://github.com/icedland/iced.git
Update build files
This commit is contained in:
parent
86751f664d
commit
fd4d796aa7
|
@ -9,21 +9,17 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- name: Install .NET Core
|
||||
- name: Build, test
|
||||
shell: pwsh
|
||||
run: |
|
||||
Invoke-WebRequest -Uri https://dot.net/v1/dotnet-install.ps1 -UseBasicParsing -OutFile $env:temp\dotnet-install.ps1
|
||||
& $env:temp\dotnet-install.ps1 -Version 3.0.100 -InstallDir "${env:ProgramFiles(x86)}\dotnet" -Architecture x86
|
||||
|
||||
- name: Build, test
|
||||
run: |
|
||||
set PATH=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64;%PATH%
|
||||
build.cmd
|
||||
$env:PATH = 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64;' + $env:PATH
|
||||
.\build.ps1
|
||||
|
||||
- name: upload-artifact doesn't support wildcards
|
||||
shell: pwsh
|
||||
run: |
|
||||
mkdir nuget_files
|
||||
copy "Iced\bin\Release\*.*nupkg" nuget_files
|
||||
New-Item -ItemType Directory nuget_files > $null
|
||||
Copy-Item Iced\bin\Release\*.*nupkg nuget_files
|
||||
|
||||
- uses: actions/upload-artifact@v1
|
||||
with:
|
||||
|
|
17
build.cmd
17
build.cmd
|
@ -1,17 +0,0 @@
|
|||
@echo off
|
||||
REM dotnet build isn't used because it can't build net35 tfms
|
||||
|
||||
msbuild -v:m -restore -t:Build -p:Configuration=Release || goto :error
|
||||
|
||||
"%ProgramFiles%\dotnet\dotnet.exe" test -c Release -p:Exclude=\"[Iced]Iced.Intel.InstructionMemorySizes,[Iced]Iced.Intel.EncoderInternal.OpCodeHandlers,[Iced]Iced.Intel.InstructionInfoInternal.InfoHandlers,[Iced]Iced.Intel.MnemonicUtils,[Iced]Iced.Intel.InstructionOpCounts\" -p:ExcludeByFile="%cd%\Iced\**\*.g.cs" -p:ExcludeByAttribute="ObsoleteAttribute" -p:CollectCoverage=true -p:CoverletOutputFormat=json --no-build Iced.UnitTests\Iced.UnitTests.csproj -- RunConfiguration.NoAutoReporters=true RunConfiguration.TargetPlatform=X64 || goto :error
|
||||
"%ProgramFiles(x86)%\dotnet\dotnet.exe" test -c Release --no-build Iced.UnitTests\Iced.UnitTests.csproj -- RunConfiguration.NoAutoReporters=true RunConfiguration.TargetPlatform=X86 || goto :error
|
||||
|
||||
set MoreDefineConstants=IcedNoIVT
|
||||
msbuild -v:m -t:Clean -p:Configuration=Release || goto :error
|
||||
msbuild -v:m -restore -t:Build -p:Configuration=Release Iced\Iced.csproj || goto :error
|
||||
msbuild -v:m -t:Pack -p:Configuration=Release Iced\Iced.csproj || goto :error
|
||||
|
||||
goto :EOF
|
||||
|
||||
:error
|
||||
exit /b %errorlevel%
|
|
@ -0,0 +1,23 @@
|
|||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
#
|
||||
# dotnet build isn't used because it can't build net35 tfms
|
||||
#
|
||||
|
||||
$env:MoreDefineConstants = ''
|
||||
|
||||
msbuild -v:m -restore -t:Build -p:Configuration=Release
|
||||
if ($LASTEXITCODE) { exit $LASTEXITCODE }
|
||||
|
||||
dotnet test -c Release -f netcoreapp3.0 -p:Exclude='\"[Iced]Iced.Intel.InstructionMemorySizes,[Iced]Iced.Intel.EncoderInternal.OpCodeHandlers,[Iced]Iced.Intel.InstructionInfoInternal.InfoHandlers,[Iced]Iced.Intel.MnemonicUtils,[Iced]Iced.Intel.InstructionOpCounts\"' -p:ExcludeByFile="$PWD\Iced\**\*.g.cs" -p:ExcludeByAttribute='ObsoleteAttribute' -p:CollectCoverage=true -p:CoverletOutputFormat=json --no-build Iced.UnitTests\Iced.UnitTests.csproj -- RunConfiguration.NoAutoReporters=true RunConfiguration.TargetPlatform=X64
|
||||
if ($LASTEXITCODE) { exit $LASTEXITCODE }
|
||||
|
||||
# Don't include the IVT in the final binary
|
||||
$env:MoreDefineConstants = 'IcedNoIVT'
|
||||
msbuild -v:m -t:Clean -p:Configuration=Release
|
||||
if ($LASTEXITCODE) { exit $LASTEXITCODE }
|
||||
msbuild -v:m -restore -t:Build -p:Configuration=Release Iced\Iced.csproj
|
||||
if ($LASTEXITCODE) { exit $LASTEXITCODE }
|
||||
msbuild -v:m -t:Pack -p:Configuration=Release Iced\Iced.csproj
|
||||
if ($LASTEXITCODE) { exit $LASTEXITCODE }
|
||||
$env:MoreDefineConstants = ''
|
Loading…
Reference in New Issue