forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (65 loc) · 1.65 KB
/
unit-tests.yml
File metadata and controls
75 lines (65 loc) · 1.65 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
74
name: Unit Tests
on:
push:
paths:
- 'main/network.c'
- 'tests/unit/**'
- '.github/workflows/unit-tests.yml'
branches:
- master
pull_request:
paths:
- 'main/network.c'
- 'tests/unit/**'
- '.github/workflows/unit-tests.yml'
branches:
- '**'
workflow_dispatch: ~
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.url || github.run_id }}
cancel-in-progress: true
env:
CC: ccache gcc
CXX: ccache g++
jobs:
UNIT_TESTS:
if: github.repository == 'php/php-src' || github.event_name == 'pull_request'
name: UNIT_TESTS_LINUX_X64
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
- name: git checkout
uses: actions/checkout@v6
- name: Install dependencies
run: |
set -x
sudo apt-get update
sudo apt-get install -y \
libcmocka-dev \
autoconf \
gcc \
make \
unzip \
bison \
re2c \
locales \
ccache
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: "unit-tests-${{hashFiles('main/php_version.h')}}"
append-timestamp: false
save: ${{ github.event_name != 'pull_request' }}
- name: ./configure (minimal build)
uses: ./.github/actions/configure-unit-tests
- name: make libphp.a
run: |
set -x
make -j$(/usr/bin/nproc) >/dev/null
- name: Run unit tests
run: |
set -x
cd tests/unit
make test