-
Notifications
You must be signed in to change notification settings - Fork 12
60 lines (60 loc) · 1.84 KB
/
build-php.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: build-php
on:
push:
branches:
- "**"
tags:
- "*"
jobs:
build-php:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
php-version: ["8.2", "8.3", "8.4"]
include:
- arch: x86_64
optimizations: -DED25519_REF10=OFF -DED25519_AMD64_RADIX_64_24K=ON
- os: macos-latest
arch: arm64
optimizations: -DED25519_REF10=ON
name: PHP ${{ matrix.php-version }} build on ${{ matrix.os }}
steps:
- 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@v3
- name: Configure toolchain
run: |
sudo apt update
cmake --version
python3 --version
pip3 list --outdated
pip3 install -U protobuf grpcio-tools
php --version
- 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 \
${{ matrix.optimizations }} \
-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