Skip to content

Commit 23fb357

Browse files
Feat/ide setup (#3)
* feature(test): setup running tests with cmake and IDE Signed-off-by: Dusan Malusev <dusan@dusanmalusev.dev> * fix(config.m4): install dir Signed-off-by: Dusan Malusev <dusan@dusanmalusev.dev> * feature(ci): use asan, msan and ubsan in testing Signed-off-by: Dusan Malusev <dusan@dusanmalusev.dev> * feature(ci): extract common things into .github/actions Signed-off-by: Dusan Malusev <dusan@dusanmalusev.dev> * feature(ci): extract common things into .github/actions Signed-off-by: Dusan Malusev <dusan@dusanmalusev.dev> * feature(ci): extract common things into .github/actions Signed-off-by: Dusan Malusev <dusan@dusanmalusev.dev> * just 8.1 Signed-off-by: Dusan Malusev <dusan@dusanmalusev.dev> * fix Signed-off-by: Dusan Malusev <dusan@dusanmalusev.dev> * fix Signed-off-by: Dusan Malusev <dusan@dusanmalusev.dev> * ubuntu 24.04 Signed-off-by: Dusan Malusev <dusan@dusanmalusev.dev> * fix Signed-off-by: Dusan Malusev <dusan@dusanmalusev.dev> * run tests Signed-off-by: Dusan Malusev <dusan@dusanmalusev.dev> * fix Signed-off-by: Dusan Malusev <dusan@dusanmalusev.dev> * fix Signed-off-by: Dusan Malusev <dusan@dusanmalusev.dev> --------- Signed-off-by: Dusan Malusev <dusan@dusanmalusev.dev>
1 parent cc6eaa8 commit 23fb357

File tree

5 files changed

+33
-19
lines changed

5 files changed

+33
-19
lines changed

.github/actions/compile-extension/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ description: Compile UV extension
44
inputs:
55
sanitizer:
66
required: false
7-
description: "ASAN or MSAN"
7+
description: 'ASAN or MSAN'
88
default: ''
99
debug:
1010
required: false
11-
description: "Enable debug"
11+
description: 'Enable debug'
1212
default: 'yes'
1313
static_libuv:
1414
required: false
1515
default: 'no'
16-
description: "Link against static libuv"
16+
description: 'Link against static libuv'
1717
libuv_pkgconfig:
1818
required: true
19-
description: "PkgConfig path for Libuv"
19+
description: 'PkgConfig path for Libuv'
2020

2121
runs:
2222
using: composite

.github/actions/install-libuv/action.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ description: Install Libuv
44
inputs:
55
version:
66
required: false
7-
default: "1.48.0"
8-
description: "Libuv version"
7+
default: '1.48.0'
8+
description: 'Libuv version'
99
sanitizer:
1010
required: false
11-
description: "ASAN or MSAN"
11+
description: 'ASAN or MSAN'
1212
default: ''
1313

1414
outputs:
1515
install_dir:
1616
value: ${{ steps.values.outputs.install_dir }}
17-
description: "Libuv Install Dir"
17+
description: 'Libuv Install Dir'
1818
pkg_config_path:
1919
value: ${{ steps.values.outputs.pkg_config_path }}
20-
description: "Libuv PkgConfig script path"
20+
description: 'Libuv PkgConfig script path'
2121

2222
runs:
2323
using: composite
@@ -33,11 +33,12 @@ runs:
3333
if: steps.cache-libuv.outputs.cache-hit != 'true'
3434
uses: jwlawson/actions-setup-cmake@v2
3535
with:
36-
cmake-version: "3.24"
36+
cmake-version: '3.24'
3737

3838
- name: Install Deps
3939
if: steps.cache-libuv.outputs.cache-hit != 'true'
4040
shell: bash
41+
working-directory: /opt
4142
run: |
4243
sudo apt-get update
4344
sudo apt-get install -y pkg-config clang build-essential ninja-build

.github/actions/install-php/action.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,21 @@ description: Install PHP
44
inputs:
55
version:
66
required: true
7-
description: "PHP version"
7+
description: 'PHP version'
88
phpts:
99
required: true
10-
description: "nts or ts"
10+
description: 'nts or ts'
1111
sanitizer:
1212
required: false
1313
default: ''
14-
description: "ASAN or MSAN"
15-
14+
description: 'ASAN or MSAN'
1615
outputs:
1716
version:
1817
value: ${{ steps.determine-php-version.outputs.version }}
19-
description: "PHP version"
18+
description: 'PHP version'
2019
php_binary_dir:
2120
value: ${{ steps.values.outputs.php_binary_dir }}
22-
description: "PHP binary directory"
21+
description: 'PHP binary directory'
2322

2423
runs:
2524
using: composite
@@ -93,4 +92,4 @@ runs:
9392
shell: bash
9493
run: |
9594
echo "php_binary_dir=/opt/php/bin" >> "$GITHUB_OUTPUT"
96-
echo "/opt/php/bin" >> "$GITHUB_PATH"
95+
echo "/opt/php/bin" >> "$GITHUB_PATH"

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,13 @@ jobs:
5959
with:
6060
debug: yes
6161
libuv_pkgconfig: ${{ steps.libuv.outputs.pkg_config_path }}
62+
env:
63+
LIBRARY_PATH: ${{ steps.libuv.outputs.install_dir }}/lib
64+
LD_LIBRARY_PATH: ${{ steps.libuv.outputs.install_dir }}/lib
6265

6366
- name: Run the tests
64-
run: php run-tests.php -q -j$(getconf _NPROCESSORS_ONLN) -p $(which php) --show-diff --set-timeout 120
67+
run: php run-tests.php -d "extension=uv" -q -j$(getconf _NPROCESSORS_ONLN) --show-diff --set-timeout 120
6568
env:
6669
USE_ZEND_ALLOC: 0
70+
LIBRARY_PATH: ${{ steps.libuv.outputs.install_dir }}/lib
71+
LD_LIBRARY_PATH: ${{ steps.libuv.outputs.install_dir }}/lib

.github/workflows/sanitizers.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ jobs:
4242
with:
4343
submodules: recursive
4444

45+
- uses: actions/checkout@v4
46+
with:
47+
submodules: recursive
48+
4549
- uses: ./.github/actions/install-php
4650
with:
4751
version: ${{ matrix.php }}
@@ -65,8 +69,13 @@ jobs:
6569
sanitizer: ${{ matrix.sanitizer }}
6670
debug: yes
6771
libuv_pkgconfig: ${{ steps.libuv.outputs.pkg_config_path }}
72+
env:
73+
LIBRARY_PATH: ${{ steps.libuv.outputs.install_dir }}/lib
74+
LD_LIBRARY_PATH: ${{ steps.libuv.outputs.install_dir }}/lib
6875

6976
- name: Run the tests
70-
run: php run-tests.php -d "extension=uv" -q -j$(getconf _NPROCESSORS_ONLN) php --show-diff --set-timeout 120
77+
run: php run-tests.php -d "extension=uv" -q -j$(getconf _NPROCESSORS_ONLN) --show-diff --set-timeout 120
7178
env:
7279
USE_ZEND_ALLOC: 0
80+
LIBRARY_PATH: ${{ steps.libuv.outputs.install_dir }}/lib
81+
LD_LIBRARY_PATH: ${{ steps.libuv.outputs.install_dir }}/lib

0 commit comments

Comments
 (0)