mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-07 02:36:47 +00:00
The `upload-conan-deps` workflow that's triggered on push is supposed to upload the Conan dependencies to our remote, so future PR commits can pull those dependencies from the remote. However, as the `sanitize` argument is missing, it was building different dependencies than what the PRs are building for the asan/tsan/ubsan job, so the latter would not find anything in the remote that they could use. This change sets the missing `sanitizers` input variable when running the `build-deps` action. Separately, the `setup-conan` action showed the default profile, while we are using the `ci` profile. To ensure the profile is correctly printed when sanitizers are enabled, the environment variable the profile uses is set before calling the action.
114 lines
4.1 KiB
YAML
114 lines
4.1 KiB
YAML
name: Upload Conan Dependencies
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 3 * * 2-6"
|
|
workflow_dispatch:
|
|
inputs:
|
|
force_source_build:
|
|
description: "Force source build of all dependencies"
|
|
required: false
|
|
default: false
|
|
type: boolean
|
|
force_upload:
|
|
description: "Force upload of all dependencies"
|
|
required: false
|
|
default: false
|
|
type: boolean
|
|
pull_request:
|
|
branches: [develop]
|
|
paths:
|
|
# This allows testing changes to the upload workflow in a PR
|
|
- .github/workflows/upload-conan-deps.yml
|
|
push:
|
|
branches: [develop]
|
|
paths:
|
|
- .github/workflows/upload-conan-deps.yml
|
|
- .github/workflows/reusable-strategy-matrix.yml
|
|
- .github/actions/build-deps/action.yml
|
|
- .github/actions/setup-conan/action.yml
|
|
- ".github/scripts/strategy-matrix/**"
|
|
- conanfile.py
|
|
- conan.lock
|
|
|
|
env:
|
|
CONAN_REMOTE_NAME: xrplf
|
|
CONAN_REMOTE_URL: https://conan.ripplex.io
|
|
NPROC_SUBTRACT: 2
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
# Generate the strategy matrix to be used by the following job.
|
|
generate-matrix:
|
|
uses: ./.github/workflows/reusable-strategy-matrix.yml
|
|
with:
|
|
strategy_matrix: ${{ github.event_name == 'pull_request' && 'minimal' || 'all' }}
|
|
|
|
# Build and upload the dependencies for each configuration.
|
|
run-upload-conan-deps:
|
|
needs:
|
|
- generate-matrix
|
|
strategy:
|
|
fail-fast: false
|
|
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
|
|
max-parallel: 10
|
|
runs-on: ${{ matrix.architecture.runner }}
|
|
container: ${{ contains(matrix.architecture.platform, 'linux') && format('ghcr.io/xrplf/ci/{0}-{1}:{2}-{3}-sha-{4}', matrix.os.distro_name, matrix.os.distro_version, matrix.os.compiler_name, matrix.os.compiler_version, matrix.os.image_sha) || null }}
|
|
steps:
|
|
- name: Cleanup workspace (macOS and Windows)
|
|
if: ${{ runner.os == 'macOS' || runner.os == 'Windows' }}
|
|
uses: XRPLF/actions/cleanup-workspace@2ece4ec6ab7de266859a6f053571425b2bd684b6
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
|
|
|
- name: Prepare runner
|
|
uses: XRPLF/actions/prepare-runner@f05cab7b8541eee6473aa42beb9d2fe35608a190
|
|
with:
|
|
enable_ccache: false
|
|
|
|
- name: Print build environment
|
|
uses: ./.github/actions/print-env
|
|
|
|
- name: Get number of processors
|
|
uses: XRPLF/actions/get-nproc@2ece4ec6ab7de266859a6f053571425b2bd684b6
|
|
id: nproc
|
|
with:
|
|
subtract: ${{ env.NPROC_SUBTRACT }}
|
|
|
|
- name: Setup Conan
|
|
env:
|
|
SANITIZERS: ${{ matrix.sanitizers }}
|
|
uses: ./.github/actions/setup-conan
|
|
with:
|
|
remote_name: ${{ env.CONAN_REMOTE_NAME }}
|
|
remote_url: ${{ env.CONAN_REMOTE_URL }}
|
|
|
|
- name: Build dependencies
|
|
uses: ./.github/actions/build-deps
|
|
with:
|
|
build_nproc: ${{ steps.nproc.outputs.nproc }}
|
|
build_type: ${{ matrix.build_type }}
|
|
force_build: ${{ github.event_name == 'schedule' || github.event.inputs.force_source_build == 'true' }}
|
|
# Set the verbosity to "quiet" for Windows to avoid an excessive
|
|
# amount of logs. For other OSes, the "verbose" logs are more useful.
|
|
log_verbosity: ${{ runner.os == 'Windows' && 'quiet' || 'verbose' }}
|
|
sanitizers: ${{ matrix.sanitizers }}
|
|
|
|
- name: Log into Conan remote
|
|
if: ${{ github.repository_owner == 'XRPLF' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }}
|
|
run: conan remote login "${CONAN_REMOTE_NAME}" "${{ secrets.CONAN_REMOTE_USERNAME }}" --password "${{ secrets.CONAN_REMOTE_PASSWORD }}"
|
|
|
|
- name: Upload Conan packages
|
|
if: ${{ github.repository_owner == 'XRPLF' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }}
|
|
env:
|
|
FORCE_OPTION: ${{ github.event.inputs.force_upload == 'true' && '--force' || '' }}
|
|
run: conan upload "*" --remote="${CONAN_REMOTE_NAME}" --confirm ${FORCE_OPTION}
|