[dm-devel] [PATCH 7/7] github workflows: foreign.yaml: fix config dir in run environment

mwilck at suse.com mwilck at suse.com
Tue May 3 22:06:46 UTC 2022


From: Martin Wilck <mwilck at suse.com>

The foreign workflow uses a container for running the tests. The
paths for the working directory must match between builder and
runner, otherwise the hwtable test fails while trying to create
the CONFIG_DIR.

The container uses ${{ github.workspace }} as working directory,
whereas the build environment uses the abbreviated
__w/multipath-tools/multipath-tools. Adapt the build environment such
that the path is correct later.

See https://github.com/mosteo-actions/docker-run/blob/v1/action.yml

Signed-off-by: Martin Wilck <mwilck at suse.com>
---
 .github/workflows/foreign.yaml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/foreign.yaml b/.github/workflows/foreign.yaml
index c164cb3..e9ffd3d 100644
--- a/.github/workflows/foreign.yaml
+++ b/.github/workflows/foreign.yaml
@@ -24,7 +24,8 @@ jobs:
         run: make test
       - name: build
         if: ${{ matrix.arch != '' && matrix.arch != '-i386' }}
-        run: make test-progs
+        # The build path is different between builder and runner
+        run: make TESTDIR=${{ github.workspace }}/tests test-progs
       - name: archive
         if: ${{ matrix.arch != '' && matrix.arch != '-i386' }}
         run: >
@@ -61,6 +62,8 @@ jobs:
         uses: mosteo-actions/docker-run at v1
         with:
           image: mwilck/multipath-run-${{ matrix.os }}-${{ matrix.arch }}
-          # The runner is an image that has "make" as entrypoint
+          # The runner is an image that has "make" as entrypoint and uses
+          # github.workspace as both host dir and guest volume by default.
+          # See https://github.com/mosteo-actions/docker-run/blob/v1/action.yml
           # So run "make -C tests" here
           command: -C tests
-- 
2.36.0



More information about the dm-devel mailing list