Files
rippled/.github/workflows/main.yml

121 lines
4.0 KiB
YAML

# This workflow runs all workflows to check, build and test the project on
# various Linux flavors, as well as MacOS and Windows.
name: Main
# This workflow is triggered on every push to the repository, including pull
# requests. However, it will not run if the pull request is a draft unless it
# has the 'DraftRunCI' label. As GitHub Actions does not support such `if`
# conditions here, the individual jobs will check the pull request state and
# labels to determine whether to run or not. The workflows called by the jobs
# may also have their own conditions to partially or completely skip execution
# as needed.
on: push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
env:
# The Conan remote where the dependencies will be cached.
CONAN_REMOTE_NAME: xrplf
CONAN_REMOTE_URL: https://conan.ripplex.io
# The default runner for the jobs. This can be overridden in individual jobs.
RUNNER: ubuntu-latest
jobs:
# This job exposes the environment variables that will be used by other jobs.
# It is a workaround for the env-context not being available in the 'with'
# steps when calling other workflows.
env-vars:
runs-on: ${{ env.RUNNER }}
steps:
- run: echo "Exposing environment variables."
outputs:
conan_remote_name: ${{ env.CONAN_REMOTE_NAME }}
conan_remote_url: ${{ env.CONAN_REMOTE_URL }}
runner: ${{ env.RUNNER }}
check-clang-format:
needs: env-vars
if: github.event.pull_request.draft == false || contains(github.event.pull_request.labels.*.name, 'DraftRunCI')
uses: ./.github/workflows/check-clang-format.yml
with:
runner: ${{ needs.env-vars.outputs.runner }}
check-levelization:
needs: env-vars
if: github.event.pull_request.draft == false || contains(github.event.pull_request.labels.*.name, 'DraftRunCI')
uses: ./.github/workflows/check-levelization.yml
with:
runner: ${{ needs.env-vars.outputs.runner }}
debian:
needs:
- env-vars
- check-clang-format
- check-levelization
uses: ./.github/workflows/build-debian.yml
with:
conan_remote_name: ${{ needs.env-vars.outputs.conan_remote_name }}
conan_remote_url: ${{ needs.env-vars.outputs.conan_remote_url }}
secrets:
conan_username: ${{ secrets.CONAN_USERNAME }}
conan_password: ${{ secrets.CONAN_PASSWORD }}
# rhel:
# needs:
# - env-vars
# - check-clang-format
# - check-levelization
# uses: ./.github/workflows/build-rhel.yml
# with:
# conan_remote_name: ${{ needs.env-vars.outputs.conan_remote_name }}
# conan_remote_url: ${{ needs.env-vars.outputs.conan_remote_url }}
# secrets:
# conan_username: ${{ secrets.CONAN_USERNAME }}
# conan_password: ${{ secrets.CONAN_PASSWORD }}
#
# ubuntu:
# needs:
# - env-vars
# - check-clang-format
# - check-levelization
# uses: ./.github/workflows/build-ubuntu.yml
# with:
# conan_remote_name: ${{ needs.env-vars.outputs.conan_remote_name }}
# conan_remote_url: ${{ needs.env-vars.outputs.conan_remote_url }}
# secrets:
# conan_username: ${{ secrets.CONAN_USERNAME }}
# conan_password: ${{ secrets.CONAN_PASSWORD }}
#
# macos:
# needs:
# - env-vars
# - check-clang-format
# - check-levelization
# uses: ./.github/workflows/build-macos.yml
# with:
# conan_remote_name: ${{ needs.env-vars.outputs.conan_remote_name }}
# conan_remote_url: ${{ needs.env-vars.outputs.conan_remote_url }}
# secrets:
# conan_username: ${{ secrets.CONAN_USERNAME }}
# conan_password: ${{ secrets.CONAN_PASSWORD }}
#
# windows:
# needs:
# - env-vars
# - check-clang-format
# - check-levelization
# uses: ./.github/workflows/build-windows.yml
# with:
# conan_remote_name: ${{ needs.env-vars.outputs.conan_remote_name }}
# conan_remote_url: ${{ needs.env-vars.outputs.conan_remote_url }}
# secrets:
# conan_username: ${{ secrets.CONAN_USERNAME }}
# conan_password: ${{ secrets.CONAN_PASSWORD }}