From daaa37d1c7add525a0843affd6db6217aff872f5 Mon Sep 17 00:00:00 2001 From: Joshua Behrens Date: Thu, 3 Oct 2024 15:49:30 +0200 Subject: [PATCH] Add test to build on macos using v8 from brew --- .github/workflows/build-test.yml | 43 ++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 0a59a38..9083240 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -136,3 +136,46 @@ jobs: path: | php_test_results*.txt tests/*.out + + macos-package-manager-brew: + strategy: + matrix: + php-versions: + - '8.2' + - '8.3' + - '8.4' + + runs-on: macos-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + coverage: none + + - name: Set up Homebrew + uses: Homebrew/actions/setup-homebrew@master + + - name: Install dependencies + run: | + brew install v8 + + - name: Build extension + run: | + phpize + ./configure --with-v8js=/opt/homebrew CPPFLAGS="-DV8_COMPRESS_POINTERS -DV8_ENABLE_SANDBOX" + make + make test + + - name: Archive test results + if: failure() + uses: actions/upload-artifact@v4 + with: + name: phpt-test-results + path: | + php_test_results*.txt + tests/*.out