diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3aa6cb0..d855c50 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,8 +36,7 @@ jobs: Run clippy (${{ matrix.php }}, php ${{ matrix.php_debug && 'debug' || 'release' }}, ${{ matrix.php_zts && 'ZTS' || 'NTS' }}, - rust ${{ matrix.rust }}) - runs-on: ubuntu-latest + rust ${{ matrix.rust }} on ${{ matrix.os }}) strategy: fail-fast: false matrix: @@ -45,6 +44,8 @@ jobs: rust: ["1.99.0"] php_zts: [true, false] php_debug: [true, false] + os: ["ubuntu-24.04", "ubuntu-24.04-arm"] + runs-on: ${{ matrix.os }} steps: # We need to clone and configure PHP so that bindings can be generated # in the build script for clippy; need to build it so that php-config @@ -94,15 +95,16 @@ jobs: uses: ./php/php-src/ext/rust-ext/.github/actions/verify-generated with: working-directory: php/php-src/ext/rust-ext - extra-pathspec: ':(exclude)crates/sys/bindings.rs' + extra-pathspec: > + ':(exclude)crates/sys/bindings.rs' + ':(exclude)crates/sys/reexport.c' test: name: > Run tests (${{ matrix.php }}, php ${{ matrix.php_debug && 'debug' || 'release' }}, ${{ matrix.php_zts && 'ZTS' || 'NTS' }}, - rust ${{ matrix.rust }}) - runs-on: ubuntu-latest + rust ${{ matrix.rust }} on ${{ matrix.os }}) strategy: fail-fast: false matrix: @@ -110,6 +112,8 @@ jobs: rust: ["1.99.0"] php_zts: [true, false] php_debug: [true, false] + os: ["ubuntu-24.04", "ubuntu-24.04-arm"] + runs-on: ${{ matrix.os }} steps: - name: Checkout PHP uses: actions/checkout@v7 diff --git a/crates/sys/build.rs b/crates/sys/build.rs index 12bec32..2153028 100644 --- a/crates/sys/build.rs +++ b/crates/sys/build.rs @@ -66,6 +66,23 @@ fn main() { // type which is only declared in a C file. Also cannot manually reexport // so just block it entirely .blocklist_function("zend_lazy_object_get_instance") + // __m128i isn't FFI safe in zend_simd.h and those functions cannot be + // marked with target_feature, rust-lang/rust-bindgen#3533 + .blocklist_function("_mm_sll_epi16") + .blocklist_function("_mm_sll_epi32") + .blocklist_function("_mm_sll_epi64") + .blocklist_function("_mm_sra_epi16") + .blocklist_function("_mm_sra_epi32") + .blocklist_function("_mm_srl_epi16") + .blocklist_function("_mm_srl_epi32") + .blocklist_function("_mm_srl_epi64") + .blocklist_function("_mm_madd_epi16") + .blocklist_function("_mm_mulhi_epi16") + .blocklist_function("_mm_mulhi_epu16") + .blocklist_function("_mm_mullo_epi16") + .blocklist_function("_mm_mul_epu32") + .blocklist_function("_mm_sad_epu8") + .blocklist_function("_mm_movemask_epi8") .default_enum_style(EnumVariation::ModuleConsts) .merge_extern_blocks(true) // SLOW and didn't actually add anything