-
Notifications
You must be signed in to change notification settings - Fork 33
73 lines (73 loc) · 2.28 KB
/
ci.yml
File metadata and controls
73 lines (73 loc) · 2.28 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
71
72
73
name: Build and Test
on: [push, pull_request]
jobs:
ubuntu:
strategy:
matrix:
version: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
runs-on: ubuntu-latest
steps:
- name: Install re2c
run: sudo apt-get install -y re2c
- name: Checkout mailparse
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{matrix.version}}
extensions: mbstring
tools: phpize, php-config
- name: phpize
run: phpize
- name: configure
run: ./configure --enable-mailparse
- name: work around missing HAVE_MBSTRING in main/php_config.h
run: echo '#define HAVE_MBSTRING 1' >> config.h
- name: make
run: make
- name: test
run: |
export TEST_PHP_ARGS="-n -d extension=mbstring.so -d extension=modules/mailparse.so"
php run-tests.php -P --show-diff tests
windows:
defaults:
run:
shell: cmd
strategy:
fail-fast: false
matrix:
version: ["8.1", "8.2", "8.3", "8.4", "8.5"]
arch: [x64, x86]
ts: [ts, nts]
runs-on: windows-latest
steps:
- name: Checkout mailparse
uses: actions/checkout@v4
- name: Setup PHP
id: setup-php
uses: php/setup-php-sdk@fix/invoke-webrequest-tls
with:
version: ${{matrix.version}}
arch: ${{matrix.arch}}
ts: ${{matrix.ts}}
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.arch}}
toolset: ${{steps.setup-php.outputs.toolset}}
- name: phpize
run: phpize
- name: configure
run: configure --enable-mailparse --with-prefix=${{steps.setup-php.outputs.prefix}}
- name: make
run: nmake
- name: test
run: |
set PATH=%PATH%;${{steps.setup-php.outputs.prefix}}\ext
nmake test TESTS="-d extension=${{steps.setup-php.outputs.prefix}}\ext\php_mbstring.dll --show-diff tests"
- name: Upload DLL
if: always()
uses: actions/upload-artifact@v4
with:
name: php_mailparse-${{matrix.version}}-${{matrix.arch}}-${{matrix.ts}}
path: "**/php_mailparse.dll"