From 3ddb1b9a58b673a87a4c9190979ff9c43e6caf54 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sun, 24 Nov 2024 13:00:28 +0800 Subject: [PATCH] ci: Remove rimraf before `make package` (#3393) * ci: Remove rimraf before `make package` * Use `|| brew link --overwrite pkgconf` * jsdec.sh: Use `mkdir -p` * rz-libyara.sh: Use `mkdir -p` --- .github/workflows/ci.yml | 4 ++-- scripts/Brewfile | 1 - scripts/jsdec.sh | 2 +- scripts/rz-libyara.sh | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1248065a..74280807 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -432,6 +432,7 @@ jobs: cd scripts rm /usr/local/bin/2to3* # symlink to some kind of existing python2.7 installation conflicts with brew python3 which gets installed as indirect dependency brew bundle + brew install pkg-config || brew link --overwrite pkgconf brew install kadwanev/brew/retry - name: py dependencies run: | @@ -487,8 +488,7 @@ jobs: # https://github.com/actions/runner-images/issues/7522#issuecomment-1556766641 echo killing XProtectBehaviorService; sudo pkill -9 XProtect >/dev/null || true; echo waiting for XProtectBehaviorService kill; while pgrep XProtect; do sleep 3; done; - # Rimraf plugins built by `make package` because jsdec cannot be built twice - retry 'rm -rf ../jsdec ../libswift ../rz_libyara ../rz-silhouette; make package' + retry make package export CUTTER_VERSION=$(python3 ../scripts/get_version.py) echo PACKAGE_NAME=${PACKAGE_NAME}.dmg >> $GITHUB_ENV echo PACKAGE_PATH=build/${PACKAGE_NAME}.dmg >> $GITHUB_ENV diff --git a/scripts/Brewfile b/scripts/Brewfile index fb6bc93c..dfb4812c 100644 --- a/scripts/Brewfile +++ b/scripts/Brewfile @@ -5,4 +5,3 @@ brew "xz" brew "llvm" brew "meson" brew "coreutils" -brew "pkg-config" diff --git a/scripts/jsdec.sh b/scripts/jsdec.sh index ed81a112..ebcd2c4c 100755 --- a/scripts/jsdec.sh +++ b/scripts/jsdec.sh @@ -19,6 +19,6 @@ fi meson setup --buildtype=release --pkg-config-path="$INSTALL_PREFIX/lib/pkgconfig" -Dbuild_type=cutter build_lib ninja -C build_lib -mkdir build_plugin && cd build_plugin +mkdir -p build_plugin && cd build_plugin cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DJSDEC_BUILD_DIR="../build_lib" -DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" $EXTRA_CMAKE_OPTS ../cutter-plugin ninja install diff --git a/scripts/rz-libyara.sh b/scripts/rz-libyara.sh index 8941f4b4..06fdecd7 100755 --- a/scripts/rz-libyara.sh +++ b/scripts/rz-libyara.sh @@ -19,7 +19,7 @@ meson --buildtype=release --pkg-config-path="$INSTALL_PREFIX/lib/pkgconfig" --pr ninja -C build install cd cutter-plugin -mkdir build && cd build +mkdir -p build && cd build cmake -G Ninja -DRIZIN_INSTALL_PLUGDIR="../build" -DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" $EXTRA_CMAKE_OPTS .. ninja ninja install