mirror of
https://github.com/upa/mscp.git
synced 2026-02-04 03:24:58 +08:00
parallelize test on GitHub Actions uing matrix
This commit is contained in:
18
.github/workflows/test.yml
vendored
18
.github/workflows/test.yml
vendored
@@ -12,6 +12,18 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
index: # see DIST_IDS and DIST_VERS lists in CMakeLists.txt
|
||||||
|
- ubuntu-20.04
|
||||||
|
- ubuntu-22.04
|
||||||
|
- ubuntu-24.04
|
||||||
|
- rocky-8.9
|
||||||
|
- rocky-9.3
|
||||||
|
- almalinux-9.3
|
||||||
|
- alpine-3.19
|
||||||
|
- arch-base
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@@ -20,7 +32,7 @@ jobs:
|
|||||||
- name: patch to libssh
|
- name: patch to libssh
|
||||||
run: patch -d libssh -p1 < patch/libssh-0.10.6-2-g6f1b1e76.patch
|
run: patch -d libssh -p1 < patch/libssh-0.10.6-2-g6f1b1e76.patch
|
||||||
|
|
||||||
# TODO: just building docker does not require libssh. fix CMakeLists
|
# TODO: just building docker images does not require libssh. fix CMakeLists
|
||||||
- name: install build dependency
|
- name: install build dependency
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@@ -30,7 +42,7 @@ jobs:
|
|||||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||||
|
|
||||||
- name: Build Containers
|
- name: Build Containers
|
||||||
run: make -C ${{github.workspace}}/build docker-build-all
|
run: make -C ${{github.workspace}}/build docker-build-${{ matrix.index }}
|
||||||
|
|
||||||
- name: Run Test
|
- name: Run Test
|
||||||
run: make -C ${{github.workspace}}/build docker-test-all
|
run: make -C ${{github.workspace}}/build docker-test-${{ matrix.index }}
|
||||||
|
|||||||
@@ -165,6 +165,8 @@ enable_testing()
|
|||||||
# Custom targets to build and test mscp in docker containers.
|
# Custom targets to build and test mscp in docker containers.
|
||||||
# foreach(IN ZIP_LISTS) (cmake >= 3.17) can shorten the following lists.
|
# foreach(IN ZIP_LISTS) (cmake >= 3.17) can shorten the following lists.
|
||||||
# However, ubuntu 20.04 has cmake 3.16.3. So this is a roundabout trick.
|
# However, ubuntu 20.04 has cmake 3.16.3. So this is a roundabout trick.
|
||||||
|
#
|
||||||
|
# When edit DIST_IDS and DIST_VERS, also edit .github/workflows/test.yaml
|
||||||
list(APPEND DIST_IDS ubuntu ubuntu ubuntu rocky rocky almalinux alpine arch)
|
list(APPEND DIST_IDS ubuntu ubuntu ubuntu rocky rocky almalinux alpine arch)
|
||||||
list(APPEND DIST_VERS 20.04 22.04 24.04 8.9 9.3 9.3 3.19 base)
|
list(APPEND DIST_VERS 20.04 22.04 24.04 8.9 9.3 9.3 3.19 base)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user