mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-04 11:55:51 +00:00
105 lines
3.2 KiB
YAML
105 lines
3.2 KiB
YAML
name: Upload Conan Dependencies
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 9 * * 1-5"
|
|
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:
|
|
- .github/workflows/upload-conan-deps.yml
|
|
|
|
- .github/actions/conan/action.yml
|
|
- ".github/scripts/conan/**"
|
|
|
|
- conanfile.py
|
|
- conan.lock
|
|
push:
|
|
branches: [develop]
|
|
paths:
|
|
- .github/workflows/upload-conan-deps.yml
|
|
|
|
- .github/actions/conan/action.yml
|
|
- ".github/scripts/conan/**"
|
|
|
|
- conanfile.py
|
|
- conan.lock
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
generate-matrix:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
steps:
|
|
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
|
|
|
- name: Calculate conan matrix
|
|
id: set-matrix
|
|
run: .github/scripts/conan/generate_matrix.py >> "${GITHUB_OUTPUT}"
|
|
|
|
upload-conan-deps:
|
|
name: Build ${{ matrix.compiler }}${{ matrix.sanitizer_ext }} ${{ matrix.build_type }}
|
|
|
|
needs: generate-matrix
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
|
|
max-parallel: 10
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
container: ${{ matrix.container != '' && fromJson(matrix.container) || null }}
|
|
|
|
env:
|
|
CONAN_PROFILE: ${{ matrix.compiler }}${{ matrix.sanitizer_ext }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
|
|
|
|
- name: Prepare runner
|
|
uses: XRPLF/actions/.github/actions/prepare-runner@7951b682e5a2973b28b0719a72f01fc4b0d0c34f
|
|
with:
|
|
disable_ccache: true
|
|
|
|
- name: Setup conan on macOS
|
|
if: ${{ runner.os == 'macOS' }}
|
|
shell: bash
|
|
run: ./.github/scripts/conan/init.sh
|
|
|
|
- name: Show conan profile
|
|
run: conan profile show --profile:all ${{ env.CONAN_PROFILE }}
|
|
|
|
- name: Run conan
|
|
uses: ./.github/actions/conan
|
|
with:
|
|
conan_profile: ${{ env.CONAN_PROFILE }}
|
|
# We check that everything builds fine from source on scheduled runs
|
|
# But we do build and upload packages with build=missing by default
|
|
force_conan_source_build: ${{ github.event_name == 'schedule' || github.event.inputs.force_source_build == 'true' }}
|
|
build_type: ${{ matrix.build_type }}
|
|
|
|
- name: Login to Conan
|
|
if: ${{ github.repository_owner == 'XRPLF' && github.event_name != 'pull_request' }}
|
|
run: conan remote login -p ${{ secrets.CONAN_PASSWORD }} xrplf ${{ secrets.CONAN_USERNAME }}
|
|
|
|
- name: Upload Conan packages
|
|
if: ${{ github.repository_owner == 'XRPLF' && github.event_name != 'pull_request' && github.event_name != 'schedule' }}
|
|
env:
|
|
FORCE_OPTION: ${{ github.event.inputs.force_upload == 'true' && '--force' || '' }}
|
|
run: conan upload "*" -r=xrplf --confirm ${FORCE_OPTION}
|