Files
clio/.github/workflows/build.yml
2025-04-30 11:45:56 +01:00

100 lines
3.0 KiB
YAML

name: Build
on:
push:
branches: [master, release/*, develop]
pull_request:
branches: [master, release/*, develop]
workflow_dispatch:
concurrency:
# Only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
name: Build and Test
strategy:
fail-fast: false
matrix:
include:
- os: heavy
conan_profile: gcc
build_type: Release
container: '{ "image": "ghcr.io/xrplf/clio-ci:latest" }'
code_coverage: false
static: true
- os: heavy
conan_profile: gcc
build_type: Debug
container: '{ "image": "ghcr.io/xrplf/clio-ci:latest" }'
code_coverage: true
static: true
- os: heavy
conan_profile: clang
build_type: Release
container: '{ "image": "ghcr.io/xrplf/clio-ci:latest" }'
code_coverage: false
static: true
- os: heavy
conan_profile: clang
build_type: Debug
container: '{ "image": "ghcr.io/xrplf/clio-ci:latest" }'
code_coverage: false
static: true
- os: macos15
conan_profile: default_apple_clang
build_type: Release
code_coverage: false
static: false
uses: ./.github/workflows/build_and_test.yml
with:
runs_on: ${{ matrix.os }}
container: ${{ matrix.container }}
conan_profile: ${{ matrix.conan_profile }}
build_type: ${{ matrix.build_type }}
code_coverage: ${{ matrix.code_coverage }}
static: ${{ matrix.static }}
run_unit_tests: true
run_integration_tests: false
clio_server: true
check_config:
name: Check Config Description
needs: build-and-test
runs-on: heavy
container:
image: ghcr.io/xrplf/clio-ci:latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: clio_server_Linux_Release_gcc
- name: Compare Config Description
shell: bash
run: |
repoConfigFile=docs/config-description.md
if ! [ -f ${repoConfigFile} ]; then
echo "Config Description markdown file is missing in docs folder"
exit 1
fi
chmod +x ./clio_server
configDescriptionFile=config_description_new.md
./clio_server -d ${configDescriptionFile}
configDescriptionHash=$(sha256sum ${configDescriptionFile} | cut -d' ' -f1)
repoConfigHash=$(sha256sum ${repoConfigFile} | cut -d' ' -f1)
if [ ${configDescriptionHash} != ${repoConfigHash} ]; then
echo "Markdown file is not up to date"
diff -u "${repoConfigFile}" "${configDescriptionFile}"
rm -f ${configDescriptionFile}
exit 1
fi
rm -f ${configDescriptionFile}
exit 0