From fe1e01aaad95bdcac87212af88eba74f70ab50f9 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Mon, 17 Apr 2023 08:26:35 +0200 Subject: [PATCH] build: Extend static linked binary build test 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 --- .github/workflows/build.yml | 38 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2e7e01f1..d0c1ceed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: -- 2.49.0