From 5ff90481bbd8100fd76bf3447678ebe5ab946c99 Mon Sep 17 00:00:00 2001 From: Huakun Shen Date: Tue, 7 Jan 2025 01:15:53 -0500 Subject: [PATCH] ci: remove universal build support for macOS and simplify OpenSSL checks - Commented out the macOS 14 universal build configuration in the CI workflow due to OpenSSL cross-compilation issues. - Simplified the OpenSSL directory existence checks in the environment check script for better logging and error handling on Windows and macOS platforms. --- .github/workflows/desktop-publish.yml | 5 +++-- packages/ci/scripts/ci-env-check.ts | 27 ++++++--------------------- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/.github/workflows/desktop-publish.yml b/.github/workflows/desktop-publish.yml index 8b30c9c..98fc834 100644 --- a/.github/workflows/desktop-publish.yml +++ b/.github/workflows/desktop-publish.yml @@ -20,8 +20,9 @@ jobs: # args: "--target aarch64-apple-darwin --verbose" # - platform: "macos-13" # for Intel based macs. # args: "--target x86_64-apple-darwin --verbose" - - platform: "macos-14" # for Both Arm and Intel based macs. - args: "--target universal-apple-darwin --verbose" + # Universal Build no longer supported after adding openssl, which is not cross-compilable. + # - platform: "macos-14" # for Both Arm and Intel based macs. + # args: "--target universal-apple-darwin --verbose" # - platform: "ubuntu-22.04" # for Tauri v1 you could replace this with ubuntu-20.04. # args: "--verbose" - platform: "windows-latest" diff --git a/packages/ci/scripts/ci-env-check.ts b/packages/ci/scripts/ci-env-check.ts index a5bd5a7..8efe980 100644 --- a/packages/ci/scripts/ci-env-check.ts +++ b/packages/ci/scripts/ci-env-check.ts @@ -20,32 +20,17 @@ if (process.platform === "win32") { console.log( `Program Files Directory (${programFilesDir}) Exists: ${fs.existsSync(programFilesDir)}` ) - - // check if each directory exists - if (!fs.existsSync(OPENSSL_DIR)) { - console.error("OPENSSL_DIR does not exist", OPENSSL_DIR) - process.exit(1) - } else { - console.log("OPENSSL_DIR exists", OPENSSL_DIR) - } - if (!fs.existsSync(OPENSSL_INCLUDE_DIR)) { - console.error("OPENSSL_INCLUDE_DIR does not exist", OPENSSL_INCLUDE_DIR) - process.exit(1) - } else { - console.log("OPENSSL_INCLUDE_DIR exists", OPENSSL_INCLUDE_DIR) - } - if (!fs.existsSync(OPENSSL_LIB_DIR)) { - console.error("OPENSSL_LIB_DIR does not exist", OPENSSL_LIB_DIR) - process.exit(1) - } else { - console.log("OPENSSL_LIB_DIR exists", OPENSSL_LIB_DIR) - } + console.log(`OPENSSL_DIR (${OPENSSL_DIR}) Exists: ${fs.existsSync(OPENSSL_DIR)}`) + console.log( + `OPENSSL_INCLUDE_DIR (${OPENSSL_INCLUDE_DIR}) Exists: ${fs.existsSync(OPENSSL_INCLUDE_DIR)}` + ) + console.log(`OPENSSL_LIB_DIR (${OPENSSL_LIB_DIR}) Exists: ${fs.existsSync(OPENSSL_LIB_DIR)}`) } else if (process.platform === "darwin") { if (OPENSSL_DIR) { if (fs.existsSync(OPENSSL_DIR)) { console.log("OPENSSL_DIR exists", OPENSSL_DIR) } else { - console.error("OPENSSL_DIR does not exist", OPENSSL_DIR) + console.log("OPENSSL_DIR does not exist", OPENSSL_DIR) } } } else if (process.platform === "linux") {