From 699652857385e6abfbf0bec0e36bcc4d0978a889 Mon Sep 17 00:00:00 2001 From: samuelOsborne Date: Fri, 14 Jun 2024 11:23:24 +0200 Subject: [PATCH 01/12] chore: trying to fix sdk issue --- .github/workflows/check-pr.yaml | 39 +++++++++++++++------------------ Makefile | 7 +++--- 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index eee16170..30017aed 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -1,37 +1,34 @@ -name: Check PR +name: Build Artifacts on: - pull_request: - branches: [main] + push: jobs: - check-pr: - if: github.head_ref != 'release' + build: runs-on: macos-12 steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.9.1 + - name: Checkout Repository + uses: actions/checkout@v4 with: - access_token: ${{ github.token }} - - uses: actions/checkout@v4 + ref: ${{ github.event.inputs.commitSHA || github.ref }} + - uses: Homebrew/actions/setup-homebrew@master - uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: "13.3.1" - uses: ningenMe/setup-rustup@v1.1.0 + - name: Install Make run: brew install make + - name: Build Setup run: make mac-setup - - name: Build Artifacts - env: - APPLE_XCODE_APP_NAME: Xcode_13.3.1.app - APPLE_MACOSX_SDK: MacOSX12.3 - run: make demo-player - - name: Run Tests - run: make test - - name: Run Clippy - run: make clippy - # Make sure CI fails on all warnings, including Clippy lints - env: - RUSTFLAGS: "-Dwarnings" + + - name: Build Apple + run: rm -f /usr/local/lib/libjpeg* ; make aarch64-apple-ios + + - name: Upload Apple Artifacts + uses: actions/upload-artifact@v3 + with: + name: apple + path: ./release/apple/*.tar.gz \ No newline at end of file diff --git a/Makefile b/Makefile index 8467eae7..c8600c11 100644 --- a/Makefile +++ b/Makefile @@ -208,7 +208,7 @@ cpp = ['clang++', '-arch', '$(ARCH)', '-isysroot', '/Applications/${APPLE_XCODE_ ld = 'ld' ar = 'ar' strip = 'strip' -pkg-config = 'pkg-config' +pkg-config = 'pkg-APPLE_MACOSX_SDKconfig' [properties] root = '/Applications/${APPLE_XCODE_APP_NAME}/Contents/Developer/Platforms/$(SDK).platform/Developer' @@ -315,7 +315,6 @@ define SETUP_MESON -Ddefault_library=static \ -Dbindings=capi \ -Dlog=$(LOG) \ - -Dthreads=false \ -Dstatic=$(STATIC) \ -Dextra=$(EXTRA) \ $(CROSS_FILE) "$(THORVG_DEP_SOURCE_DIR)" "$(THORVG_DEP_BUILD_DIR)" @@ -423,11 +422,11 @@ define CREATE_FRAMEWORK -c "Add :CFBundleShortVersionString string 1.0.0" \ -c "Add :CFBundlePackageType string FMWK" \ -c "Add :CFBundleExecutable string $(DOTLOTTIE_PLAYER_MODULE)" \ - -c "Add :MinimumOSVersion string $(MIN_OS_VERSION)" \ + -c "Add :MinimumOSVersion string 13" \ -c "Add :CFBundleSupportedPlatforms array" \ $(foreach platform,$(PLIST_DISABLE),-c "Add :CFBundleSupportedPlatforms:0 string $(platform)" ) \ $(foreach platform,$(PLIST_ENABLE),-c "Add :CFBundleSupportedPlatforms:1 string $(platform)" ) \ - $(BASE_DIR)/$(DOTLOTTIE_PLAYER_FRAMEWORK)/$(INFO_PLIST) + $(BASE_DIR)/$(DOTLOTTIE_PLAYER_FRAMEWORK)/$(INFO_PLIST) $(INSTALL_NAME_TOOL) -id @rpath/$(DOTLOTTIE_PLAYER_FRAMEWORK)/$(DOTLOTTIE_PLAYER_MODULE) $(BASE_DIR)/$(DOTLOTTIE_PLAYER_FRAMEWORK)/$(DOTLOTTIE_PLAYER_MODULE) From 5e43065ed3d3f5f204d1855c9539269c2804f1a2 Mon Sep 17 00:00:00 2001 From: samuelOsborne Date: Fri, 14 Jun 2024 12:47:06 +0200 Subject: [PATCH 02/12] fix: set APPLE_MACOSX_SDK to MacOSX13 --- .github/workflows/check-pr.yaml | 3 +++ Makefile | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index 30017aed..049de582 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -25,6 +25,9 @@ jobs: run: make mac-setup - name: Build Apple + env: + APPLE_XCODE_APP_NAME: Xcode_13.3.1.app + APPLE_MACOSX_SDK: MacOSX13 run: rm -f /usr/local/lib/libjpeg* ; make aarch64-apple-ios - name: Upload Apple Artifacts diff --git a/Makefile b/Makefile index c8600c11..7a03da01 100644 --- a/Makefile +++ b/Makefile @@ -422,11 +422,11 @@ define CREATE_FRAMEWORK -c "Add :CFBundleShortVersionString string 1.0.0" \ -c "Add :CFBundlePackageType string FMWK" \ -c "Add :CFBundleExecutable string $(DOTLOTTIE_PLAYER_MODULE)" \ - -c "Add :MinimumOSVersion string 13" \ + -c "Add :MinimumOSVersion string $(MIN_OS_VERSION)" \ -c "Add :CFBundleSupportedPlatforms array" \ $(foreach platform,$(PLIST_DISABLE),-c "Add :CFBundleSupportedPlatforms:0 string $(platform)" ) \ $(foreach platform,$(PLIST_ENABLE),-c "Add :CFBundleSupportedPlatforms:1 string $(platform)" ) \ - $(BASE_DIR)/$(DOTLOTTIE_PLAYER_FRAMEWORK)/$(INFO_PLIST) + $(BASE_DIR)/$(DOTLOTTIE_PLAYER_FRAMEWORK)/$(INFO_PLIST) $(INSTALL_NAME_TOOL) -id @rpath/$(DOTLOTTIE_PLAYER_FRAMEWORK)/$(DOTLOTTIE_PLAYER_MODULE) $(BASE_DIR)/$(DOTLOTTIE_PLAYER_FRAMEWORK)/$(DOTLOTTIE_PLAYER_MODULE) From d8a2e1950e10bac2f8a96f1ad93b4a439af62b0c Mon Sep 17 00:00:00 2001 From: samuelOsborne Date: Tue, 18 Jun 2024 17:11:54 +0200 Subject: [PATCH 03/12] chore: re-trying ios sdk previous fix --- .github/workflows/check-pr.yaml | 21 +++++++++++++++++---- Makefile | 27 +++++++++------------------ 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index 049de582..0167bca3 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -16,6 +16,22 @@ jobs: - uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: "13.3.1" + + - name: "Log xcode version" + run: xcodebuild -version + + - name: "Log available xcodes" + run: ls -l /Applications + + - name: "Log xcode sdks" + run: xcodebuild -showsdks + + - name: "Log MacOSX SDKs" + run: ls -l /Applications/Xcode_13.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ + + # - name: "Link MacOSX.sdk to MacOSX12.sdk" + # run: ln -sfn /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk + - uses: ningenMe/setup-rustup@v1.1.0 - name: Install Make @@ -25,10 +41,7 @@ jobs: run: make mac-setup - name: Build Apple - env: - APPLE_XCODE_APP_NAME: Xcode_13.3.1.app - APPLE_MACOSX_SDK: MacOSX13 - run: rm -f /usr/local/lib/libjpeg* ; make aarch64-apple-ios + run: rm -f /usr/local/lib/libjpeg* ; make apple - name: Upload Apple Artifacts uses: actions/upload-artifact@v3 diff --git a/Makefile b/Makefile index 7a03da01..e3ff6e2b 100644 --- a/Makefile +++ b/Makefile @@ -67,8 +67,7 @@ APPLE_BUILD := $(BUILD)/$(APPLE) APPLE_IOS := ios APPLE_IOS_PLATFORM := iPhoneOS APPLE_IOS_SDK ?= iPhoneOS -APPLE_IOS_VERSION_MIN ?= 15.4 -APPLE_XCODE_APP_NAME ?= Xcode.app +APPLE_IOS_VERSION_MIN ?= 11.0 APPLE_IOS_SIMULATOR := ios-simulator APPLE_IOS_SIMULATOR_PLATFORM := iPhoneSimulator @@ -76,7 +75,7 @@ APPLE_IOS_SIMULATOR_SDK ?= iPhoneSimulator APPLE_MACOSX := macosx APPLE_MACOSX_PLATFORM := MacOSX -APPLE_MACOSX_SDK ?= MacOSX +APPLE_MACOSX_SDK ?= MacOSX12.3 APPLE_IOS_FRAMEWORK_TYPE := $(APPLE_IOS) APPLE_IOS_SIMULATOR_FRAMEWORK_TYPE := $(APPLE_IOS_SIMULATOR) @@ -204,14 +203,14 @@ endef define APPLE_CROSS_FILE [binaries] -cpp = ['clang++', '-arch', '$(ARCH)', '-isysroot', '/Applications/${APPLE_XCODE_APP_NAME}/Contents/Developer/Platforms/$(PLATFORM).platform/Developer/SDKs/$(SDK).sdk'] +cpp = ['clang++', '-arch', '$(ARCH)', '-isysroot', '/Applications/Xcode_13.3.1.app/Contents/Developer/Platforms/$(PLATFORM).platform/Developer/SDKs/$(SDK).sdk'] ld = 'ld' ar = 'ar' strip = 'strip' -pkg-config = 'pkg-APPLE_MACOSX_SDKconfig' +pkg-config = 'pkg-config' [properties] -root = '/Applications/${APPLE_XCODE_APP_NAME}/Contents/Developer/Platforms/$(SDK).platform/Developer' +root = '/Applications/Xcode_13.3.1.app/Contents/Developer/Platforms/$(SDK).platform/Developer' has_function_printf = true $(if $(filter $(PLATFORM),$(APPLE_IOS_PLATFORM) $(APPLE_IOS_SIMULATOR_PLATFORM)),\ @@ -315,6 +314,7 @@ define SETUP_MESON -Ddefault_library=static \ -Dbindings=capi \ -Dlog=$(LOG) \ + -Dthreads=false \ -Dstatic=$(STATIC) \ -Dextra=$(EXTRA) \ $(CROSS_FILE) "$(THORVG_DEP_SOURCE_DIR)" "$(THORVG_DEP_BUILD_DIR)" @@ -400,14 +400,6 @@ define LIPO_CREATE -o $@ endef -MIN_OS_VERSION_IOS=15.4 -MIN_OS_VERSION_MACOS=12 -ifneq (,$(findstring MacOSX,$(PLIST_ENABLE))) - MIN_OS_VERSION = $(MIN_OS_VERSION_IOS) -else - MIN_OS_VERSION = $(MIN_OS_VERSION_MACOS) -endif - define CREATE_FRAMEWORK rm -rf $(BASE_DIR)/$(DOTLOTTIE_PLAYER_FRAMEWORK) $(RELEASE)/$(APPLE)/$(DOTLOTTIE_PLAYER_XCFRAMEWORK) mkdir -p $(BASE_DIR)/$(DOTLOTTIE_PLAYER_FRAMEWORK)/{$(FRAMEWORK_HEADERS),$(FRAMEWORK_MODULES)} @@ -422,12 +414,11 @@ define CREATE_FRAMEWORK -c "Add :CFBundleShortVersionString string 1.0.0" \ -c "Add :CFBundlePackageType string FMWK" \ -c "Add :CFBundleExecutable string $(DOTLOTTIE_PLAYER_MODULE)" \ - -c "Add :MinimumOSVersion string $(MIN_OS_VERSION)" \ + -c "Add :MinimumOSVersion string 15.4" \ -c "Add :CFBundleSupportedPlatforms array" \ $(foreach platform,$(PLIST_DISABLE),-c "Add :CFBundleSupportedPlatforms:0 string $(platform)" ) \ $(foreach platform,$(PLIST_ENABLE),-c "Add :CFBundleSupportedPlatforms:1 string $(platform)" ) \ - $(BASE_DIR)/$(DOTLOTTIE_PLAYER_FRAMEWORK)/$(INFO_PLIST) - + $(BASE_DIR)/$(DOTLOTTIE_PLAYER_FRAMEWORK)/$(INFO_PLIST) $(INSTALL_NAME_TOOL) -id @rpath/$(DOTLOTTIE_PLAYER_FRAMEWORK)/$(DOTLOTTIE_PLAYER_MODULE) $(BASE_DIR)/$(DOTLOTTIE_PLAYER_FRAMEWORK)/$(DOTLOTTIE_PLAYER_MODULE) endef @@ -1014,4 +1005,4 @@ help: @echo " - $(YELLOW)bench$(NC) - run all benchmarks" @echo " - $(YELLOW)clippy$(NC) - run clippy on all projects" @echo - @echo + @echo \ No newline at end of file From 4b275bd6c7cbc051c05594fb8417e744510ab125 Mon Sep 17 00:00:00 2001 From: samuelOsborne Date: Wed, 19 Jun 2024 10:53:05 +0200 Subject: [PATCH 04/12] fix: restored variables to test fix --- .github/workflows/check-pr.yaml | 3 +++ Makefile | 10 +++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index 0167bca3..8add2869 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -41,6 +41,9 @@ jobs: run: make mac-setup - name: Build Apple + env: + APPLE_XCODE_APP_NAME: Xcode_13.3.1.app + APPLE_MACOSX_SDK: MacOSX12.3 run: rm -f /usr/local/lib/libjpeg* ; make apple - name: Upload Apple Artifacts diff --git a/Makefile b/Makefile index e3ff6e2b..e43d7250 100644 --- a/Makefile +++ b/Makefile @@ -67,7 +67,7 @@ APPLE_BUILD := $(BUILD)/$(APPLE) APPLE_IOS := ios APPLE_IOS_PLATFORM := iPhoneOS APPLE_IOS_SDK ?= iPhoneOS -APPLE_IOS_VERSION_MIN ?= 11.0 +APPLE_IOS_VERSION_MIN ?= 15 APPLE_IOS_SIMULATOR := ios-simulator APPLE_IOS_SIMULATOR_PLATFORM := iPhoneSimulator @@ -75,7 +75,7 @@ APPLE_IOS_SIMULATOR_SDK ?= iPhoneSimulator APPLE_MACOSX := macosx APPLE_MACOSX_PLATFORM := MacOSX -APPLE_MACOSX_SDK ?= MacOSX12.3 +APPLE_MACOSX_SDK ?= MacOSX APPLE_IOS_FRAMEWORK_TYPE := $(APPLE_IOS) APPLE_IOS_SIMULATOR_FRAMEWORK_TYPE := $(APPLE_IOS_SIMULATOR) @@ -203,14 +203,14 @@ endef define APPLE_CROSS_FILE [binaries] -cpp = ['clang++', '-arch', '$(ARCH)', '-isysroot', '/Applications/Xcode_13.3.1.app/Contents/Developer/Platforms/$(PLATFORM).platform/Developer/SDKs/$(SDK).sdk'] +cpp = ['clang++', '-arch', '$(ARCH)', '-isysroot', '/Applications/$(APPLE_XCODE_APP_NAME)/Contents/Developer/Platforms/$(PLATFORM).platform/Developer/SDKs/$(SDK).sdk'] ld = 'ld' ar = 'ar' strip = 'strip' pkg-config = 'pkg-config' [properties] -root = '/Applications/Xcode_13.3.1.app/Contents/Developer/Platforms/$(SDK).platform/Developer' +root = '/Applications/$(APPLE_XCODE_APP_NAME)/Contents/Developer/Platforms/$(SDK).platform/Developer' has_function_printf = true $(if $(filter $(PLATFORM),$(APPLE_IOS_PLATFORM) $(APPLE_IOS_SIMULATOR_PLATFORM)),\ @@ -414,7 +414,7 @@ define CREATE_FRAMEWORK -c "Add :CFBundleShortVersionString string 1.0.0" \ -c "Add :CFBundlePackageType string FMWK" \ -c "Add :CFBundleExecutable string $(DOTLOTTIE_PLAYER_MODULE)" \ - -c "Add :MinimumOSVersion string 15.4" \ + -c "Add :MinimumOSVersion string $(APPLE_IOS_VERSION_MIN)" \ -c "Add :CFBundleSupportedPlatforms array" \ $(foreach platform,$(PLIST_DISABLE),-c "Add :CFBundleSupportedPlatforms:0 string $(platform)" ) \ $(foreach platform,$(PLIST_ENABLE),-c "Add :CFBundleSupportedPlatforms:1 string $(platform)" ) \ From be6c9902d489abca62cf9f807cb2b26aea8cfeca Mon Sep 17 00:00:00 2001 From: samuelOsborne Date: Wed, 19 Jun 2024 13:51:00 +0200 Subject: [PATCH 05/12] fix: restored APPLE_IOS_VERSION_MIN to 11.0 --- .github/workflows/check-pr.yaml | 1 + Makefile | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index 8add2869..897eaa7b 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -44,6 +44,7 @@ jobs: env: APPLE_XCODE_APP_NAME: Xcode_13.3.1.app APPLE_MACOSX_SDK: MacOSX12.3 + APPLE_IOS_VERSION_MIN: 11.0 run: rm -f /usr/local/lib/libjpeg* ; make apple - name: Upload Apple Artifacts diff --git a/Makefile b/Makefile index e43d7250..a8612099 100644 --- a/Makefile +++ b/Makefile @@ -67,7 +67,7 @@ APPLE_BUILD := $(BUILD)/$(APPLE) APPLE_IOS := ios APPLE_IOS_PLATFORM := iPhoneOS APPLE_IOS_SDK ?= iPhoneOS -APPLE_IOS_VERSION_MIN ?= 15 +APPLE_IOS_VERSION_MIN ?= 11.0 APPLE_IOS_SIMULATOR := ios-simulator APPLE_IOS_SIMULATOR_PLATFORM := iPhoneSimulator From e798c327bcbb118572d9cb7b805eb591aa76e9f9 Mon Sep 17 00:00:00 2001 From: samuelOsborne Date: Wed, 19 Jun 2024 15:10:31 +0200 Subject: [PATCH 06/12] fix: set APPLE_MACOSX_SDK to MacOSX12.3 --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a8612099..6391eda9 100644 --- a/Makefile +++ b/Makefile @@ -75,7 +75,8 @@ APPLE_IOS_SIMULATOR_SDK ?= iPhoneSimulator APPLE_MACOSX := macosx APPLE_MACOSX_PLATFORM := MacOSX -APPLE_MACOSX_SDK ?= MacOSX +APPLE_MACOSX_SDK ?= MacOSX12.3 +APPLE_XCODE_APP_NAME ?= Xcode_13.3.1.app APPLE_IOS_FRAMEWORK_TYPE := $(APPLE_IOS) APPLE_IOS_SIMULATOR_FRAMEWORK_TYPE := $(APPLE_IOS_SIMULATOR) From 2657bffcbcd245fd6072c75434da48b2e17a80d3 Mon Sep 17 00:00:00 2001 From: samuelOsborne Date: Wed, 19 Jun 2024 16:03:20 +0200 Subject: [PATCH 07/12] fix: replaced APPLE_XCODE_APP_NAME with Xcode_13.3.1.app --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 6391eda9..0c6673c1 100644 --- a/Makefile +++ b/Makefile @@ -204,14 +204,14 @@ endef define APPLE_CROSS_FILE [binaries] -cpp = ['clang++', '-arch', '$(ARCH)', '-isysroot', '/Applications/$(APPLE_XCODE_APP_NAME)/Contents/Developer/Platforms/$(PLATFORM).platform/Developer/SDKs/$(SDK).sdk'] +cpp = ['clang++', '-arch', '$(ARCH)', '-isysroot', '/Applications/Xcode_13.3.1.app/Contents/Developer/Platforms/$(PLATFORM).platform/Developer/SDKs/$(SDK).sdk'] ld = 'ld' ar = 'ar' strip = 'strip' pkg-config = 'pkg-config' [properties] -root = '/Applications/$(APPLE_XCODE_APP_NAME)/Contents/Developer/Platforms/$(SDK).platform/Developer' +root = '/Applications/Xcode_13.3.1.app/Contents/Developer/Platforms/$(SDK).platform/Developer' has_function_printf = true $(if $(filter $(PLATFORM),$(APPLE_IOS_PLATFORM) $(APPLE_IOS_SIMULATOR_PLATFORM)),\ From 042e59560509e2372a6e8a992dfa32e5677d0f1a Mon Sep 17 00:00:00 2001 From: samuelOsborne Date: Wed, 19 Jun 2024 17:19:14 +0200 Subject: [PATCH 08/12] fix: removed env vars, set MinimumOSVersion to 15.4 --- .github/workflows/check-pr.yaml | 8 ++++---- Makefile | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index 897eaa7b..6c5e095e 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -41,10 +41,10 @@ jobs: run: make mac-setup - name: Build Apple - env: - APPLE_XCODE_APP_NAME: Xcode_13.3.1.app - APPLE_MACOSX_SDK: MacOSX12.3 - APPLE_IOS_VERSION_MIN: 11.0 + # env: + # APPLE_XCODE_APP_NAME: Xcode_13.3.1.app + # APPLE_MACOSX_SDK: MacOSX12.3 + # APPLE_IOS_VERSION_MIN: 11.0 run: rm -f /usr/local/lib/libjpeg* ; make apple - name: Upload Apple Artifacts diff --git a/Makefile b/Makefile index 0c6673c1..2c0d6f8d 100644 --- a/Makefile +++ b/Makefile @@ -415,7 +415,7 @@ define CREATE_FRAMEWORK -c "Add :CFBundleShortVersionString string 1.0.0" \ -c "Add :CFBundlePackageType string FMWK" \ -c "Add :CFBundleExecutable string $(DOTLOTTIE_PLAYER_MODULE)" \ - -c "Add :MinimumOSVersion string $(APPLE_IOS_VERSION_MIN)" \ + -c "Add :MinimumOSVersion string 15.4" \ -c "Add :CFBundleSupportedPlatforms array" \ $(foreach platform,$(PLIST_DISABLE),-c "Add :CFBundleSupportedPlatforms:0 string $(platform)" ) \ $(foreach platform,$(PLIST_ENABLE),-c "Add :CFBundleSupportedPlatforms:1 string $(platform)" ) \ From 72c0e19ed28b689572a7bd3a028fb24279686b09 Mon Sep 17 00:00:00 2001 From: samuelOsborne Date: Wed, 19 Jun 2024 18:23:48 +0200 Subject: [PATCH 09/12] fix: restored env configuration to check if thats the issue --- .github/workflows/check-pr.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index 6c5e095e..897eaa7b 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -41,10 +41,10 @@ jobs: run: make mac-setup - name: Build Apple - # env: - # APPLE_XCODE_APP_NAME: Xcode_13.3.1.app - # APPLE_MACOSX_SDK: MacOSX12.3 - # APPLE_IOS_VERSION_MIN: 11.0 + env: + APPLE_XCODE_APP_NAME: Xcode_13.3.1.app + APPLE_MACOSX_SDK: MacOSX12.3 + APPLE_IOS_VERSION_MIN: 11.0 run: rm -f /usr/local/lib/libjpeg* ; make apple - name: Upload Apple Artifacts From f865e5b6b674056703cf828c85c98c004ca169c9 Mon Sep 17 00:00:00 2001 From: samuelOsborne Date: Wed, 19 Jun 2024 19:11:26 +0200 Subject: [PATCH 10/12] fix: configured cpp_args --- .github/workflows/check-pr.yaml | 2 +- Makefile | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index 897eaa7b..1d4c818c 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -44,7 +44,7 @@ jobs: env: APPLE_XCODE_APP_NAME: Xcode_13.3.1.app APPLE_MACOSX_SDK: MacOSX12.3 - APPLE_IOS_VERSION_MIN: 11.0 + APPLE_IOS_VERSION_MIN: 15.4 run: rm -f /usr/local/lib/libjpeg* ; make apple - name: Upload Apple Artifacts diff --git a/Makefile b/Makefile index 2c0d6f8d..8da243af 100644 --- a/Makefile +++ b/Makefile @@ -67,7 +67,9 @@ APPLE_BUILD := $(BUILD)/$(APPLE) APPLE_IOS := ios APPLE_IOS_PLATFORM := iPhoneOS APPLE_IOS_SDK ?= iPhoneOS -APPLE_IOS_VERSION_MIN ?= 11.0 +APPLE_IOS_VERSION_MIN ?= 15 +THORVG_APPLE_IOS_VERSION_MIN ?= 11.0 # Minimum iOS version supported by ThorVG, needs to be the same for cpp_args and cpp_link_args +APPLE_XCODE_APP_NAME ?= Xcode_13.3.1.app APPLE_IOS_SIMULATOR := ios-simulator APPLE_IOS_SIMULATOR_PLATFORM := iPhoneSimulator @@ -75,8 +77,7 @@ APPLE_IOS_SIMULATOR_SDK ?= iPhoneSimulator APPLE_MACOSX := macosx APPLE_MACOSX_PLATFORM := MacOSX -APPLE_MACOSX_SDK ?= MacOSX12.3 -APPLE_XCODE_APP_NAME ?= Xcode_13.3.1.app +APPLE_MACOSX_SDK ?= MacOSX APPLE_IOS_FRAMEWORK_TYPE := $(APPLE_IOS) APPLE_IOS_SIMULATOR_FRAMEWORK_TYPE := $(APPLE_IOS_SIMULATOR) @@ -204,20 +205,20 @@ endef define APPLE_CROSS_FILE [binaries] -cpp = ['clang++', '-arch', '$(ARCH)', '-isysroot', '/Applications/Xcode_13.3.1.app/Contents/Developer/Platforms/$(PLATFORM).platform/Developer/SDKs/$(SDK).sdk'] +cpp = ['clang++', '-arch', '$(ARCH)', '-isysroot', '/Applications/$(APPLE_XCODE_APP_NAME)/Contents/Developer/Platforms/$(PLATFORM).platform/Developer/SDKs/$(SDK).sdk'] ld = 'ld' ar = 'ar' strip = 'strip' pkg-config = 'pkg-config' [properties] -root = '/Applications/Xcode_13.3.1.app/Contents/Developer/Platforms/$(SDK).platform/Developer' +root = '/Applications/$(APPLE_XCODE_APP_NAME)/Contents/Developer/Platforms/$(SDK).platform/Developer' has_function_printf = true $(if $(filter $(PLATFORM),$(APPLE_IOS_PLATFORM) $(APPLE_IOS_SIMULATOR_PLATFORM)),\ [built-in options]\n\ -cpp_args = ['-miphoneos-version-min=$(APPLE_IOS_VERSION_MIN)']\n\ -cpp_link_args = ['-miphoneos-version-min=$(APPLE_IOS_VERSION_MIN)']\n\ +cpp_args = ['-miphoneos-version-min=$(THORVG_APPLE_IOS_VERSION_MIN)']\n\ +cpp_link_args = ['-miphoneos-version-min=$(THORVG_APPLE_IOS_VERSION_MIN)']\n\ ,) [host_machine] @@ -415,7 +416,7 @@ define CREATE_FRAMEWORK -c "Add :CFBundleShortVersionString string 1.0.0" \ -c "Add :CFBundlePackageType string FMWK" \ -c "Add :CFBundleExecutable string $(DOTLOTTIE_PLAYER_MODULE)" \ - -c "Add :MinimumOSVersion string 15.4" \ + -c "Add :MinimumOSVersion string $(APPLE_IOS_VERSION_MIN)" \ -c "Add :CFBundleSupportedPlatforms array" \ $(foreach platform,$(PLIST_DISABLE),-c "Add :CFBundleSupportedPlatforms:0 string $(platform)" ) \ $(foreach platform,$(PLIST_ENABLE),-c "Add :CFBundleSupportedPlatforms:1 string $(platform)" ) \ From 0957944a9138d77ae1caed8886519f39c2c269b3 Mon Sep 17 00:00:00 2001 From: samuelOsborne Date: Wed, 19 Jun 2024 19:56:33 +0200 Subject: [PATCH 11/12] fix: final cleanup for merge --- .github/workflows/check-pr.yaml | 54 ++++++++++++--------------------- Makefile | 4 +-- 2 files changed, 21 insertions(+), 37 deletions(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index 1d4c818c..367b1e16 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -1,54 +1,38 @@ -name: Build Artifacts + +name: Check PR on: - push: + pull_request: + branches: [main] jobs: - build: + check-pr: + if: github.head_ref != 'release' runs-on: macos-12 steps: - - name: Checkout Repository - uses: actions/checkout@v4 + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 with: - ref: ${{ github.event.inputs.commitSHA || github.ref }} - + access_token: ${{ github.token }} + - uses: actions/checkout@v4 - uses: Homebrew/actions/setup-homebrew@master - uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: "13.3.1" - - - name: "Log xcode version" - run: xcodebuild -version - - - name: "Log available xcodes" - run: ls -l /Applications - - - name: "Log xcode sdks" - run: xcodebuild -showsdks - - - name: "Log MacOSX SDKs" - run: ls -l /Applications/Xcode_13.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ - - # - name: "Link MacOSX.sdk to MacOSX12.sdk" - # run: ln -sfn /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk - - uses: ningenMe/setup-rustup@v1.1.0 - - name: Install Make run: brew install make - - name: Build Setup run: make mac-setup - - - name: Build Apple + - name: Build Artifacts env: APPLE_XCODE_APP_NAME: Xcode_13.3.1.app APPLE_MACOSX_SDK: MacOSX12.3 - APPLE_IOS_VERSION_MIN: 15.4 - run: rm -f /usr/local/lib/libjpeg* ; make apple - - - name: Upload Apple Artifacts - uses: actions/upload-artifact@v3 - with: - name: apple - path: ./release/apple/*.tar.gz \ No newline at end of file + run: make demo-player + - name: Run Tests + run: make test + - name: Run Clippy + run: make clippy + # Make sure CI fails on all warnings, including Clippy lints + env: + RUSTFLAGS: "-Dwarnings" diff --git a/Makefile b/Makefile index 8da243af..fefec715 100644 --- a/Makefile +++ b/Makefile @@ -67,9 +67,9 @@ APPLE_BUILD := $(BUILD)/$(APPLE) APPLE_IOS := ios APPLE_IOS_PLATFORM := iPhoneOS APPLE_IOS_SDK ?= iPhoneOS -APPLE_IOS_VERSION_MIN ?= 15 +APPLE_IOS_VERSION_MIN ?= 15.4 THORVG_APPLE_IOS_VERSION_MIN ?= 11.0 # Minimum iOS version supported by ThorVG, needs to be the same for cpp_args and cpp_link_args -APPLE_XCODE_APP_NAME ?= Xcode_13.3.1.app +APPLE_XCODE_APP_NAME ?= Xcode.app APPLE_IOS_SIMULATOR := ios-simulator APPLE_IOS_SIMULATOR_PLATFORM := iPhoneSimulator From 1dccd0f3a4c12d8c5731575b3d58d5f5e26fb558 Mon Sep 17 00:00:00 2001 From: samuelOsborne Date: Thu, 20 Jun 2024 10:13:05 +0200 Subject: [PATCH 12/12] fix: removed whitespace --- .github/workflows/check-pr.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml index 367b1e16..eee16170 100644 --- a/.github/workflows/check-pr.yaml +++ b/.github/workflows/check-pr.yaml @@ -1,4 +1,3 @@ - name: Check PR on: