diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f7833e135..f1627b97d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,7 +29,7 @@ on: env: MESON_VERSION: '0.63.3' EM_VERSION: '3.1.68' - PYTHON_VERSION: '3.11.8' + PYTHON_VERSION: '3.11' EM_CACHE_FOLDER: 'emsdk' TAISEI_NOPRELOAD: 0 TAISEI_PRELOAD_REQUIRED: 1 @@ -102,9 +102,9 @@ jobs: if-no-files-found: warn macos-test-build: - name: macOS (x64) + name: macOS (ARM64) if: "!contains(github.event.head_commit.message, '[skip ci]')" - runs-on: macos-12 + runs-on: macos-15 steps: - name: Checkout Code uses: actions/checkout@v4 @@ -140,7 +140,7 @@ jobs: meson setup build/ --native-file misc/ci/common-options.ini --native-file misc/ci/nofallback.ini - --native-file misc/ci/macos-x86_64-build-test-ci.ini + --native-file misc/ci/macos-aarch64-build-test-ci.ini --prefix=$(pwd)/build-test - name: Build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7da8d5b50..10d51008f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,7 +44,7 @@ env: REF: ${{ github.event.inputs.custom-ref || github.ref || 'master' }} MESON_VERSION: '0.63.3' EM_VERSION: '3.1.68' - PYTHON_VERSION: '3.11.8' + PYTHON_VERSION: '3.11' EM_CACHE_FOLDER: 'emsdk' TAISEI_NOPRELOAD: 0 TAISEI_PRELOAD_REQUIRED: 1 @@ -199,7 +199,7 @@ jobs: macos-release-build-universal: name: macOS (Universal) if: ${{ (github.event.inputs.macos-x64-arm64 || 'true') == 'true' }} - runs-on: macos-12 + runs-on: macos-15 steps: - name: Install Tools run: > diff --git a/misc/ci/macos-aarch64-build-release.ini b/misc/ci/macos-aarch64-build-release.ini index 4a69aeb72..510848833 100644 --- a/misc/ci/macos-aarch64-build-release.ini +++ b/misc/ci/macos-aarch64-build-release.ini @@ -1,15 +1,9 @@ [constants] -# apple silicon only supports macOS >=11.x, so just use that -macos_min = '11.1' -cflags = ['-mmacosx-version-min='+macos_min, '-arch', 'arm64', '-mcpu=apple-m1'] +# all Apple Silicon devices are able to install 13.x, and it's the oldest supported macOS +macos_min = '13.1' +cflags = ['-mmacosx-version-min='+macos_min, '-mcpu=apple-m1'] ldflags = cflags -[host_machine] -cpu_family = 'aarch64' -cpu = 'apple-m1' -system = 'darwin' -endian = 'little' - [binaries] c = 'clang' cpp = 'clang++' @@ -17,9 +11,6 @@ objc = 'clang' strip = 'strip' pkgconfig = 'pkg-config' -[properties] -needs_exe_wrapper = true - [project options] install_angle = true r_gles30 = 'enabled' diff --git a/misc/ci/macos-x86_64-build-test-ci.ini b/misc/ci/macos-aarch64-build-test-ci.ini similarity index 71% rename from misc/ci/macos-x86_64-build-test-ci.ini rename to misc/ci/macos-aarch64-build-test-ci.ini index 55c116e5a..e51624ff0 100644 --- a/misc/ci/macos-x86_64-build-test-ci.ini +++ b/misc/ci/macos-aarch64-build-test-ci.ini @@ -1,13 +1,9 @@ [constants] -macos_min = '10.15' -cflags = ['-mmacosx-version-min='+macos_min, '-arch', 'x86_64'] +macos_min = '13.1' +cflags = ['-mmacosx-version-min='+macos_min, '-mcpu=apple-m1'] # NOTE: might need to pass -sdk_version to the linker as well, not sure how that works... ldflags = cflags -[host_machine] -cpu_family = 'x86_64' -system = 'darwin' - [binaries] c = 'clang' cpp = 'clang++' diff --git a/misc/ci/macos-x86_64-build-release.ini b/misc/ci/macos-x86_64-build-release.ini index 3d7d1b3fd..42f7f64ee 100644 --- a/misc/ci/macos-x86_64-build-release.ini +++ b/misc/ci/macos-x86_64-build-release.ini @@ -4,8 +4,13 @@ cflags = ['-mmacosx-version-min='+macos_min, '-arch', 'x86_64'] ldflags = cflags [host_machine] -cpu_family = 'x86_64' system = 'darwin' +cpu_family = 'x86_64' +cpu = 'x86_64' +endian = 'little' + +[properties] +needs_exe_wrapper = true [binaries] c = 'clang' diff --git a/scripts/macos_build_universal.sh b/scripts/macos_build_universal.sh index fd62b2222..26eeeaed2 100755 --- a/scripts/macos_build_universal.sh +++ b/scripts/macos_build_universal.sh @@ -19,4 +19,5 @@ cp -a "$MESON_BUILD_ROOT_MACOS_X64_COMPILED/" "$MESON_BUILD_ROOT_MACOS_COMBINED" printf -- "Combining x64 and AArch64 binaries...\n\n" lipo -create -output "$MESON_BUILD_ROOT_MACOS_COMBINED/$TAISEI_BIN_PATH" "$MESON_BUILD_ROOT_MACOS_X64_COMPILED/$TAISEI_BIN_PATH" "$MESON_BUILD_ROOT_MACOS_AARCH64_COMPILED/$TAISEI_BIN_PATH" +printf -- "Generating macOS .dmg...\n\n" "$TAISEI_ROOT/scripts/macos-gen-dmg.py" "$MAC_BUILD_DIR/compiled/Taisei-$VERSION-universal.dmg" "$MESON_BUILD_ROOT_MACOS_X64" "$MESON_BUILD_ROOT_MACOS_COMBINED" "$@" diff --git a/scripts/macos_setup_universal.sh b/scripts/macos_setup_universal.sh index 46c856f8d..4156d83b9 100755 --- a/scripts/macos_setup_universal.sh +++ b/scripts/macos_setup_universal.sh @@ -13,9 +13,9 @@ lipo "$TAISEI_ROOT/angle-compiled/lib/macOS-arm64-dylib/libGLESv2.dylib" "$TAISE meson setup \ -Dangle_libegl=$TAISEI_ROOT/angle-compiled/lib/macOS-universal-dylib/libEGL.dylib \ -Dangle_libgles=$TAISEI_ROOT/angle-compiled/lib/macOS-universal-dylib/libGLESv2.dylib \ - --native-file "$TAISEI_ROOT/misc/ci/common-options.ini" \ - --native-file "$TAISEI_ROOT/misc/ci/forcefallback.ini" \ - --native-file "$TAISEI_ROOT/misc/ci/macos-x86_64-build-release.ini" \ + --cross-file "$TAISEI_ROOT/misc/ci/common-options.ini" \ + --cross-file "$TAISEI_ROOT/misc/ci/forcefallback.ini" \ + --cross-file "$TAISEI_ROOT/misc/ci/macos-x86_64-build-release.ini" \ --prefix "$MESON_BUILD_ROOT_MACOS_X64_COMPILED" \ "$MESON_BUILD_ROOT_MACOS_X64" \ "$TAISEI_ROOT" "$@" @@ -23,9 +23,9 @@ meson setup \ meson setup \ -Dangle_libegl=$TAISEI_ROOT/angle-compiled/lib/macOS-universal-dylib/libEGL.dylib \ -Dangle_libgles=$TAISEI_ROOT/angle-compiled/lib/macOS-universal-dylib/libGLESv2.dylib \ - --cross-file "$TAISEI_ROOT/misc/ci/common-options.ini" \ - --cross-file "$TAISEI_ROOT/misc/ci/forcefallback.ini" \ - --cross-file "$TAISEI_ROOT/misc/ci/macos-aarch64-build-release.ini" \ + --native-file "$TAISEI_ROOT/misc/ci/common-options.ini" \ + --native-file "$TAISEI_ROOT/misc/ci/forcefallback.ini" \ + --native-file "$TAISEI_ROOT/misc/ci/macos-aarch64-build-release.ini" \ --prefix "$MESON_BUILD_ROOT_MACOS_AARCH64_COMPILED" \ "$MESON_BUILD_ROOT_MACOS_AARCH64" \ "$TAISEI_ROOT" "$@"