From 74df32395747da489a8af9b7d65e130d58518ee5 Mon Sep 17 00:00:00 2001 From: Charlton Trezevant Date: Wed, 1 May 2024 15:21:09 -0400 Subject: [PATCH 1/4] Automatically build and release the CLI for the linux-arm64 build target --- .github/workflows/CI.yml | 4 ++++ RELEASENOTES.md | 2 +- publish.ps1 | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index e2c4dac09..834c9ccd7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -323,10 +323,12 @@ jobs: ./dist/ado2gh.*.win-x64.zip ./dist/ado2gh.*.win-x86.zip ./dist/ado2gh.*.linux-x64.tar.gz + ./dist/ado2gh.*.linux-arm64.tar.gz ./dist/ado2gh.*.osx-x64.tar.gz ./dist/win-x64/gei-windows-amd64.exe ./dist/win-x86/gei-windows-386.exe ./dist/linux-x64/gei-linux-amd64 + ./dist/linux-arm64/gei-linux-arm64 ./dist/osx-x64/gei-darwin-amd64 - name: Create gh-ado2gh Release @@ -339,6 +341,7 @@ jobs: ./dist/win-x86/ado2gh-windows-386.exe ./dist/win-x64/ado2gh-windows-amd64.exe ./dist/linux-x64/ado2gh-linux-amd64 + ./dist/linux-arm64/ado2gh-linux-arm64 ./dist/osx-x64/ado2gh-darwin-amd64 - name: Create gh-bbs2gh Release @@ -351,6 +354,7 @@ jobs: ./dist/win-x86/bbs2gh-windows-386.exe ./dist/win-x64/bbs2gh-windows-amd64.exe ./dist/linux-x64/bbs2gh-linux-amd64 + ./dist/linux-arm64/bbs2gh-linux-arm64 ./dist/osx-x64/bbs2gh-darwin-amd64 - name: Archive Release Notes diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 8b1378917..7f8df090d 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1 +1 @@ - +- Added support for x64 ARM Linux machines with new linux-arm64 build diff --git a/publish.ps1 b/publish.ps1 index 88d32936d..0d03040fc 100755 --- a/publish.ps1 +++ b/publish.ps1 @@ -59,6 +59,20 @@ else { } Copy-Item ./dist/linux-x64/ado2gh ./dist/linux-x64/ado2gh-linux-amd64 + + dotnet publish src/ado2gh/ado2gh.csproj -c Release -o dist/linux-arm64/ -r linux-arm64 -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true /p:DebugType=None /p:IncludeNativeLibrariesForSelfExtract=true /p:VersionPrefix=$AssemblyVersion + + if ($LASTEXITCODE -ne 0) { + exit $LASTEXITCODE + } + + tar -cvzf ./dist/ado2gh.$AssemblyVersion.linux-arm64.tar.gz -C ./dist/linux-arm64 ado2gh + + if (Test-Path -Path ./dist/linux-arm64/ado2gh-linux-arm64) { + Remove-Item ./dist/linux-arm64/ado2gh-linux-arm64 + } + + Copy-Item ./dist/linux-arm64/ado2gh ./dist/linux-arm64/ado2gh-linux-arm64 } if ((Test-Path env:SKIP_MACOS) -And $env:SKIP_MACOS.ToUpper() -eq "TRUE") { @@ -126,6 +140,18 @@ else { } Rename-Item ./dist/linux-x64/gei gei-linux-amd64 + + dotnet publish src/gei/gei.csproj -c Release -o dist/linux-arm64/ -r linux-arm64 -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true /p:DebugType=None /p:IncludeNativeLibrariesForSelfExtract=true /p:VersionPrefix=$AssemblyVersion + + if ($LASTEXITCODE -ne 0) { + exit $LASTEXITCODE + } + + if (Test-Path -Path ./dist/linux-arm64/gei-linux-arm64) { + Remove-Item ./dist/linux-arm64/gei-linux-arm64 + } + + Rename-Item ./dist/linux-arm64/gei gei-linux-arm64 } if ((Test-Path env:SKIP_MACOS) -And $env:SKIP_MACOS.ToUpper() -eq "TRUE") { @@ -190,6 +216,18 @@ else { } Rename-Item ./dist/linux-x64/bbs2gh bbs2gh-linux-amd64 + + dotnet publish src/bbs2gh/bbs2gh.csproj -c Release -o dist/linux-arm64/ -r linux-arm64 -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true /p:DebugType=None /p:IncludeNativeLibrariesForSelfExtract=true /p:VersionPrefix=$AssemblyVersion + + if ($LASTEXITCODE -ne 0) { + exit $LASTEXITCODE + } + + if (Test-Path -Path ./dist/linux-arm64/bbs2gh-linux-arm64) { + Remove-Item ./dist/linux-arm64/bbs2gh-linux-arm64 + } + + Rename-Item ./dist/linux-arm64/bbs2gh bbs2gh-linux-arm64 } if ((Test-Path env:SKIP_MACOS) -And $env:SKIP_MACOS.ToUpper() -eq "TRUE") { From 217344307be7c1ee72b9ea768cff07df5852dc9c Mon Sep 17 00:00:00 2001 From: Charlton Trezevant <7227500+chtzvt@users.noreply.github.com> Date: Thu, 19 Dec 2024 10:21:40 -0500 Subject: [PATCH 2/4] Update publish.ps1 Co-authored-by: Arin Ghazarian --- publish.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publish.ps1 b/publish.ps1 index 0d03040fc..e3e3b667b 100755 --- a/publish.ps1 +++ b/publish.ps1 @@ -60,7 +60,7 @@ else { Copy-Item ./dist/linux-x64/ado2gh ./dist/linux-x64/ado2gh-linux-amd64 - dotnet publish src/ado2gh/ado2gh.csproj -c Release -o dist/linux-arm64/ -r linux-arm64 -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true /p:DebugType=None /p:IncludeNativeLibrariesForSelfExtract=true /p:VersionPrefix=$AssemblyVersion + dotnet publish src/ado2gh/ado2gh.csproj -c Release -o dist/linux-arm64/ -r linux-arm64 -p:PublishSingleFile=true -p:PublishTrimmed=true -p:TrimMode=partial --self-contained true /p:DebugType=None /p:IncludeNativeLibrariesForSelfExtract=true /p:VersionPrefix=$AssemblyVersion if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE From 7213ccbd03c96258b2ee281374e412d47e9181e0 Mon Sep 17 00:00:00 2001 From: Charlton Trezevant <7227500+chtzvt@users.noreply.github.com> Date: Thu, 19 Dec 2024 10:21:50 -0500 Subject: [PATCH 3/4] Update publish.ps1 Co-authored-by: Arin Ghazarian --- publish.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publish.ps1 b/publish.ps1 index e3e3b667b..eaff005a0 100755 --- a/publish.ps1 +++ b/publish.ps1 @@ -141,7 +141,7 @@ else { Rename-Item ./dist/linux-x64/gei gei-linux-amd64 - dotnet publish src/gei/gei.csproj -c Release -o dist/linux-arm64/ -r linux-arm64 -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true /p:DebugType=None /p:IncludeNativeLibrariesForSelfExtract=true /p:VersionPrefix=$AssemblyVersion + dotnet publish src/gei/gei.csproj -c Release -o dist/linux-arm64/ -r linux-arm64 -p:PublishSingleFile=true -p:PublishTrimmed=true -p:TrimMode=partial --self-contained true /p:DebugType=None /p:IncludeNativeLibrariesForSelfExtract=true /p:VersionPrefix=$AssemblyVersion if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE From 7e806582accd7fed43cbf87f80a76c27a7baa921 Mon Sep 17 00:00:00 2001 From: Charlton Trezevant <7227500+chtzvt@users.noreply.github.com> Date: Thu, 19 Dec 2024 10:21:58 -0500 Subject: [PATCH 4/4] Update publish.ps1 Co-authored-by: Arin Ghazarian --- publish.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publish.ps1 b/publish.ps1 index eaff005a0..28cdf51cb 100755 --- a/publish.ps1 +++ b/publish.ps1 @@ -217,7 +217,7 @@ else { Rename-Item ./dist/linux-x64/bbs2gh bbs2gh-linux-amd64 - dotnet publish src/bbs2gh/bbs2gh.csproj -c Release -o dist/linux-arm64/ -r linux-arm64 -p:PublishSingleFile=true -p:PublishTrimmed=true --self-contained true /p:DebugType=None /p:IncludeNativeLibrariesForSelfExtract=true /p:VersionPrefix=$AssemblyVersion + dotnet publish src/bbs2gh/bbs2gh.csproj -c Release -o dist/linux-arm64/ -r linux-arm64 -p:PublishSingleFile=true -p:PublishTrimmed=true -p:TrimMode=partial --self-contained true /p:DebugType=None /p:IncludeNativeLibrariesForSelfExtract=true /p:VersionPrefix=$AssemblyVersion if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE