]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
ci: test pkg-config file 3267/head
authorAndrea Pappacoda <andrea@pappacoda.it>
Tue, 20 Sep 2022 20:13:23 +0000 (22:13 +0200)
committerAndrea Pappacoda <andrea@pappacoda.it>
Tue, 20 Sep 2022 20:23:03 +0000 (22:23 +0200)
As mentioned in
https://github.com/facebook/zstd/pull/3252#issuecomment-1251733791 ,
this patch adds a CI job that builds and installs libzstd on the job
runner, and then compiles a sample binary linking against the installed
library; the needed build flags are passed by invoking pkg-config.

.github/workflows/dev-short-tests.yml

index 7b18423aa95d65a6a9b3b93c486917569f0d4f75..37186b5c9199c6645cba7165548e6217e002103a 100644 (file)
@@ -410,6 +410,22 @@ jobs:
       run: |
         sde-external-9.0.0-2021-11-07-lin/sde -cet -cet-raise 0 -cet-endbr-exe -cet-stderr -cet-abort -- ./zstd -b3
 
+  pkg-config:
+    runs-on: ubuntu-latest
+    container:
+      image: debian:testing
+    steps:
+      - uses: actions/checkout@v3
+      - name: Install dependencies
+        run: |
+          apt -y update
+          apt -y install --no-install-recommends gcc libc6-dev make pkg-config
+      - name: Build and install
+        run: make -C lib install
+      - name: Test pkg-config
+        run: |
+          cc -Wall -Wextra -Wpedantic -Werror -o simple examples/simple_compression.c $(pkg-config --cflags --libs libzstd)
+          ./simple LICENSE
 
 
 # This test currently fails on Github Actions specifically.