Skip to content

Commit

Permalink
Merge branch 'scripts' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
mwilck committed Jul 18, 2024
2 parents fa30526 + dcea0f6 commit d120afb
Showing 1 changed file with 40 additions and 3 deletions.
43 changes: 40 additions & 3 deletions .github/workflows/sles.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: compile and unit test on Leap
name: compile and unit test on SUSE distros
on:
push:
branches:
Expand All @@ -7,6 +7,7 @@ on:
- next
- edge
paths:
- '.github/workflows/sles.yaml'
- '**.h'
- '**.c'
- '**Makefile*'
Expand All @@ -18,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ['tumbleweed', '15.3', '15.4', '15.5']
os: ['tumbleweed', '15.3', '15.4', '15.5', '15.6', '12']
# We have -arm too (for armv7l)
# But tests fail with qemu-user (readdir() returns -EOVERFLOW), see
# https://gitlab.com/qemu-project/qemu/-/issues/263
Expand All @@ -27,7 +28,26 @@ jobs:
# this means replacing cmocka wrappers like __wrap_lseek() with
# __wrap_lseek64()
arch: ['x86_64', 'ppc64le', 'aarch64', 's390x']
exclude:
- os: 12
- arch: aarch64
steps:
- name: set repository and container name (TW)
run: |
echo "REPO_NAME=${{ matrix.os }}" >> $GITHUB_ENV
echo "CONT_NAME=multipath-build-opensuse-tumbleweed-latest" >> $GITHUB_ENV
if: ${{ matrix.os == 'tumbleweed' }}
- name: set repository and container name (SLE12)
run: |
echo "REPO_NAME=sle_12_sp5" >> $GITHUB_ENV
echo "CONT_NAME=multipath-build-sles-12-latest" >> $GITHUB_ENV
if: ${{ matrix.os == '12' }}
- name: set repository and container name (SLE15)
run: |
echo "${{ matrix.os }}" | \
sed -E 's/15.([0-9]*)/REPO_NAME=sle_15_sp\1/' >> $GITHUB_ENV
echo "CONT_NAME=multipath-build-sles-15-${{ matrix.os }}" >> $GITHUB_ENV
if: ${{ startswith( matrix.os, '15') }}
- name: checkout
uses: actions/checkout@v1
- name: enable foreign arch
Expand All @@ -38,6 +58,23 @@ jobs:
# See https://github.51.almunity/t/expressions-in-docker-uri/16271
uses: mosteo-actions/docker-run@v1
with:
image: registry.opensuse.org/home/mwilck/containers/${{ env.REPO_NAME }}/${{ env.CONT_NAME }}
params: --platform ${{ matrix.arch }}
image: registry.opensuse.org/home/mwilck/containers/${{ matrix.os }}/containers/multipath-build
pull-params: "--platform linux/${{ env.CONTAINER_ARCH }}"
command: test

- name: remove output files
run: rm -f tests/directio.out tests/dmevents.out
- name: mpath
run: sudo modprobe dm_multipath
- name: brd
run: sudo modprobe brd rd_nr=1 rd_size=65536
- name: run root tests
uses: mosteo-actions/docker-run@v1
with:
image: registry.opensuse.org/home/mwilck/containers/${{ env.REPO_NAME }}/${{ env.CONT_NAME }}
params: >
--platform ${{ matrix.arch }} --privileged
-v /dev/ram0:/dev/ram0 -e DIO_TEST_DEV=/dev/ram0
pull-params: "--platform linux/${{ env.CONTAINER_ARCH }}"
command: -C tests directio.out dmevents.out

0 comments on commit d120afb

Please sign in to comment.