Skip to content

Commit

Permalink
GitHub workflows: native.yml: run root tests
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Wilck <mwilck@suse.com>
  • Loading branch information
mwilck committed Jul 12, 2024
1 parent 66fa04d commit 6a312b6
Showing 1 changed file with 37 additions and 18 deletions.
55 changes: 37 additions & 18 deletions .github/workflows/native.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,34 +40,37 @@ jobs:
- name: checkout
uses: actions/checkout@v1
- name: build and test
if: ${{ matrix.os != 'jessie' }}
if: ${{ matrix.os != 'debian-jessie' }}
run: make -j -Orecurse test
- name: build and test (jessie)
# On jessie, we use libreadline 5 (no licensing issue)
if: ${{ matrix.os == 'jessie' }}
if: ${{ matrix.os == 'debian-jessie' }}
run: make -j -Orecurse READLINE=libreadline test

- name: set archive name
# Leap containers have cpio but not tar
run: echo ARCHIVE_TGT=test-progs.cpio >> $GITHUB_ENV
if: ${{ matrix.os == 'opensuse-leap' }}
- name: set archive name
run: echo ARCHIVE_TGT=test-progs.tar >> $GITHUB_ENV
if: ${{ matrix.os != 'opensuse-leap' }}
- name: create binary archive
run: >
printf "%s\\n"
Makefile* config.mk
libmpathcmd/*.so* libmultipath/*.so* libmpathutil/*.so*
libmultipath/checkers/*.so libmultipath/prioritizers/*.so
libmultipath/foreign/*.so
tests/lib tests/*-test tests/Makefile tests/*.so*
run: make ${{ env.ARCHIVE_TGT }}
- name: upload binary archive
uses: actions/upload-artifact@v1
with:
name: native-${{ matrix.os }}
path: binaries.cpio
path: ${{ env.ARCHIVE_TGT }}

- name: clean
run: make clean
- name: clang
if: ${{ matrix.os != 'jessie' }}
if: ${{ matrix.os != 'debian-jessie' }}
env:
CC: clang
run: make -j -Orecurse test
- name: clang (jessie)
if: ${{ matrix.os == 'jessie' }}
if: ${{ matrix.os == 'debian-jessie' }}
env:
CC: clang
run: make READLINE=libreadline test
Expand All @@ -90,19 +93,35 @@ jobs:
run: sudo modprobe dm_multipath
- name: brd
run: sudo modprobe brd rd_nr=1 rd_size=65536

- name: checkout
uses: actions/checkout@v1

- name: download binary archive
uses: actions/download-artifact@v1
with:
name: native-${{ matrix.os }}
- name: unpack binary archive
run: cpio -idmv <native-${{ matrix.os }}/binaries.cpio
run: cpio -idv < native-${{ matrix.os }}/test-progs.cpio
if: ${{ matrix.os == 'opensuse-leap' }}
- name: unpack binary archive
run: tar xfmv native-${{ matrix.os }}/test-progs.tar
if: ${{ matrix.os != 'opensuse-leap' }}

- name: run root tests
uses: mosteo-actions/docker-run@v1
with:
image: ghcr.io/mwilck/multipath-run-debian-${{ matrix.os }}
guest-dir: /build
image: ghcr.io/mwilck/multipath-build-${{ matrix.os }}
guest-dir: /__w/multipath-tools/multipath-tools
host-dir: ${{ github.workspace }}
params: --privileged -v /dev/ram0:/dev/ram0
command: -C tests DIO_TEST_DEV=/dev/ram0
params: >
--workdir /__w/multipath-tools/multipath-tools --privileged
-v /dev/ram0:/dev/ram0 -e DIO_TEST_DEV=/dev/ram0
command: -C tests directio.out dmevents.out
id: root-test
continue-on-error: true
- name: show root test output
run: cat tests/directio.out tests/dmevents.out
run: for o in tests/*.out; do echo "===== $o ====="; cat "$o"; done
- name: fail
run: /bin/false
if: ${{ steps.root-test.outcome == 'failure' }}

0 comments on commit 6a312b6

Please sign in to comment.