-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (68 loc) · 2.19 KB
/
Copy pathtest-linux.yml
File metadata and controls
70 lines (68 loc) · 2.19 KB
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
61
62
63
64
65
66
67
68
69
70
name: Linux Test
on:
push:
branches: ["dev"]
paths:
- "src/**"
- "examples/**"
- "build.zig"
- "build.zig.zon"
- ".github/workflows/test-linux.yml"
pull_request:
branches: ["dev"]
paths:
- "src/**"
- "examples/**"
- "build.zig"
- "build.zig.zon"
- ".github/workflows/test-linux.yml"
workflow_dispatch:
jobs:
test:
name: test (${{ matrix.php }}, ${{ matrix.arch }}, ${{ matrix.phpts }}, ${{ matrix.debug && 'debug' || 'release' }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
php: ["8.2", "8.3", "8.4", "8.5"]
arch: [x86_64, aarch64]
phpts: [nts, ts]
# On Linux, the debug symbols are added as debug info files in the /usr/lib/debug/.build-id directory.
# Debug testing is not performed here.
# debug: [true, false]
debug: [false]
include:
- arch: x86_64
os: ubuntu-latest
- arch: aarch64
os: ubuntu-24.04-arm
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: mlugg/setup-zig@v2
- name: Setup PHP (${{ matrix.phpts }}, ${{ matrix.debug && 'debug' || 'release' }})
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: php-config
env:
phpts: ${{ matrix.phpts }}
debug: ${{ matrix.debug }}
- name: Verify PHP Installation
run: |
php -v
- name: Run unit tests
run: |
PHP_INCLUDE_DIR=$(php-config --include-dir)
zig build test -Dphp-include-dir="$PHP_INCLUDE_DIR"
- name: Run example tests
run: |
PHP_INCLUDE_DIR=$(php-config --include-dir)
zig build test-examples -Dphp-include-dir="$PHP_INCLUDE_DIR"
- name: Run example tests (ReleaseSafe)
run: |
PHP_INCLUDE_DIR=$(php-config --include-dir)
zig build test-examples -Dphp-include-dir="$PHP_INCLUDE_DIR" -Doptimize=ReleaseSafe
- name: Run example tests (ReleaseFast)
run: |
PHP_INCLUDE_DIR=$(php-config --include-dir)
zig build test-examples -Dphp-include-dir="$PHP_INCLUDE_DIR" -Doptimize=ReleaseFast