@ -259,3 +259,182 @@ jobs:
@@ -259,3 +259,182 @@ jobs:
name : ilspycmd dotnet tool (${{ matrix.configuration }})
path : ICSharpCode.ILSpyCmd\bin\Release\ilspycmd*.nupkg
if-no-files-found : error
# Linux and macOS build the desktop solution filter, run the headless UI tests on their
# own platform, and package self-contained Release bundles. Decompiler tests, NuGet
# packing, and all Windows-specific packaging stay in the Windows job above; the
# ILSpy-tests submodule only feeds the decompiler tests, so neither job checks it out.
Linux:
runs-on : ubuntu-latest
env:
StagingDirectory : buildartifacts
defaults:
run:
shell : pwsh
steps:
- run : mkdir -p $env:StagingDirectory
- uses : actions/checkout@v6
with:
fetch-depth : 0
persist-credentials : false
- uses : actions/setup-dotnet@v5
with:
dotnet-version : '11.0.x'
dotnet-quality : 'preview'
cache : true
cache-dependency-path : '**/packages.lock.json'
env:
DOTNET_INSTALL_DIR : ${{ runner.temp }}/.dotnet
DOTNET_ROOT : ${{ runner.temp }}/.dotnet
- name : Get Version
id : version
run : |
./BuildTools/ghactions-install.ps1
Get-ChildItem Env : | Where-Object {$_.Name -Match "^ILSPY_"} | %{ echo "$($_.Name)=$($_.Value)" } | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
- name : Restore the application
run : >
dotnet restore ILSpy.Desktop.slnf
/p:RestoreEnablePackagePruning=false
/p:Configuration=Release
/p:Platform="Any CPU"
- name : Build
run : >
dotnet build ILSpy.Desktop.slnf --no-restore
-c Release
/p:Platform="Any CPU" /m
- name : Execute UI tests
run : >
dotnet test --project ILSpy.Tests/ILSpy.Tests.csproj
--configuration Release
--no -build --report-trx
--results-directory test-results
- name : Upload Test Logs
uses : actions/upload-artifact@v7
if : success() || failure()
with:
name : test-results-linux
path : 'test-results/*.trx'
- name : Create Test Report
uses : test-summary/action@v2
if : always()
with:
paths : "test-results/*.trx"
folded : true
- name : Publish (linux-x64 self-contained)
run : ./publish.ps1 -Configuration Release -Platform linux
- name : Package (zip, deb, rpm)
run : ./BuildTools/package-linux.ps1 -Configuration Release -Version "${{ steps.version.outputs.ILSPY_VERSION_NUMBER }}" -StagingDirectory $env:StagingDirectory
- name : Upload zip build artifact
uses : actions/upload-artifact@v7
with:
name : ILSpy Linux x64 ${{ steps.version.outputs.ILSPY_VERSION_NUMBER }} (Release)
path : ${{ env.StagingDirectory }}/ILSpy_linux-x64_*.zip
if-no-files-found : error
- name : Upload deb build artifact
uses : actions/upload-artifact@v7
with:
name : ILSpy Linux x64 deb ${{ steps.version.outputs.ILSPY_VERSION_NUMBER }} (Release)
path : ${{ env.StagingDirectory }}/*.deb
if-no-files-found : error
- name : Upload rpm build artifact
uses : actions/upload-artifact@v7
with:
name : ILSpy Linux x64 rpm ${{ steps.version.outputs.ILSPY_VERSION_NUMBER }} (Release)
path : ${{ env.StagingDirectory }}/*.rpm
if-no-files-found : error
macOS:
runs-on : macos-15
env:
StagingDirectory : buildartifacts
defaults:
run:
shell : pwsh
steps:
- run : mkdir -p $env:StagingDirectory
- uses : actions/checkout@v6
with:
fetch-depth : 0
persist-credentials : false
- uses : actions/setup-dotnet@v5
with:
dotnet-version : '11.0.x'
dotnet-quality : 'preview'
cache : true
cache-dependency-path : '**/packages.lock.json'
env:
DOTNET_INSTALL_DIR : ${{ runner.temp }}/.dotnet
DOTNET_ROOT : ${{ runner.temp }}/.dotnet
- name : Get Version
id : version
run : |
./BuildTools/ghactions-install.ps1
Get-ChildItem Env : | Where-Object {$_.Name -Match "^ILSPY_"} | %{ echo "$($_.Name)=$($_.Value)" } | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append
- name : Restore the application
run : >
dotnet restore ILSpy.Desktop.slnf
/p:RestoreEnablePackagePruning=false
/p:Configuration=Release
/p:Platform="Any CPU"
- name : Build
run : >
dotnet build ILSpy.Desktop.slnf --no-restore
-c Release
/p:Platform="Any CPU" /m
- name : Execute UI tests
run : >
dotnet test --project ILSpy.Tests/ILSpy.Tests.csproj
--configuration Release
--no -build --report-trx
--results-directory test-results
- name : Upload Test Logs
uses : actions/upload-artifact@v7
if : success() || failure()
with:
name : test-results-macos
path : 'test-results/*.trx'
- name : Create Test Report
uses : test-summary/action@v2
if : always()
with:
paths : "test-results/*.trx"
folded : true
- name : Publish (osx-arm64 self-contained app bundle)
run : ./publish.ps1 -Configuration Release -Platform macos
- name : Package (zipped ILSpy.app)
run : ./BuildTools/package-macos.ps1 -Configuration Release -Version "${{ steps.version.outputs.ILSPY_VERSION_NUMBER }}" -StagingDirectory $env:StagingDirectory
- name : Upload app bundle build artifact
uses : actions/upload-artifact@v7
with:
name : ILSpy macOS arm64 ${{ steps.version.outputs.ILSPY_VERSION_NUMBER }} (Release)
path : ${{ env.StagingDirectory }}/ILSpy_macos-arm64_*.zip
if-no-files-found : error