test: Add build_and_test reusable workflow (#2048)

This commit is contained in:
Ayaz Salikhov
2025-04-29 20:28:51 +01:00
committed by GitHub
parent de055934e1
commit cc1da5afa9
7 changed files with 275 additions and 226 deletions

View File

@@ -1,4 +1,5 @@
name: Build
on:
push:
branches: [master, release/*, develop]
@@ -7,8 +8,9 @@ on:
workflow_dispatch:
jobs:
build:
name: Build
build-and-test:
name: Build and Test
strategy:
fail-fast: false
matrix:
@@ -42,7 +44,8 @@ jobs:
build_type: Release
code_coverage: false
static: false
uses: ./.github/workflows/build_impl.yml
uses: ./.github/workflows/build_and_test.yml
with:
runs_on: ${{ matrix.os }}
container: ${{ matrix.container }}
@@ -50,55 +53,13 @@ jobs:
build_type: ${{ matrix.build_type }}
code_coverage: ${{ matrix.code_coverage }}
static: ${{ matrix.static }}
unit_tests: true
integration_tests: true
run_unit_tests: true
run_integration_tests: false
clio_server: true
test:
name: Run Tests
needs: build
strategy:
fail-fast: false
matrix:
include:
- os: heavy
conan_profile: gcc
build_type: Release
container:
image: ghcr.io/xrplf/clio-ci:latest
- os: heavy
conan_profile: clang
build_type: Release
container:
image: ghcr.io/xrplf/clio-ci:latest
- os: heavy
conan_profile: clang
build_type: Debug
container:
image: ghcr.io/xrplf/clio-ci:latest
- os: macos15
conan_profile: default_apple_clang
build_type: Release
runs-on: ${{ matrix.os }}
container: ${{ matrix.container }}
steps:
- name: Clean workdir
if: ${{ runner.os == 'macOS' }}
uses: kuznetsss/workspace-cleanup@80b9863b45562c148927c3d53621ef354e5ae7ce #v1.0
- uses: actions/download-artifact@v4
with:
name: clio_tests_${{ runner.os }}_${{ matrix.build_type }}_${{ matrix.conan_profile }}
- name: Run clio_tests
run: |
chmod +x ./clio_tests
./clio_tests
check_config:
name: Check Config Description
needs: build
needs: build-and-test
runs-on: heavy
container:
image: ghcr.io/xrplf/clio-ci:latest