From 1a8b3c632e86a97bcffc6535528d6d2d4aabc2f9 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Sat, 19 Oct 2024 18:01:54 +0800 Subject: [PATCH] Upgrade build-osx-pkg build to macos-14 (#4677) * Upgrade build-osx-pkg build to macos-14 * Update test-osx-pkg build to macos-14 --- .github/workflows/ci.yml | 59 ++++++++++++++++++++++++++++++++++------ 1 file changed, 51 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3dfc9a14f6a..811194bd02f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -661,19 +661,64 @@ jobs: build-osx-pkg: name: Build OSX package - runs-on: macos-12 + runs-on: macos-14 if: contains(github.head_ref, 'dist') || contains(github.head_ref, 'osx') || contains(github.head_ref, 'mac') || ((contains(github.ref, 'release-') || github.ref == 'refs/heads/stable') && github.event_name == 'push') || github.event_name == 'schedule' - needs: [ build-and-test ] steps: - uses: actions/checkout@v4 - - name: Install pkg-config with Homebrew - run: brew install pkg-config + with: + fetch-depth: 2 - name: Install meson and ninja - run: pip3 install meson ninja PyYAML + run: pip3 install --break-system-packages --user meson ninja PyYAML + - name: Checkout rzpipe + uses: actions/checkout@v4 + with: + repository: rizinorg/rz-pipe + path: test/rz-pipe + - name: Install test dependencies + run: pip3 install --break-system-packages --user "file://$GITHUB_WORKSPACE/test/rz-pipe#egg=rzpipe&subdirectory=python" requests + - name: Build with Meson + run: | + export PATH=$(python3 -m site --user-base)/bin:${PATH} + export CFLAGS=-Wno-deprecated-non-prototype + meson setup --prefix=${HOME} -Dbuildtype=release --werror build && ninja -C build + - name: Install with meson + run: | + export PATH=$(python3 -m site --user-base)/bin:${PATH} + ninja -C build install + - name: Disable user authentication for debugging + run: sudo security authorizationdb write system.privilege.taskport allow + - name: Run unit tests + run: | + export PATH=$(python3 -m site --user-base)/bin:${PATH} + meson test -C build --suite unit + - name: Checkout our Testsuite Binaries + uses: actions/checkout@v4 + with: + repository: rizinorg/rizin-testbins + path: test/bins + - name: Checkout fuzz targets # TODO: this can be removed as soon as the fuzztargets repo is public + uses: actions/checkout@v4 + with: + repository: rizinorg/rizin-fuzztargets + path: test/fuzz/targets + - name: Run integration tests and rz-test + run: | + export PATH=$(python3 -m site --user-base)/bin:${PATH} + meson test -C build --suite integration + cd test + rz-test -j `sysctl -n hw.activecpu` -L -o results.json + - name: Run fuzz tests + run: | + cd test + rz-test -LF bins/fuzzed @fuzz + # some fuzzed bins are mem hungry and are killed by the runner. + # running them one threaded allows to be check them + rz-test -j1 -LF bins/fuzzed-memhungry @fuzz - name: Install ImageMagick run: brew install imagemagick - name: Create OSX package run: | + export PATH=$(python3 -m site --user-base)/bin:${PATH} ./dist/osx/build_osx_package.sh mv rizin-*.pkg rizin.pkg - name: Upload .pkg file @@ -885,12 +930,10 @@ jobs: strategy: matrix: system: - - macos-12 + - macos-14 runs-on: ${{ matrix.system }} needs: [ build-osx-pkg ] steps: - - name: Install pkg-config with Homebrew - run: brew install pkg-config - uses: actions/download-artifact@v4 with: name: rizin.pkg