Skip to content

Commit 443d46a

Browse files
committed
ci: Ensure vendored dependencies can co-exist with system libs
Ruby's mkmf appears to list `RbConfig::CONFIG['exec_prefix']/lib` first in the search path when building a C extension. If you have libre2 installed in that path, the linker will use that library instead of the vendored library. This adds a test to ensure this case is covered.
1 parent 9764272 commit 443d46a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/tests.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
jobs:
1616
compile-and-test-system-dependencies:
1717
needs: ["build-cruby-gem"]
18-
name: System Dependencies - Ruby ${{ matrix.ruby }} - libre2 ABI version ${{ matrix.libre2.soname }}
18+
name: System Dependencies - ${{ matrix.sys }} vendored libs - Ruby ${{ matrix.ruby }} - libre2 ABI version ${{ matrix.libre2.soname }}
1919
runs-on: ubuntu-20.04
2020
strategy:
2121
matrix:
@@ -41,6 +41,7 @@ jobs:
4141
soname: 10
4242
- version: "20230701"
4343
soname: 11
44+
sys: ["enable", "disable"]
4445
steps:
4546
- uses: actions/checkout@v3
4647
- name: Remove any existing libre2 installation
@@ -62,7 +63,9 @@ jobs:
6263
with:
6364
name: cruby-gem
6465
path: gems
65-
- run: ./scripts/test-gem-install gems --enable-system-libraries
66+
- name: Add a symlink for libre2
67+
run: ln -s /usr/lib/libre2.so `ruby -e "puts RbConfig::CONFIG['exec_prefix']"`/lib/libre2.so
68+
- run: ./scripts/test-gem-install gems --${{matrix.sys}}-system-libraries
6669

6770
compile-and-test-vendored-dependencies:
6871
name: Vendored Dependencies - Ruby ${{ matrix.ruby }} - ${{ matrix.runs-on }}

0 commit comments

Comments
 (0)