test builds 11 (use docker context) #42
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: build-linux-php | |
on: | |
push: | |
branches: | |
- "**" | |
tags: | |
- "*" | |
jobs: | |
build-linux-php: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
php-version: ["8.2", "8.3"] | |
arch: [x86_64] | |
name: PHP ${{ matrix.php-version }} build on ${{ matrix.os }} for arch ${{ matrix.arch }} | |
steps: | |
- name: Configure toolchain | |
run: | | |
sudo apt update | |
sudo apt install valgrind cloc python3-pip python3-venv | |
- name: Install PHP ${{ matrix.php-version }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
- name: Check PHP Version | |
run: php -v | |
- uses: actions/checkout@v4 | |
- name: Configure toolchain | |
run: | | |
cmake --version | |
python3 --version | |
pip3 list --outdated | |
pip3 install -U protobuf grpcio-tools | |
- name: Configure project | |
run: > | |
cmake -Cconfigs/php-config.cmake \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DVIRGIL_PACKAGE_PLATFORM_ARCH=${{ matrix.arch }} \ | |
-DVIRGIL_PACKAGE_LANGUAGE_VERSION=${{ matrix.php-version }} \ | |
-DCPACK_OUTPUT_FILE_PREFIX=php \ | |
-DENABLE_CLANGFORMAT=OFF \ | |
-DED25519_REF10=OFF -DED25519_AMD64_RADIX_64_24K=ON \ | |
-Bbuild -S. | |
- name: Build project | |
run: cmake --build build -- -j$(nproc) | |
- name: Test project | |
working-directory: build | |
run: ctest --verbose | |
- name: Package project | |
working-directory: build | |
run: cpack | |
- name: Attach artifacts to the release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: build/php/*.tar.gz |