diff --git a/.github/workflows/build-debian.yml b/.github/workflows/build-debian.yml index 645bd9c26b..636aeaf946 100644 --- a/.github/workflows/build-debian.yml +++ b/.github/workflows/build-debian.yml @@ -6,8 +6,9 @@ on: inputs: build_dir: description: 'The directory where the build will take place.' - required: true + required: false type: string + default: '.build' conan_remote_name: description: 'The name of the Conan remote to use.' required: true diff --git a/.github/workflows/build-rhel.yml b/.github/workflows/build-rhel.yml index 5f0b4811e0..4600186a49 100644 --- a/.github/workflows/build-rhel.yml +++ b/.github/workflows/build-rhel.yml @@ -5,6 +5,11 @@ name: RHEL on: workflow_call: inputs: + build_dir: + description: 'The directory where the build will take place.' + required: false + type: string + default: '.build' conan_remote_name: description: 'The name of the Conan remote to use.' required: true diff --git a/.github/workflows/check-clang-format.yml b/.github/workflows/check-clang-format.yml index 4d9c0fdd1d..ffe50598ae 100644 --- a/.github/workflows/check-clang-format.yml +++ b/.github/workflows/check-clang-format.yml @@ -3,13 +3,7 @@ name: Clang Format # This workflow can only be triggered by other workflows. -on: - workflow_call: - inputs: - runner: - description: 'An optional string representing the GitHub runner to use.' - required: true - type: string +on: workflow_call concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -21,7 +15,7 @@ defaults: jobs: clang-format: - runs-on: ${{ inputs.runner }} + runs-on: ubuntu-latest container: ghcr.io/xrplf/ci/tools-rippled-clang-format steps: # The $GITHUB_WORKSPACE and ${{ github.workspace }} might not point to the diff --git a/.github/workflows/check-levelization.yml b/.github/workflows/check-levelization.yml index 7d4f6bc18e..cd6d704acd 100644 --- a/.github/workflows/check-levelization.yml +++ b/.github/workflows/check-levelization.yml @@ -3,13 +3,7 @@ name: Levelization # This workflow can only be triggered by other workflows. -on: - workflow_call: - inputs: - runner: - description: 'An optional string representing the GitHub runner to use.' - required: true - type: string +on: workflow_call concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -21,7 +15,7 @@ defaults: jobs: levelization: - runs-on: ${{ inputs.runner }} + runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 diff --git a/.github/workflows/generate-matrix.yml b/.github/workflows/generate-matrix.yml index 8807e8c65e..ddc60e8986 100644 --- a/.github/workflows/generate-matrix.yml +++ b/.github/workflows/generate-matrix.yml @@ -27,6 +27,31 @@ on: type: string # Generate the JSON outputs by using JQ to compact the JSON string. +# * This workflow can be called as follows: +# ```yaml +# generate-matrix: +# uses: ./.github/workflows/generate-matrix.yml +# with: +# architecture: ${{ env.STRATEGY_MATRIX_ARCHITECTURE }} +# os: ${{ env.STRATEGY_MATRIX_OS }} +# build_type: ${{ env.STRATEGY_MATRIX_BUILD_TYPE }} +# cmake_args: ${{ env.STRATEGY_MATRIX_UNITY }} +# ``` +# * This workflow can be used as follows: +# ```yaml +# use-matrix: +# needs: generate-matrix +# strategy: +# fail-fast: false +# matrix: +# architecture: ${{ fromJson(needs.generate-matrix.outputs.architecture) }} +# os: ${{ fromJson(needs.generate-matrix.outputs.os) }} +# build_type: ${{ fromJson(needs.generate-matrix.outputs.build_type) }} +# cmake_args: ${{ fromJson(needs.generate-matrix.outputs.cmake_args) }} +# runs-on: ${{ matrix.architecture.runner }} +# container: ghcr.io/xrplf/ci/${{ matrix.os.distro }}-${{ matrix.os.release }}:${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }} +# ... +# ``` jobs: generate-matrix: runs-on: ${{ inputs.runner }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 09c52d4789..643ebea5ce 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,26 +20,18 @@ defaults: shell: bash env: - # The default build directory for the project. - BUILD_DIR: .build # 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: check-clang-format: if: github.event.pull_request.draft == false || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') uses: ./.github/workflows/check-clang-format.yml - with: - runner: ${{ env.RUNNER }} check-levelization: if: github.event.pull_request.draft == false || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') uses: ./.github/workflows/check-levelization.yml - with: - runner: ${{ env.RUNNER }} debian: needs: @@ -47,7 +39,6 @@ jobs: - check-levelization uses: ./.github/workflows/build-debian.yml with: - build_dir: ${{ env.BUILD_DIR }} conan_remote_name: ${{ env.CONAN_REMOTE_NAME }} conan_remote_url: ${{ env.CONAN_REMOTE_URL }} secrets: @@ -60,7 +51,6 @@ jobs: # - check-levelization # uses: ./.github/workflows/build-rhel.yml # with: -# build_dir: ${{ env.BUILD_DIR }} # conan_remote_name: ${{ env.CONAN_REMOTE_NAME }} # conan_remote_url: ${{ env.CONAN_REMOTE_URL }} # secrets: @@ -73,7 +63,6 @@ jobs: # - check-levelization # uses: ./.github/workflows/build-ubuntu.yml # with: -# build_dir: ${{ env.BUILD_DIR }} # conan_remote_name: ${{ env.CONAN_REMOTE_NAME }} # conan_remote_url: ${{ env.CONAN_REMOTE_URL }} # secrets: @@ -86,7 +75,6 @@ jobs: # - check-levelization # uses: ./.github/workflows/build-macos.yml # with: -# build_dir: ${{ env.BUILD_DIR }} # conan_remote_name: ${{ env.CONAN_REMOTE_NAME }} # conan_remote_url: ${{ env.CONAN_REMOTE_URL }} # secrets: @@ -99,7 +87,6 @@ jobs: # - check-levelization # uses: ./.github/workflows/build-windows.yml # with: -# build_dir: ${{ env.BUILD_DIR }} # conan_remote_name: ${{ env.CONAN_REMOTE_NAME }} # conan_remote_url: ${{ env.CONAN_REMOTE_URL }} # secrets: