mirror of
https://github.com/upa/mscp.git
synced 2026-02-04 03:24:58 +08:00
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: test
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main", "dev" ]
|
|
pull_request:
|
|
branches: [ "main", "dev" ]
|
|
|
|
env:
|
|
BUILD_TYPE: Release
|
|
|
|
jobs:
|
|
test:
|
|
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.22
|
|
- arch-base
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: apply the patch to libssh
|
|
run: |
|
|
git -C libssh fetch --all --tags --prune
|
|
patch -d libssh -p1 < patch/$(git -C libssh describe).patch
|
|
|
|
# TODO: just building docker images does not require libssh. fix CMakeLists
|
|
- name: install build dependency
|
|
run: |
|
|
sudo apt-get update
|
|
sudo ./scripts/install-build-deps.sh
|
|
|
|
- name: configure CMake
|
|
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
|
|
|
- name: Build Containers
|
|
run: make -C ${{github.workspace}}/build docker-build-${{ matrix.index }}
|
|
|
|
- name: Run Test
|
|
run: make -C ${{github.workspace}}/build docker-test-${{ matrix.index }}
|