Skip to content

Commit

Permalink
Update MacOS version as macos-12 was deprecated. (#4645)
Browse files Browse the repository at this point in the history
  • Loading branch information
ami-GS authored and nibanks committed Dec 4, 2024
1 parent 2d10568 commit 2060568
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 24 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/build-reuse-darwin-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ jobs:
ref: ${{ inputs.ref }}
config: ${{ inputs.config }}
plat: ${{ matrix.plat }}
os: macos-12
os: macos-13
arch: ${{ matrix.arch }}
tls: ${{ inputs.tls }}
static: ${{ inputs.static }}

build-darwin-universal:
name: Build Universal Binaries
needs: [build-darwin]
runs-on: macos-12
runs-on: macos-13
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
Expand All @@ -60,20 +60,20 @@ jobs:
- name: Download Build Artifacts (x64)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
name: ${{ inputs.config }}-macos-macos-12-x64-${{ inputs.tls }}${{ inputs.static }}
name: ${{ inputs.config }}-macos-macos-13-x64-${{ inputs.tls }}${{ inputs.static }}
path: artifacts
- name: Download Build Artifacts (arm64)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
name: ${{ inputs.config }}-macos-macos-12-arm64-${{ inputs.tls }}${{ inputs.static }}
name: ${{ inputs.config }}-macos-macos-13-arm64-${{ inputs.tls }}${{ inputs.static }}
path: artifacts
- name: Build Package
shell: pwsh
run: scripts/merge-darwin.ps1 -DeleteSource -Config ${{ inputs.config }}
- name: Upload build artifacts
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b
with:
name: ${{ inputs.config }}-macos-macos-12-universal-${{ inputs.tls }}${{ inputs.static }}
name: ${{ inputs.config }}-macos-macos-13-universal-${{ inputs.tls }}${{ inputs.static }}
path: artifacts

build-darwin-framework:
Expand All @@ -87,7 +87,7 @@ jobs:
{ plat: "ios", arch: "arm64" },
{ plat: "macos", arch: "universal" },
]
runs-on: macos-12
runs-on: macos-13
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
Expand All @@ -97,21 +97,21 @@ jobs:
- name: Download Build Artifacts (x64)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
name: ${{ inputs.config }}-${{ matrix.vec.plat }}-macos-12-${{ matrix.vec.arch }}-${{ inputs.tls }}${{ inputs.static }}
name: ${{ inputs.config }}-${{ matrix.vec.plat }}-macos-13-${{ matrix.vec.arch }}-${{ inputs.tls }}${{ inputs.static }}
path: artifacts
- name: Build Framework
shell: pwsh
run: scripts/package-darwin-framework.ps1 -Config ${{ inputs.config }} -Platform ${{ matrix.vec.plat }} -Arch ${{ matrix.vec.arch }}
- name: Upload build artifacts
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b
with:
name: Framework-${{ inputs.config }}-${{ matrix.vec.plat }}-macos-12-${{ matrix.vec.arch }}-${{ inputs.tls }}${{ inputs.static }}
name: Framework-${{ inputs.config }}-${{ matrix.vec.plat }}-macos-13-${{ matrix.vec.arch }}-${{ inputs.tls }}${{ inputs.static }}
path: artifacts

build-darwin-xcframework:
name: Build Darwin XCFramework
needs: [build-darwin-framework]
runs-on: macos-12
runs-on: macos-13
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
Expand All @@ -121,17 +121,17 @@ jobs:
- name: Download Build Artifacts (iOS x64)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
name: Framework-${{ inputs.config }}-ios-macos-12-x64-openssl
name: Framework-${{ inputs.config }}-ios-macos-13-x64-openssl
path: artifacts
- name: Download Build Artifacts (iOS arm64)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
name: Framework-${{ inputs.config }}-ios-macos-12-arm64-openssl
name: Framework-${{ inputs.config }}-ios-macos-13-arm64-openssl
path: artifacts
- name: Download Build Artifacts (MacOS Universal)
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
name: Framework-${{ inputs.config }}-macos-macos-12-universal-openssl
name: Framework-${{ inputs.config }}-macos-macos-13-universal-openssl
path: artifacts
- name: Build XCFramework
shell: pwsh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-reuse-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ on:
# - ubuntu-20.04
# - ubuntu-22.04
# - ubuntu-24.04
# - macos-12
# - macos-13
arch:
required: false
default: 'x64'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ jobs:
matrix:
config: ['Debug', 'Release']
plat: [macos, ios]
os: ['macos-12']
os: ['macos-13']
arch: [x64, arm64]
tls: [openssl, openssl3]
static: ['', '-Static']
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
cargo:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
os: [ubuntu-latest, windows-latest, macos-latest, macos-latest-xlarge]
runs-on: ${{ matrix.os }}
name: Cargo
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dotnet-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
{ plat: "linux", os: "ubuntu-20.04", arch: "x64", tls: "openssl" },
{ plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3" },
{ plat: "linux", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", xdp: "-UseXdp" },
{ plat: "macos", os: "macos-12", arch: "universal", tls: "openssl" },
{ plat: "macos", os: "macos-13", arch: "universal", tls: "openssl" },
]
runs-on: ${{ matrix.vec.os }}
steps:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/stress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ jobs:
fail-fast: false
matrix:
vec: [
{ config: "Debug", plat: "macos", os: "macos-12", arch: "x64", tls: "openssl", build: "-Test" },
{ config: "Debug", plat: "macos", os: "macos-12", arch: "x64", tls: "openssl3", build: "-Test" },
{ config: "Debug", plat: "macos", os: "macos-13", arch: "x64", tls: "openssl", build: "-Test" },
{ config: "Debug", plat: "macos", os: "macos-13", arch: "x64", tls: "openssl3", build: "-Test" },
{ config: "Debug", plat: "linux", os: "ubuntu-20.04", arch: "x64", tls: "openssl", sanitize: "-Sanitize", build: "-Test" },
{ config: "Debug", plat: "linux", os: "ubuntu-20.04", arch: "x64", tls: "openssl3", sanitize: "-Sanitize", build: "-Test" },
{ config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", sanitize: "-Sanitize", build: "-Test" },
Expand Down Expand Up @@ -79,8 +79,8 @@ jobs:
{ config: "Debug", plat: "linux", os: "ubuntu-22.04", arch: "x64", tls: "openssl3", sanitize: "-Sanitize", build: "-Test" },
{ config: "Debug", plat: "linux", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", sanitize: "-Sanitize", build: "-Test" },
{ config: "Debug", plat: "linux", os: "ubuntu-24.04", arch: "x64", tls: "openssl3", build: "-Test", xdp: "-UseXdp" },
{ config: "Debug", plat: "macos", os: "macos-12", arch: "x64", tls: "openssl", build: "-Test" },
{ config: "Debug", plat: "macos", os: "macos-12", arch: "x64", tls: "openssl3", build: "-Test" },
{ config: "Debug", plat: "macos", os: "macos-13", arch: "x64", tls: "openssl", build: "-Test" },
{ config: "Debug", plat: "macos", os: "macos-13", arch: "x64", tls: "openssl3", build: "-Test" },
{ config: "Debug", plat: "windows", os: "windows-2022", arch: "x64", tls: "schannel", sanitize: "-Sanitize", build: "-Test" },
{ config: "Debug", plat: "windows", os: "windows-2022", arch: "x64", tls: "schannel", xdp: "-UseXdp", sanitize: "-Sanitize", build: "-Test" },
{ config: "Debug", plat: "windows", os: "windows-2022", arch: "x64", tls: "openssl", build: "-Test" },
Expand Down
4 changes: 2 additions & 2 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ function CMake-Generate {
}
if ($Platform -eq "macos") {
switch ($Arch) {
"x64" { $Arguments += " -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=""12"""}
"arm64" { $Arguments += " -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=""11.0"""}
"x64" { $Arguments += " -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=""13"""}
"arm64" { $Arguments += " -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=""13"""}
}
}
if ($Platform -eq "linux") {
Expand Down
8 changes: 6 additions & 2 deletions scripts/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@ fn main() {
.define("QUIC_TLS", "openssl")
.define("QUIC_OUTPUT_DIR", "../lib");

// macos-latest's cargo automatically specify --target=${ARCH}-apple-macosx14.5
// which conflicts with -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}.
// Different value than 14.5 will cause the build to fail.
// This hardcoded 14.5 is workaround for this issue.
match target.as_str() {
"x86_64-apple-darwin" => config
.define("CMAKE_OSX_ARCHITECTURES", "x86_64")
.define("CMAKE_OSX_DEPLOYMENT_TARGET", "10.15"),
.define("CMAKE_OSX_DEPLOYMENT_TARGET", "14.5"),
"aarch64-apple-darwin" => config
.define("CMAKE_OSX_ARCHITECTURES", "arm64")
.define("CMAKE_OSX_DEPLOYMENT_TARGET", "11.0"),
.define("CMAKE_OSX_DEPLOYMENT_TARGET", "14.5"),
_ => &mut config
};

Expand Down

0 comments on commit 2060568

Please sign in to comment.