From ba4f8a3024127cf59ebe78f88430b17a4d2acbf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Tue, 5 Jul 2022 14:06:06 +0200 Subject: [PATCH] Add Woodpecker macOS/arm64 CI (#2992) Package names have also been updated to the scheme used since v2.1.0, to better represent different architectures. --- .github/workflows/ccpp.yml | 6 ++--- .woodpecker/macos-arm64.yml | 49 +++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 .woodpecker/macos-arm64.yml diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 4adc9fd1..4680f131 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -156,7 +156,7 @@ jobs: -ignore-glob=usr/lib/python3.9/**/* \ -verbose=2 find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq - export APPIMAGE_FILE="Cutter-${PACKAGE_ID}-x64.Linux.AppImage" + export APPIMAGE_FILE="Cutter-${PACKAGE_ID}-Linux-x86_64.AppImage" mv Cutter-*-x86_64.AppImage "$APPIMAGE_FILE" echo PACKAGE_NAME=$APPIMAGE_FILE >> $GITHUB_ENV echo UPLOAD_ASSET_TYPE=application/x-executable >> $GITHUB_ENV @@ -173,7 +173,7 @@ jobs: source scripts/prepare_breakpad_macos.sh mkdir build cd build - PACKAGE_NAME=Cutter-${PACKAGE_ID}-x64.macOS + PACKAGE_NAME=Cutter-${PACKAGE_ID}-macOS-x86_64 cmake \ -DCMAKE_BUILD_TYPE=Release \ -DPYTHON_LIBRARY="$CUTTER_DEPS_PYTHON_PREFIX/lib/libpython3.9.dylib" \ @@ -219,7 +219,7 @@ jobs: cd mkdir build cd build - set PACKAGE_NAME=cutter-%PACKAGE_ID%-x64.Windows + set PACKAGE_NAME=Cutter-%PACKAGE_ID%-Windows-x86_64 cmake ^ -DCMAKE_BUILD_TYPE=Release ^ -DCUTTER_USE_BUNDLED_RIZIN=ON ^ diff --git a/.woodpecker/macos-arm64.yml b/.woodpecker/macos-arm64.yml new file mode 100644 index 00000000..96ce1457 --- /dev/null +++ b/.woodpecker/macos-arm64.yml @@ -0,0 +1,49 @@ +platform: darwin/arm64 + +pipeline: + fetch-deps: + image: /bin/bash + commands: + - scripts/fetch_deps.sh + build: + image: /bin/bash + commands: + - set -e + - export PACKAGE_ID=${CI_COMMIT_TAG=git-`date "+%Y-%m-%d"`-${CI_COMMIT_SHA}} + - export PACKAGE_NAME=Cutter-$${PACKAGE_ID}-macOS-arm64 + - source cutter-deps/env.sh + - source scripts/prepare_breakpad_macos.sh + - cmake -Bbuild -GNinja + -DCMAKE_BUILD_TYPE=Release + -DPYTHON_LIBRARY="$$CUTTER_DEPS_PYTHON_PREFIX/lib/libpython3.9.dylib" + -DPYTHON_INCLUDE_DIR="$$CUTTER_DEPS_PYTHON_PREFIX/include/python3.9" + -DPYTHON_EXECUTABLE="$$CUTTER_DEPS_PYTHON_PREFIX/bin/python3" + -DCUTTER_ENABLE_PYTHON=ON + -DCUTTER_ENABLE_PYTHON_BINDINGS=ON + -DCUTTER_ENABLE_CRASH_REPORTS=ON + -DCUTTER_USE_BUNDLED_RIZIN=ON + -DCUTTER_ENABLE_PACKAGING=ON + -DCUTTER_ENABLE_SIGDB=ON + -DCUTTER_PACKAGE_DEPENDENCIES=ON + -DCUTTER_ENABLE_DEPENDENCY_DOWNLOADS=ON + -DCUTTER_PACKAGE_RZ_GHIDRA=ON + -DCUTTER_PACKAGE_JSDEC=ON + -DCUTTER_PACKAGE_RZ_LIBSWIFT=ON + -DCUTTER_PACKAGE_RZ_LIBYARA=ON + -DCPACK_PACKAGE_FILE_NAME="$$PACKAGE_NAME" + -DCMAKE_FRAMEWORK_PATH="$$BREAKPAD_FRAMEWORK_DIR" + -DCPACK_BUNDLE_APPLE_CERT_APP="-" + - ninja -C build + package: + image: /bin/bash + commands: + - source cutter-deps/env.sh + - ninja -C build package + deploy: + when: + event: tag + tag: v* + image: /bin/bash + commands: + - gh release upload "${CI_COMMIT_TAG}" build/Cutter-*.dmg + secrets: [ github_token ]