From e65715f06f332b712e98aa77efa29a5d5180fbb5 Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Mon, 20 Apr 2026 10:13:41 -0400 Subject: [PATCH] Fix arm build --- .github/workflows/on_push.yml | 112 ++++++++++++---------------------- Dev17/Dev17.csproj | 15 +++++ WakaTime.sln | 8 +-- 3 files changed, 59 insertions(+), 76 deletions(-) diff --git a/.github/workflows/on_push.yml b/.github/workflows/on_push.yml index c54ced9..7e0e9e8 100644 --- a/.github/workflows/on_push.yml +++ b/.github/workflows/on_push.yml @@ -5,7 +5,7 @@ on: types: [opened, reopened, ready_for_review, synchronize] push: branches: [master] - tags-ignore: ["**"] + tags-ignore: ['**'] jobs: version: @@ -17,22 +17,19 @@ jobs: semver: ${{ steps.format.outputs.semver }} # Without v prefix semver_tag: ${{ steps.semver-tag.outputs.semver_tag }} steps: - - - name: Checkout + - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - - - name: Calculate semver tag + - name: Calculate semver tag id: semver-tag uses: gandarez/semver-action@master with: branching_model: trunk-based - major_pattern: "(?i)^(.+:)?(major/.+)" - prefix: "" + major_pattern: '(?i)^(.+:)?(major/.+)' + prefix: '' debug: true - - - name: Remove v prefix + - name: Remove v prefix id: format run: | echo "${{ steps.semver-tag.outputs.semver_tag }}" @@ -56,20 +53,15 @@ jobs: runs-on: windows-latest needs: [version] steps: - - - name: Checkout + - name: Checkout uses: actions/checkout@v4 - - - name: Setup MSBuild + - name: Setup MSBuild uses: microsoft/setup-msbuild@v1 - - - name: Setup NuGet + - name: Setup NuGet uses: NuGet/setup-nuget@v1 - - - name: Restore NuGet packages + - name: Restore NuGet packages run: nuget restore ./Dev16/Dev16.csproj -PackagesDirectory ./packages -NonInteractive - - - name: Update version + - name: Update version run: | (Get-Content -Path Dev16\source.extension.vsixmanifest) | ForEach-Object {$_ -Replace '1.0.0', '${{ needs.version.outputs.semver }}'} | @@ -77,17 +69,14 @@ jobs: (Get-Content -Path Dev16\Properties\AssemblyInfo.cs) | ForEach-Object {$_ -Replace '1.0.0', '${{ needs.version.outputs.semver }}'} | Set-Content -Path Dev16\Properties\AssemblyInfo.cs - - - name: Build Dev16 for Release + - name: Build Dev16 for Release run: msbuild Dev16/Dev16.csproj -property:Configuration=Release -property:platform="AnyCPU" -property:DeployExtension=false - - - name: Upload artifacts + - name: Upload artifacts uses: actions/upload-artifact@v4 with: name: WakaTime.Dev16.vsix path: Dev16/bin/Release/WakaTime.Dev16.vsix - - - name: Remove tag if failure + - name: Remove tag if failure if: ${{ failure() }} uses: actions/github-script@v7 with: @@ -104,20 +93,15 @@ jobs: runs-on: windows-latest needs: [version] steps: - - - name: Checkout + - name: Checkout uses: actions/checkout@v4 - - - name: Setup MSBuild + - name: Setup MSBuild uses: microsoft/setup-msbuild@v1 - - - name: Setup NuGet + - name: Setup NuGet uses: NuGet/setup-nuget@v1 - - - name: Restore NuGet packages + - name: Restore NuGet packages run: nuget restore ./Dev17/Dev17.csproj -PackagesDirectory ./packages -NonInteractive - - - name: Update version + - name: Update version run: | (Get-Content -Path Dev17\source.extension.vsixmanifest) | ForEach-Object {$_ -Replace '1.0.0', '${{ needs.version.outputs.semver }}'} | @@ -125,17 +109,14 @@ jobs: (Get-Content -Path Dev17\Properties\AssemblyInfo.cs) | ForEach-Object {$_ -Replace '1.0.0', '${{ needs.version.outputs.semver }}'} | Set-Content -Path Dev17\Properties\AssemblyInfo.cs - - - name: Build Dev17 for Release - run: msbuild Dev17/Dev17.csproj -property:Configuration=Release -property:platform="x64" -property:DeployExtension=false - - - name: Upload artifacts + - name: Build Dev17 for Release + run: msbuild Dev17/Dev17.csproj -property:Configuration=Release -property:platform="AnyCPU" -property:DeployExtension=false + - name: Upload artifacts uses: actions/upload-artifact@v4 with: name: WakaTime.Dev17.vsix - path: Dev17/bin/x64/Release/WakaTime.Dev17.vsix - - - name: Remove tag if failure + path: Dev17/bin/AnyCPU/Release/WakaTime.Dev17.vsix + - name: Remove tag if failure if: ${{ failure() }} uses: actions/github-script@v7 with: @@ -152,17 +133,14 @@ jobs: runs-on: windows-latest needs: [build-dev16, build-dev17] # set dependencies for all build steps to ensure all ran correctly and didn't delete the tag in case of failure steps: - - - name: Checkout + - name: Checkout uses: actions/checkout@v4 - - - name: Download artifacts + - name: Download artifacts uses: actions/download-artifact@v4 with: - pattern: "*.Dev16.vsix" + pattern: '*.Dev16.vsix' path: build/ - - - name: Print VSIX identity + - name: Print VSIX identity shell: pwsh run: | $vsix = Join-Path $env:GITHUB_WORKSPACE 'build\WakaTime.Dev16.vsix\WakaTime.Dev16.vsix' @@ -202,8 +180,7 @@ jobs: $internalName = $xml.PackageManifest.Metadata.InternalName if ($internalName) { Write-Host "InternalName: $internalName" } - - - name: Print publishManifest.json identity + - name: Print publishManifest.json identity shell: pwsh run: | $pm = Join-Path $env:GITHUB_WORKSPACE 'Dev16\publishManifest.json' @@ -213,8 +190,7 @@ jobs: if ($json.identity) { Write-Host "Identity.InternalName: $($json.identity.internalName)" } - - - name: Publish Dev16 to Marketplace + - name: Publish Dev16 to Marketplace uses: cezarypiatek/VsixPublisherAction@1.1 with: extension-file: ${{ github.workspace }}\build\WakaTime.Dev16.vsix\WakaTime.Dev16.vsix @@ -226,17 +202,14 @@ jobs: runs-on: windows-latest needs: [build-dev16, build-dev17] # set dependencies for all build steps to ensure all ran correctly and didn't delete the tag in case of failure steps: - - - name: Checkout + - name: Checkout uses: actions/checkout@v4 - - - name: Download artifacts + - name: Download artifacts uses: actions/download-artifact@v4 with: - pattern: "*.Dev17.vsix" + pattern: '*.Dev17.vsix' path: build/ - - - name: Print VSIX identity + - name: Print VSIX identity shell: pwsh run: | $vsix = Join-Path $env:GITHUB_WORKSPACE 'build\WakaTime.Dev17.vsix\WakaTime.Dev17.vsix' @@ -276,8 +249,7 @@ jobs: $internalName = $xml.PackageManifest.Metadata.InternalName if ($internalName) { Write-Host "InternalName: $internalName" } - - - name: Print publishManifest.json identity + - name: Print publishManifest.json identity shell: pwsh run: | $pm = Join-Path $env:GITHUB_WORKSPACE 'Dev17\publishManifest.json' @@ -287,8 +259,7 @@ jobs: if ($json.identity) { Write-Host "Identity.InternalName: $($json.identity.internalName)" } - - - name: Publish Dev17 to Marketplace + - name: Publish Dev17 to Marketplace uses: cezarypiatek/VsixPublisherAction@1.1 with: extension-file: ${{ github.workspace }}\build\WakaTime.Dev17.vsix\WakaTime.Dev17.vsix @@ -300,17 +271,14 @@ jobs: runs-on: ubuntu-latest needs: [version, publish-dev16, publish-dev17] steps: - - - name: Checkout + - name: Checkout uses: actions/checkout@v4 - - - name: Download artifacts + - name: Download artifacts uses: actions/download-artifact@v4 with: - pattern: "*.vsix" + pattern: '*.vsix' path: build/ - - - name: "Create release" + - name: 'Create release' uses: softprops/action-gh-release@master with: name: ${{ needs.version.outputs.semver }} diff --git a/Dev17/Dev17.csproj b/Dev17/Dev17.csproj index 36b9cfb..d446153 100644 --- a/Dev17/Dev17.csproj +++ b/Dev17/Dev17.csproj @@ -75,6 +75,21 @@ pdbonly true + + AnyCPU + bin\AnyCPU\Debug\ + TRACE;DEBUG + full + True + + + AnyCPU + bin\AnyCPU\Release\ + true + TRACE + pdbonly + true + ARM64 bin\ARM64\Debug\ diff --git a/WakaTime.sln b/WakaTime.sln index 1e2b63d..e23e3da 100644 --- a/WakaTime.sln +++ b/WakaTime.sln @@ -17,12 +17,12 @@ Global Release|ARM64 = Release|ARM64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Debug|Any CPU.ActiveCfg = Debug|x64 - {54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Debug|Any CPU.Build.0 = Debug|x64 + {54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Debug|Any CPU.ActiveCfg = Debug|AnyCPU + {54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Debug|Any CPU.Build.0 = Debug|AnyCPU {54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Debug|ARM64.ActiveCfg = Debug|ARM64 {54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Debug|ARM64.Build.0 = Debug|ARM64 - {54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Release|Any CPU.ActiveCfg = Release|x64 - {54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Release|Any CPU.Build.0 = Release|x64 + {54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Release|Any CPU.ActiveCfg = Release|AnyCPU + {54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Release|Any CPU.Build.0 = Release|AnyCPU {54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Release|ARM64.ActiveCfg = Release|ARM64 {54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Release|ARM64.Build.0 = Release|ARM64 {E884658C-F11A-43F0-AC49-94859B3AF72F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU