From fc4182905f75f492bbfd899ae3fd9c41a136268e Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Tue, 22 Oct 2024 18:14:12 +0800 Subject: [PATCH 1/7] Revert "Upgrade build-osx-pkg build to macos-14 (#4677)" This reverts commit 1a8b3c632e86a97bcffc6535528d6d2d4aabc2f9. --- .github/workflows/ci.yml | 59 ++++++---------------------------------- 1 file changed, 8 insertions(+), 51 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 811194bd02f..3dfc9a14f6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -661,64 +661,19 @@ jobs: build-osx-pkg: name: Build OSX package - runs-on: macos-14 + runs-on: macos-12 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 - with: - fetch-depth: 2 + - name: Install pkg-config with Homebrew + run: brew install pkg-config - name: Install meson and ninja - 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 + run: pip3 install meson ninja PyYAML - 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 @@ -930,10 +885,12 @@ jobs: strategy: matrix: system: - - macos-14 + - macos-12 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 From 8039ccc23574f92a1abbe485283ef27f1ebdb66f Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Tue, 22 Oct 2024 18:14:22 +0800 Subject: [PATCH 2/7] Revert "ci: Remove macos-12 build (#4676)" This reverts commit f2a6d2a56c1f4cb539fc41a13a31f535cbe2b2c9. --- .github/workflows/ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3dfc9a14f6a..b086bce5f38 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,6 +58,7 @@ jobs: [ linux-meson-clang-tests, linux-meson-gcc-tests, + macos-meson-clang-tests, linux-gcc-tests-asan, linux-clang-tests-asan, linux-gcc-tests-codecov, @@ -84,6 +85,15 @@ jobs: timeout: 45 cflags: "-DRZ_ASSERT_STDOUT=1 -Wno-cpp" allow_failure: false + - name: macos-meson-clang-tests + os: macos-12 + build_system: meson + compiler: clang + run_tests: true + meson_options: -Dbuildtype=release --werror + enabled: ${{ needs.changes.outputs.edited == 'true' }} + timeout: 60 + allow_failure: false - name: linux-gcc-tests-asan os: ubuntu-22.04 build_system: meson From 4cb2dee26f6e92a5f6ea6da4362726b68b681472 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Tue, 22 Oct 2024 18:18:00 +0800 Subject: [PATCH 3/7] Upgrade macos builds to macos-13 --- .github/workflows/ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b086bce5f38..af3914e60de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,7 +86,7 @@ jobs: cflags: "-DRZ_ASSERT_STDOUT=1 -Wno-cpp" allow_failure: false - name: macos-meson-clang-tests - os: macos-12 + os: macos-13 build_system: meson compiler: clang run_tests: true @@ -172,17 +172,17 @@ jobs: steps: - name: Show available memory on Linux - if: matrix.os != 'macos-12' && matrix.enabled + if: matrix.os != 'macos-13' && matrix.enabled run: free -h - uses: actions/checkout@v4 if: matrix.enabled with: fetch-depth: 2 - name: Install pkg-config with Homebrew - if: matrix.os == 'macos-12' && matrix.enabled + if: matrix.os == 'macos-13' && matrix.enabled run: brew install pkg-config - name: Install python and other dependencies - if: (matrix.run_tests || matrix.build_system == 'meson') && matrix.os != 'macos-12' && matrix.enabled + if: (matrix.run_tests || matrix.build_system == 'meson') && matrix.os != 'macos-13' && matrix.enabled run: sudo apt-get --assume-yes install python3-wheel python3-setuptools libcapstone4 libcapstone-dev - name: Install meson and ninja if: matrix.build_system == 'meson' && matrix.enabled @@ -197,7 +197,7 @@ jobs: if: matrix.run_tests && matrix.enabled run: pip3 install --user "file://$GITHUB_WORKSPACE/test/rz-pipe#egg=rzpipe&subdirectory=python" requests - name: Install Linux test dependencies - if: matrix.run_tests && matrix.enabled && matrix.os != 'macos-12' + if: matrix.run_tests && matrix.enabled && matrix.os != 'macos-13' run: | sudo apt-get update sudo apt-get --assume-yes install libc6 libc6-i386 libc6-dev debuginfod @@ -236,7 +236,7 @@ jobs: export PKG_CONFIG_PATH=${HOME}/lib/pkgconfig:${HOME}/lib/$(uname -m)-linux-gnu/pkgconfig:${PKG_CONFIG_PATH} ninja -C build install - name: Disable user authentication for debugging (macOS) - if: matrix.os == 'macos-12' && matrix.enabled + if: matrix.os == 'macos-13' && matrix.enabled run: | sudo security authorizationdb write system.privilege.taskport allow - name: Run unit tests (meson) @@ -671,7 +671,7 @@ jobs: build-osx-pkg: name: Build OSX package - runs-on: macos-12 + runs-on: macos-13 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: @@ -895,7 +895,7 @@ jobs: strategy: matrix: system: - - macos-12 + - macos-13 runs-on: ${{ matrix.system }} needs: [ build-osx-pkg ] steps: From c2de417dca29457a7f523e3b9370d89d229ccc60 Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Tue, 22 Oct 2024 18:22:53 +0800 Subject: [PATCH 4/7] Add fetch-depth: 2 to build-osx-pkg build --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af3914e60de..9564202a4b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -676,6 +676,8 @@ jobs: needs: [ build-and-test ] steps: - uses: actions/checkout@v4 + with: + fetch-depth: 2 - name: Install pkg-config with Homebrew run: brew install pkg-config - name: Install meson and ninja From d38e7e0d1ddeab6ac7a2b2b5aaf90ae45e23294e Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Tue, 22 Oct 2024 19:05:49 +0800 Subject: [PATCH 5/7] Add -Wno-deprecated-non-prototype flag to `macos-meson-clang-tests` build --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9564202a4b4..32145a2ba35 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -93,6 +93,7 @@ jobs: meson_options: -Dbuildtype=release --werror enabled: ${{ needs.changes.outputs.edited == 'true' }} timeout: 60 + cflags: "-Wno-deprecated-non-prototype" allow_failure: false - name: linux-gcc-tests-asan os: ubuntu-22.04 From cec29da9a8aa0694e51ec2c3c58e13bd9e5c3e9d Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Tue, 22 Oct 2024 21:12:27 +0800 Subject: [PATCH 6/7] Use `!contains(matrix.os, 'macos')` and its negation --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32145a2ba35..610170bcbff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -173,17 +173,17 @@ jobs: steps: - name: Show available memory on Linux - if: matrix.os != 'macos-13' && matrix.enabled + if: !contains(matrix.os, 'macos') && matrix.enabled run: free -h - uses: actions/checkout@v4 if: matrix.enabled with: fetch-depth: 2 - name: Install pkg-config with Homebrew - if: matrix.os == 'macos-13' && matrix.enabled + if: contains(matrix.os, 'macos') && matrix.enabled run: brew install pkg-config - name: Install python and other dependencies - if: (matrix.run_tests || matrix.build_system == 'meson') && matrix.os != 'macos-13' && matrix.enabled + if: (matrix.run_tests || matrix.build_system == 'meson') && !contains(matrix.os, 'macos') && matrix.enabled run: sudo apt-get --assume-yes install python3-wheel python3-setuptools libcapstone4 libcapstone-dev - name: Install meson and ninja if: matrix.build_system == 'meson' && matrix.enabled @@ -198,7 +198,7 @@ jobs: if: matrix.run_tests && matrix.enabled run: pip3 install --user "file://$GITHUB_WORKSPACE/test/rz-pipe#egg=rzpipe&subdirectory=python" requests - name: Install Linux test dependencies - if: matrix.run_tests && matrix.enabled && matrix.os != 'macos-13' + if: matrix.run_tests && matrix.enabled && !contains(matrix.os, 'macos') run: | sudo apt-get update sudo apt-get --assume-yes install libc6 libc6-i386 libc6-dev debuginfod @@ -237,7 +237,7 @@ jobs: export PKG_CONFIG_PATH=${HOME}/lib/pkgconfig:${HOME}/lib/$(uname -m)-linux-gnu/pkgconfig:${PKG_CONFIG_PATH} ninja -C build install - name: Disable user authentication for debugging (macOS) - if: matrix.os == 'macos-13' && matrix.enabled + if: contains(matrix.os, 'macos') && matrix.enabled run: | sudo security authorizationdb write system.privilege.taskport allow - name: Run unit tests (meson) From 4904737c3086bccc4b6367f356eb6e73fdf829fc Mon Sep 17 00:00:00 2001 From: Khairul Azhar Kasmiran Date: Tue, 22 Oct 2024 21:19:15 +0800 Subject: [PATCH 7/7] Use `contains(matrix.os, 'macos') != true` instead --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 610170bcbff..2de8c9431a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -173,7 +173,7 @@ jobs: steps: - name: Show available memory on Linux - if: !contains(matrix.os, 'macos') && matrix.enabled + if: contains(matrix.os, 'macos') != true && matrix.enabled run: free -h - uses: actions/checkout@v4 if: matrix.enabled @@ -183,7 +183,7 @@ jobs: if: contains(matrix.os, 'macos') && matrix.enabled run: brew install pkg-config - name: Install python and other dependencies - if: (matrix.run_tests || matrix.build_system == 'meson') && !contains(matrix.os, 'macos') && matrix.enabled + if: (matrix.run_tests || matrix.build_system == 'meson') && contains(matrix.os, 'macos') != true && matrix.enabled run: sudo apt-get --assume-yes install python3-wheel python3-setuptools libcapstone4 libcapstone-dev - name: Install meson and ninja if: matrix.build_system == 'meson' && matrix.enabled @@ -198,7 +198,7 @@ jobs: if: matrix.run_tests && matrix.enabled run: pip3 install --user "file://$GITHUB_WORKSPACE/test/rz-pipe#egg=rzpipe&subdirectory=python" requests - name: Install Linux test dependencies - if: matrix.run_tests && matrix.enabled && !contains(matrix.os, 'macos') + if: matrix.run_tests && matrix.enabled && contains(matrix.os, 'macos') != true run: | sudo apt-get update sudo apt-get --assume-yes install libc6 libc6-i386 libc6-dev debuginfod