Skip to content

Commit

Permalink
(build) use macos-13 (amd64) and macos-14 (arm64)
Browse files Browse the repository at this point in the history
  • Loading branch information
arturcic committed Feb 6, 2024
1 parent 4abd2b9 commit df383b8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
os: [windows-latest, ubuntu-latest, macos-13, macos-14]

runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
-
name: 'Upload native packages'
uses: actions/upload-artifact@v4
if: matrix.os != 'windows-latest'
if: matrix.os != 'windows-latest' && matrix.os != 'macos-13'
with:
name: native-${{ runner.os }}
path: ${{ github.workspace }}/artifacts/packages/native/*.tar.gz
2 changes: 1 addition & 1 deletion .github/workflows/_prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
os: [windows-latest, ubuntu-latest, macos-13, macos-14]

runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
os: [windows-latest, ubuntu-latest, macos-13, macos-14]
targetFramework: [ 'net8.0', 'net7.0', 'net6.0' ]

runs-on: ${{ matrix.os }}
Expand Down
10 changes: 6 additions & 4 deletions build/build/Tasks/Package/PackagePrepare.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ private static void PackPrepareNative(BuildContext context)

// testing windows and macos artifacts, the linux is tested with docker
if (platform == PlatformFamily.Linux) continue;
if (runtime.EndsWith("arm64")) continue; // TODO: enable when we have arm64 macos agent

context.Information("Validating native lib:");
var nativeExe = outputPath.CombineWithFilePath(context.IsOnWindows ? "gitversion.exe" : "gitversion");
context.ValidateOutput(nativeExe.FullPath, "/showvariable FullSemver", context.Version?.GitVersion?.FullSemVer);
if (context.IsRunningOnAmd64() && runtime.EndsWith("x64") || context.IsRunningOnArm64() && runtime.EndsWith("arm64"))
{
context.Information("Validating native lib:");
var nativeExe = outputPath.CombineWithFilePath(context.IsOnWindows ? "gitversion.exe" : "gitversion");
context.ValidateOutput(nativeExe.FullPath, "/showvariable FullSemver", context.Version?.GitVersion?.FullSemVer);
}
}
}

Expand Down

0 comments on commit df383b8

Please sign in to comment.