diff --git a/.github/workflows/oneclient_nightly.yml b/.github/workflows/oneclient_nightly.yml index 2fcf0269..99275230 100644 --- a/.github/workflows/oneclient_nightly.yml +++ b/.github/workflows/oneclient_nightly.yml @@ -28,6 +28,7 @@ jobs: os_key: darwin arch: x86_64 formats: app,dmg + macos_deployment_target: '10.14' - platform: ubuntu-22.04 target: '' os_key: linux @@ -43,6 +44,11 @@ jobs: steps: - uses: actions/checkout@v4 + - name: (macOS) Pin deployment target + if: matrix.macos_deployment_target != '' + shell: bash + run: echo "MACOSX_DEPLOYMENT_TARGET=${{ matrix.macos_deployment_target }}" >> "$GITHUB_ENV" + - name: Setup Rust uses: ./.github/actions/setup-rust with: @@ -74,6 +80,19 @@ jobs: cargo build --release --bin oneclient_app fi + - name: (macOS) Verify deployment target + if: matrix.macos_deployment_target != '' + shell: bash + run: | + set -euo pipefail + bin="target/${{ matrix.target }}/release/oneclient_app" + minos="$(vtool -show-build "$bin" | awk '/minos/ {print $2; exit}')" + echo "linked minos=$minos, declared minimum=${{ matrix.macos_deployment_target }}" + if [ "$(printf '%s\n%s\n' "$minos" "${{ matrix.macos_deployment_target }}" | sort -V | tail -n1)" != "${{ matrix.macos_deployment_target }}" ]; then + echo "::error::Binary requires macOS $minos but the bundle advertises ${{ matrix.macos_deployment_target }}." + exit 1 + fi + - name: Package (unsigned) shell: bash env: diff --git a/.github/workflows/oneclient_release.yml b/.github/workflows/oneclient_release.yml index 35a1857a..f67f51e9 100644 --- a/.github/workflows/oneclient_release.yml +++ b/.github/workflows/oneclient_release.yml @@ -61,6 +61,7 @@ jobs: os_key: darwin arch: x86_64 formats: app,dmg + macos_deployment_target: '10.14' - platform: ubuntu-22.04 target: '' os_key: linux @@ -76,6 +77,11 @@ jobs: steps: - uses: actions/checkout@v4 + - name: (macOS) Pin deployment target + if: matrix.macos_deployment_target != '' + shell: bash + run: echo "MACOSX_DEPLOYMENT_TARGET=${{ matrix.macos_deployment_target }}" >> "$GITHUB_ENV" + - name: Setup Rust uses: ./.github/actions/setup-rust with: @@ -143,6 +149,19 @@ jobs: cargo build --release --bin oneclient_app fi + - name: (macOS) Verify deployment target + if: matrix.macos_deployment_target != '' + shell: bash + run: | + set -euo pipefail + bin="target/${{ matrix.target }}/release/oneclient_app" + minos="$(vtool -show-build "$bin" | awk '/minos/ {print $2; exit}')" + echo "linked minos=$minos, declared minimum=${{ matrix.macos_deployment_target }}" + if [ "$(printf '%s\n%s\n' "$minos" "${{ matrix.macos_deployment_target }}" | sort -V | tail -n1)" != "${{ matrix.macos_deployment_target }}" ]; then + echo "::error::Binary requires macOS $minos but the bundle advertises ${{ matrix.macos_deployment_target }}." + exit 1 + fi + - name: Package shell: bash env: diff --git a/packages/oneclient_app/Cargo.toml b/packages/oneclient_app/Cargo.toml index 3218cd8c..1f0d6793 100644 --- a/packages/oneclient_app/Cargo.toml +++ b/packages/oneclient_app/Cargo.toml @@ -69,7 +69,7 @@ icons = [ ] [package.metadata.packager.macos] -minimum-system-version = "10.15" +minimum-system-version = "10.14" entitlements = "distribution/App.entitlements" info-plist-path = "distribution/Info.plist"