Feat/ide setup #18
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sanitizers | |
on: | |
push: | |
branches: | |
- 0.3.x | |
pull_request: | |
branches: | |
- 0.3.x | |
permissions: | |
contents: read | |
jobs: | |
# Adapted from https://github.com/beberlei/hdrhistogram-php | |
sanitizers: | |
name: ${{ matrix.php }}-${{ matrix.phpts }}-${{ matrix.sanitizer }} | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
sanitizer: | |
- "asan" | |
- "msan" | |
libuv: | |
- "1.48.0" | |
php: | |
- "8.1" | |
- "8.2" | |
- "8.3" | |
# - "8.4" # TODO: Not yet ready for sanitizer testing | |
phpts: | |
- "ts" | |
- "nts" | |
steps: | |
- run: | | |
sudo apt update | |
sudo apt-get install -y pkg-config clang-18 clang++-18 libasan8 libubsan1 build-essential valgrind ninja-build | |
sudo sysctl vm.mmap_rnd_bits=28 | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: ./.github/actions/install-php | |
with: | |
version: ${{ matrix.php }} | |
phpts: ${{ matrix.phpts }} | |
sanitizer: ${{ matrix.sanitizer }} | |
- uses: ./.github/actions/install-libuv | |
id: libuv | |
with: | |
version: ${{ matrix.libuv }} | |
sanitizer: ${{ matrix.sanitizer }} | |
- name: Setup cmake | |
uses: jwlawson/actions-setup-cmake@v2 | |
with: | |
cmake-version: "3.24" | |
- name: Compile uv extension | |
uses: ./.github/actions/compile-extension | |
with: | |
sanitizer: ${{ matrix.sanitizer }} | |
debug: yes | |
libuv_pkgconfig: ${{ steps.libuv.outputs.pkg_config_path }} | |
env: | |
LIBRARY_PATH: ${{ steps.libuv.outputs.install_dir }}/lib | |
LD_LIBRARY_PATH: ${{ steps.libuv.outputs.install_dir }}/lib | |
- name: Run the tests | |
run: php run-tests.php -d "extension=uv" -q -j$(getconf _NPROCESSORS_ONLN) --show-diff --set-timeout 120 | |
env: | |
USE_ZEND_ALLOC: 0 | |
LIBRARY_PATH: ${{ steps.libuv.outputs.install_dir }}/lib | |
LD_LIBRARY_PATH: ${{ steps.libuv.outputs.install_dir }}/lib |