]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
build: Extend static linked binary build test
authorDaniel Wagner <dwagner@suse.de>
Mon, 17 Apr 2023 06:26:35 +0000 (08:26 +0200)
committerDaniel Wagner <wagi@monom.org>
Mon, 17 Apr 2023 07:15:21 +0000 (09:15 +0200)
So far, the binary was still linking against the libc dynamically.
The final step to link completely statically can be achieved by setting
the LDFLAGS environment variable.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
.github/workflows/build.yml

index 2e7e01f188b5ce62ab7d4ddd5fb266d319e83a1c..d0c1ceed9458f1505d4fd9f8840e6e1346861b39 100644 (file)
@@ -147,28 +147,24 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - name: install dependencies
-        run: sudo apt-get install libpam-dev libcap-ng-dev
+        run: sudo apt-get install gcc meson ninja-build libpam-dev libcap-ng-dev
       - uses: actions/checkout@v3
-      - uses: actions/setup-python@v4
-        with:
-          python-version: '3.x'
-      - uses: BSFishy/meson-build@v1.0.3
-        name: build
-        with:
-          action: build
-          setup-options: >
-            --werror
-            --buildtype=release
-            --wrap-mode=forcefallback
-            --default-library=static
-            -Dlibnvme:werror=false
-            -Dopenssl:werror=false
-          meson-version: 0.61.2
-      - uses: bsfishy/meson-build@v1.0.3
-        name: test
-        with:
-          action: test
-          meson-version: 0.61.2
+      - name: build
+        run: |
+          LDFLAGS=-static meson setup   \
+            --werror                    \
+            --buildtype=release         \
+            --wrap-mode=forcefallback   \
+            --default-library=static    \
+            -Dlibnvme:openssl=disabled  \
+            -Dlibnvme:python=disabled   \
+            -Dlibnvme:werror=false      \
+            .build
+          meson compile -C .build
+      - name: test
+        run: |
+          meson test -C .build
+          ldd .build/nvme 2>&1 | grep 'not a dynamic executable'
       - uses: actions/upload-artifact@v3
         if: failure()
         with: