mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
Convert reusable workflows back to actions to avoid shortcomings with concurrency
This commit is contained in:
63
.github/workflows/build-debian.yml
vendored
63
.github/workflows/build-debian.yml
vendored
@@ -164,48 +164,47 @@ jobs:
|
||||
install-dependencies:
|
||||
needs:
|
||||
- generate-outputs
|
||||
uses: ./.github/workflows/install-dependencies.yml
|
||||
runs-on: ${{ matrix.architecture.runner }}
|
||||
container: ghcr.io/xrplf/ci/${{ matrix.os.distro }}-${{ matrix.os.release }}:${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
architecture: ${{ fromJson(needs.generate-outputs.outputs.strategy_matrix_architecture) }}
|
||||
os: ${{ fromJson(needs.generate-outputs.outputs.strategy_matrix_os) }}
|
||||
build_type: ${{ fromJson(needs.generate-outputs.outputs.strategy_matrix_build_type) }}
|
||||
uses: ./.github/actions/install-dependencies
|
||||
with:
|
||||
build_dir: ${{ inputs.build_dir }}
|
||||
build_type: ${{ matrix.build_type }}
|
||||
conan_global_conf: ${{ needs.generate-outputs.outputs.conan_global_conf }}
|
||||
conan_remote_name: ${ inputs.conan_remote_name }
|
||||
conan_remote_url: ${ inputs.conan_remote_url }
|
||||
container: ghcr.io/xrplf/ci/${{ matrix.os.distro }}-${{ matrix.os.release }}:${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}
|
||||
runner: ${{ matrix.architecture.runner }}
|
||||
secrets:
|
||||
conan_remote_name: ${{ inputs.conan_remote_name }}
|
||||
conan_remote_url: ${{ inputs.conan_remote_url }}
|
||||
conan_remote_username: ${{ inputs.conan_remote_username }}
|
||||
conan_remote_password: ${{ inputs.conan_remote_password }}
|
||||
|
||||
# Build and test the binary using various configurations.
|
||||
build-and-test:
|
||||
needs:
|
||||
- generate-outputs
|
||||
- install-dependencies
|
||||
uses: ./.github/workflows/build-nix.yml
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
architecture: ${{ fromJson(needs.generate-outputs.outputs.strategy_matrix_architecture) }}
|
||||
os: ${{ fromJson(needs.generate-outputs.outputs.strategy_matrix_os) }}
|
||||
build_type: ${{ fromJson(needs.generate-outputs.outputs.strategy_matrix_build_type) }}
|
||||
cmake_args: ${{ fromJson(needs.generate-outputs.outputs.strategy_matrix_cmake_args) }}
|
||||
with:
|
||||
build_dir: ${{ inputs.build_dir }}
|
||||
build_type: ${{ matrix.build_type }}
|
||||
cmake_args: ${{ matrix.cmake_args }}
|
||||
cmake_generator: "Ninja"
|
||||
conan_global_conf: ${{ needs.generate-outputs.outputs.conan_global_conf }}
|
||||
conan_remote_name: ${ inputs.conan_remote_name }
|
||||
conan_remote_url: ${ inputs.conan_remote_url }
|
||||
container: ghcr.io/xrplf/ci/${{ matrix.os.distro }}-${{ matrix.os.release }}:${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}
|
||||
runner: ${{ matrix.architecture.runner }}
|
||||
secrets:
|
||||
conan_remote_username: ${{ inputs.conan_remote_username }}
|
||||
conan_remote_password: ${{ inputs.conan_remote_password }}
|
||||
# # Build and test the binary using various configurations.
|
||||
# build-and-test:
|
||||
# needs:
|
||||
# - generate-outputs
|
||||
# - install-dependencies
|
||||
# uses: ./.github/workflows/build-nix.yml
|
||||
# strategy:
|
||||
# fail-fast: false
|
||||
# matrix:
|
||||
# architecture: ${{ fromJson(needs.generate-outputs.outputs.strategy_matrix_architecture) }}
|
||||
# os: ${{ fromJson(needs.generate-outputs.outputs.strategy_matrix_os) }}
|
||||
# build_type: ${{ fromJson(needs.generate-outputs.outputs.strategy_matrix_build_type) }}
|
||||
# cmake_args: ${{ fromJson(needs.generate-outputs.outputs.strategy_matrix_cmake_args) }}
|
||||
# with:
|
||||
# build_dir: ${{ inputs.build_dir }}
|
||||
# build_type: ${{ matrix.build_type }}
|
||||
# cmake_args: ${{ matrix.cmake_args }}
|
||||
# cmake_generator: "Ninja"
|
||||
# conan_global_conf: ${{ needs.generate-outputs.outputs.conan_global_conf }}
|
||||
# conan_remote_name: ${ inputs.conan_remote_name }
|
||||
# conan_remote_url: ${ inputs.conan_remote_url }
|
||||
# container: ghcr.io/xrplf/ci/${{ matrix.os.distro }}-${{ matrix.os.release }}:${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}
|
||||
# runner: ${{ matrix.architecture.runner }}
|
||||
# secrets:
|
||||
# conan_remote_username: ${{ inputs.conan_remote_username }}
|
||||
# conan_remote_password: ${{ inputs.conan_remote_password }}
|
||||
|
||||
63
.github/workflows/build-rhel.yml
vendored
63
.github/workflows/build-rhel.yml
vendored
@@ -141,48 +141,47 @@ jobs:
|
||||
install-dependencies:
|
||||
needs:
|
||||
- generate-outputs
|
||||
uses: ./.github/workflows/install-dependencies.yml
|
||||
runs-on: ${{ matrix.architecture.runner }}
|
||||
container: ghcr.io/xrplf/ci/${{ matrix.os.distro }}-${{ matrix.os.release }}:${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
architecture: ${{ fromJson(needs.generate-outputs.outputs.strategy_matrix_architecture) }}
|
||||
os: ${{ fromJson(needs.generate-outputs.outputs.strategy_matrix_os) }}
|
||||
build_type: ${{ fromJson(needs.generate-outputs.outputs.strategy_matrix_build_type) }}
|
||||
uses: ./.github/actions/install-dependencies
|
||||
with:
|
||||
build_dir: ${{ inputs.build_dir }}
|
||||
build_type: ${{ matrix.build_type }}
|
||||
conan_global_conf: ${{ needs.generate-outputs.outputs.conan_global_conf }}
|
||||
conan_remote_name: ${ inputs.conan_remote_name }
|
||||
conan_remote_url: ${ inputs.conan_remote_url }
|
||||
container: ghcr.io/xrplf/ci/${{ matrix.os.distro }}-${{ matrix.os.release }}:${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}
|
||||
runner: ${{ matrix.architecture.runner }}
|
||||
secrets:
|
||||
conan_remote_name: ${{ inputs.conan_remote_name }}
|
||||
conan_remote_url: ${{ inputs.conan_remote_url }}
|
||||
conan_remote_username: ${{ inputs.conan_remote_username }}
|
||||
conan_remote_password: ${{ inputs.conan_remote_password }}
|
||||
|
||||
# Build and test the binary using various configurations.
|
||||
build-and-test:
|
||||
needs:
|
||||
- generate-outputs
|
||||
- install-dependencies
|
||||
uses: ./.github/workflows/build-nix.yml
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
architecture: ${{ fromJson(needs.generate-outputs.outputs.strategy_matrix_architecture) }}
|
||||
os: ${{ fromJson(needs.generate-outputs.outputs.strategy_matrix_os) }}
|
||||
build_type: ${{ fromJson(needs.generate-outputs.outputs.strategy_matrix_build_type) }}
|
||||
cmake_args: ${{ fromJson(needs.generate-outputs.outputs.strategy_matrix_cmake_args) }}
|
||||
with:
|
||||
build_dir: ${{ inputs.build_dir }}
|
||||
build_type: ${{ matrix.build_type }}
|
||||
cmake_args: ${{ matrix.cmake_args }}
|
||||
cmake_generator: "Ninja"
|
||||
conan_global_conf: ${{ needs.generate-outputs.outputs.conan_global_conf }}
|
||||
conan_remote_name: ${ inputs.conan_remote_name }
|
||||
conan_remote_url: ${ inputs.conan_remote_url }
|
||||
container: ghcr.io/xrplf/ci/${{ matrix.os.distro }}-${{ matrix.os.release }}:${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}
|
||||
runner: ${{ matrix.architecture.runner }}
|
||||
secrets:
|
||||
conan_remote_username: ${{ inputs.conan_remote_username }}
|
||||
conan_remote_password: ${{ inputs.conan_remote_password }}
|
||||
# # Build and test the binary using various configurations.
|
||||
# build-and-test:
|
||||
# needs:
|
||||
# - generate-outputs
|
||||
# - install-dependencies
|
||||
# uses: ./.github/workflows/build-nix.yml
|
||||
# strategy:
|
||||
# fail-fast: false
|
||||
# matrix:
|
||||
# architecture: ${{ fromJson(needs.generate-outputs.outputs.strategy_matrix_architecture) }}
|
||||
# os: ${{ fromJson(needs.generate-outputs.outputs.strategy_matrix_os) }}
|
||||
# build_type: ${{ fromJson(needs.generate-outputs.outputs.strategy_matrix_build_type) }}
|
||||
# cmake_args: ${{ fromJson(needs.generate-outputs.outputs.strategy_matrix_cmake_args) }}
|
||||
# with:
|
||||
# build_dir: ${{ inputs.build_dir }}
|
||||
# build_type: ${{ matrix.build_type }}
|
||||
# cmake_args: ${{ matrix.cmake_args }}
|
||||
# cmake_generator: "Ninja"
|
||||
# conan_global_conf: ${{ needs.generate-outputs.outputs.conan_global_conf }}
|
||||
# conan_remote_name: ${ inputs.conan_remote_name }
|
||||
# conan_remote_url: ${ inputs.conan_remote_url }
|
||||
# container: ghcr.io/xrplf/ci/${{ matrix.os.distro }}-${{ matrix.os.release }}:${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }}
|
||||
# runner: ${{ matrix.architecture.runner }}
|
||||
# secrets:
|
||||
# conan_remote_username: ${{ inputs.conan_remote_username }}
|
||||
# conan_remote_password: ${{ inputs.conan_remote_password }}
|
||||
|
||||
94
.github/workflows/install-dependencies.yml
vendored
94
.github/workflows/install-dependencies.yml
vendored
@@ -1,94 +0,0 @@
|
||||
# This workflow installs and caches the Conan dependencies for the specified
|
||||
# configuration. The ones that are not in the remote cache will be built from
|
||||
# source and added to the cache.
|
||||
name: Install dependencies
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
build_dir:
|
||||
description: 'The directory where the build will take place.'
|
||||
required: true
|
||||
type: string
|
||||
build_type:
|
||||
description: 'The build type to use.'
|
||||
required: true
|
||||
type: string
|
||||
conan_global_conf:
|
||||
description: 'The contents of the global Conan configuration.'
|
||||
required: true
|
||||
type: string
|
||||
conan_remote_name:
|
||||
description: 'The name of the Conan remote to use.'
|
||||
required: true
|
||||
type: string
|
||||
conan_remote_url:
|
||||
description: 'The URL of the Conan remote to use.'
|
||||
required: true
|
||||
type: string
|
||||
container:
|
||||
description: 'The container image to use for the job.'
|
||||
required: true
|
||||
type: string
|
||||
runner:
|
||||
description: 'A string representing the runner to use.'
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
conan_remote_username:
|
||||
description: 'The username for logging into the Conan remote.'
|
||||
required: true
|
||||
conan_remote_password:
|
||||
description: 'The password for logging into the Conan remote.'
|
||||
required: true
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-install-dependencies
|
||||
cancel-in-progress: true
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
install-dependencies:
|
||||
runs-on: ${{ inputs.runner }}
|
||||
container: ${{ inputs.container }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||
- name: Check configuration
|
||||
run: |
|
||||
echo "Checking path"
|
||||
echo ${PATH} | tr ':' '\n'
|
||||
|
||||
echo "Checking environment variables."
|
||||
env | sort
|
||||
- name: Check versions
|
||||
run: |
|
||||
echo "Checking CMake version."
|
||||
cmake --version
|
||||
|
||||
echo "Checking compiler version."
|
||||
${CC} --version
|
||||
- name: Configure Conan
|
||||
uses: ./.github/actions/conan-configure
|
||||
with:
|
||||
conan_global_conf: ${{ inputs.conan_global_conf }}
|
||||
conan_remote_name: ${{ inputs.conan_remote_name }}
|
||||
conan_remote_url: ${{ inputs.conan_remote_url }}
|
||||
conan_remote_username: ${{ inputs.conan_remote_username }}
|
||||
conan_remote_password: ${{ inputs.conan_remote_password }}
|
||||
- name: Install Conan dependencies
|
||||
run: |
|
||||
mkdir -p ${{ inputs.build_dir }}
|
||||
cd ${{ inputs.build_dir }}
|
||||
conan install \
|
||||
--output-folder . \
|
||||
--build missing \
|
||||
--options:host "&:tests=True" \
|
||||
--options:host "&:xrpld=True" \
|
||||
--settings:all build_type=${{ inputs.build_type }} \
|
||||
..
|
||||
- name: Upload Conan dependencies
|
||||
run: conan upload '*' --confirm --check --remote ${{ inputs.conan_remote_name }}
|
||||
Reference in New Issue
Block a user