diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 6714369155..c3520a479f 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -1,34 +1,49 @@ name: build inputs: - generator: - default: null - configuration: + build_dir: + description: 'The directory where the build will take place.' required: true - cmake-args: - default: null - cmake-target: - default: all -# An implicit input is the environment variable `build_dir`. + type: string + build_type: + description: 'The build type to use.' + required: true + type: choice + options: + - Debug + - Release + cmake_args: + description: 'Additional arguments to pass to CMake.' + required: false + type: string + cmake_generator: + description: 'The CMake generator to use for the build.' + required: true + type: string + cmake_target: + description: 'The CMake target to build.' + required: false + type: string + default: 'all' + + runs: using: composite steps: - - name: configure - shell: bash + - name: CMake configure + working-directory: ${{ inputs.build_dir }} run: | - cd ${build_dir} cmake \ - ${{ inputs.generator && format('-G "{0}"', inputs.generator) || '' }} \ + ${{ inputs.build_generator && format('-G "{0}"', inputs.build_generator) || '' }} \ -DCMAKE_TOOLCHAIN_FILE:FILEPATH=build/generators/conan_toolchain.cmake \ - -DCMAKE_BUILD_TYPE=${{ inputs.configuration }} \ + -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \ -Dtests=TRUE \ -Dxrpld=TRUE \ - ${{ inputs.cmake-args }} \ + ${{ inputs.cmake_args }} \ .. - - name: build - shell: bash + - name: CMake build + working-directory: ${{ inputs.build_dir }} run: | - cmake \ - --build ${build_dir} \ - --config ${{ inputs.configuration }} \ - --parallel ${NUM_PROCESSORS:-$(nproc)} \ - --target ${{ inputs.cmake-target }} + cmake --build . \ + --config ${{ inputs.build_type }} \ + --parallel $(nproc) \ + --target ${{ inputs.cmake_target }} diff --git a/.github/actions/conan-configure/action.yml b/.github/actions/conan-configure/action.yml new file mode 100644 index 0000000000..28a2963ada --- /dev/null +++ b/.github/actions/conan-configure/action.yml @@ -0,0 +1,52 @@ +name: conan-configure + +inputs: + conan_global_conf: + description: 'The contents of the global Conan configuration file.' + 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 + conan_remote_username: + description: 'The username for logging into the Conan remote.' + required: true + type: string + conan_remote_password: + description: 'The password for logging into the Conan remote.' + required: true + type: string + +# Install the Conan profiles and log into the specified remote. +runs: + using: composite + steps: + - name: Check configuration + run: | + echo "Checking Conan version." + conan --version + - name: Install Conan profile + run: | + echo "${{ inputs.conan_global_conf }}" >> $(conan config home)/global.conf + conan config install conan/profiles/default -tf $(conan config home)/profiles/ + echo "Installed Conan profile:" + conan profile show + - name: Add Conan remote + run: | + # Remove the remote if it already exists. This can occur on self-hosted + # runners where the workspace is not cleaned up between runs. + if conan remote list | grep -q '${{ inputs.conan_remote_name }}'; then + conan remote remove ${{ inputs.conan_remote_name }} + echo "Removed Conan remote '${{ inputs.conan_remote_name }}'." + fi + conan remote add --index 0 ${{ inputs.conan_remote_name }} ${{ inputs.conan_remote_url }} + echo "Added new conan remote '${{ inputs.conan_remote_name }}' at ${{ inputs.conan_remote_url }}." + - name: Log into Conan remote + run: | + conan remote login ${{ inputs.conan_remote_name }} ${{ inputs.conan_remote_username }} --password "${{ inputs.conan_remote_password }}" + conan remote list-users diff --git a/.github/actions/conan-dependencies/action.yml b/.github/actions/conan-dependencies/action.yml new file mode 100644 index 0000000000..d57169b746 --- /dev/null +++ b/.github/actions/conan-dependencies/action.yml @@ -0,0 +1,40 @@ +name: conan-dependencies + +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: choice + options: + - Debug + - Release + conan_remote_name: + description: 'The name of the Conan remote to use.' + required: true + type: string + +# Install 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. +# This action assumes that the Conan profiles have already been installed and +# that the user has logged into the specified remote, see the 'conan-configure' +# action. +runs: + using: composite + steps: + - 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 }} diff --git a/.github/actions/dependencies/action.yml b/.github/actions/dependencies/action.yml deleted file mode 100644 index 7ece9710a8..0000000000 --- a/.github/actions/dependencies/action.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: dependencies -inputs: - configuration: - required: true -# An implicit input is the environment variable `build_dir`. -runs: - using: composite - steps: - - name: export custom recipes - shell: bash - run: | - conan export --version 1.1.10 external/snappy - conan export --version 4.0.3 external/soci - - name: add Ripple Conan remote - if: env.CONAN_URL != '' - shell: bash - run: | - if conan remote list | grep -q "ripple"; then - conan remote remove ripple - echo "Removed conan remote ripple" - fi - conan remote add --index 0 ripple "${CONAN_URL}" - echo "Added conan remote ripple at ${CONAN_URL}" - - name: try to authenticate to Ripple Conan remote - if: env.CONAN_LOGIN_USERNAME_RIPPLE != '' && env.CONAN_PASSWORD_RIPPLE != '' - id: remote - shell: bash - run: | - echo "Authenticating to ripple remote..." - conan remote auth ripple --force - conan remote list-users - - name: list missing binaries - id: binaries - shell: bash - # Print the list of dependencies that would need to be built locally. - # A non-empty list means we have "failed" to cache binaries remotely. - run: | - echo missing=$(conan info . --build missing --settings build_type=${{ inputs.configuration }} --json 2>/dev/null | grep '^\[') | tee ${GITHUB_OUTPUT} - - name: install dependencies - shell: bash - run: | - mkdir ${build_dir} - cd ${build_dir} - conan install \ - --output-folder . \ - --build missing \ - --options:host "&:tests=True" \ - --options:host "&:xrpld=True" \ - --settings:all build_type=${{ inputs.configuration }} \ - .. diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 0000000000..d460716da5 --- /dev/null +++ b/.github/workflows/checks.yml @@ -0,0 +1,89 @@ +name: Checks + +on: push + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +defaults: + run: + shell: bash + +jobs: + # Check if the code is formatted according to the .clang-format rules. + clang-format: + if: github.event.pull_request.draft == false || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') + 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 + # same directory for jobs running in containers. The actions/checkout step + # is *supposed* to checkout into $GITHUB_WORKSPACE and then add it to + # safe.directory (see instructions at https://github.com/actions/checkout) + # but that is apparently not happening for some container images. We + # therefore preemptively add both directories to safe.directory. See also + # https://github.com/actions/runner/issues/2058 for more details. + - name: Configure git safe.directory + run: | + git config --global --add safe.directory $GITHUB_WORKSPACE + git config --global --add safe.directory ${{ github.workspace }} + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - name: Check version + run: clang-format --version + - name: Format code + run: find include src tests -type f \( -name '*.cpp' -o -name '*.hpp' -o -name '*.h' -o -name '*.ipp' \) -exec clang-format -i {} + + - name: Check for differences + env: + MESSAGE: | + One or more files did not conform to the formatting specified in + .clang-format. Maybe you did not run 'git-clang-format' or + 'clang-format' before committing, or your version of clang-format + has an incompatibility with the one used here (see the "Check + version" step above). + + Run 'git-clang-format --extensions cpp,h,hpp,ipp develop' in your + repo, and then commit and push the changes. + run: | + DIFF=$(git status --porcelain) + if [ -n "${DIFF}" ]; then + # Print the files that changed to give the contributor a hint about + # what to expect when running git-clang-format on their own machine. + git status + echo "${MESSAGE}" + exit 1 + fi + + # Check if the dependencies between the modules are correctly indexed + levelization: + if: github.event.pull_request.draft == false || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - name: Check levelization + run: Builds/levelization/levelization.sh + - name: Check for differences + env: + MESSAGE: | + + The dependency relationships between the modules in rippled have + changed, which may be an improvement or a regression. + + A rule of thumb is that if your changes caused something to be + removed from loops.txt, it's probably an improvement, while if + something was added, it's probably a regression. + + Run './Builds/levelization/levelization.sh' in your repo, and then + commit and push the changes. See Builds/levelization/README.md for + more info. + run: | + DIFF=$(git status --porcelain) + if [ -n "${DIFF}" ]; then + # Print the differences to give the contributor a hint about what to + # expect when running levelization on their own machine. + git diff + echo "${MESSAGE}" + exit 1 + fi diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml deleted file mode 100644 index 0d81f87791..0000000000 --- a/.github/workflows/clang-format.yml +++ /dev/null @@ -1,64 +0,0 @@ -name: clang-format - -on: - push: - pull_request: - types: [opened, reopened, synchronize, ready_for_review] - -jobs: - check: - if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }} - runs-on: ubuntu-24.04 - container: ghcr.io/xrplf/ci/tools-rippled-clang-format - steps: - # For jobs running in containers, $GITHUB_WORKSPACE and ${{ github.workspace }} might not be the - # same directory. The actions/checkout step is *supposed* to checkout into $GITHUB_WORKSPACE and - # then add it to safe.directory (see instructions at https://github.com/actions/checkout) - # but that's apparently not happening for some container images. We can't be sure what is actually - # happening, so let's pre-emptively add both directories to safe.directory. There's a - # Github issue opened in 2022 and not resolved in 2025 https://github.com/actions/runner/issues/2058 ¯\_(ツ)_/¯ - - run: | - git config --global --add safe.directory $GITHUB_WORKSPACE - git config --global --add safe.directory ${{ github.workspace }} - - uses: actions/checkout@v4 - - name: Format first-party sources - run: | - clang-format --version - find include src tests -type f \( -name '*.cpp' -o -name '*.hpp' -o -name '*.h' -o -name '*.ipp' \) -exec clang-format -i {} + - - name: Check for differences - id: assert - shell: bash - run: | - set -o pipefail - git diff --exit-code | tee "clang-format.patch" - - name: Upload patch - if: failure() && steps.assert.outcome == 'failure' - uses: actions/upload-artifact@v4 - continue-on-error: true - with: - name: clang-format.patch - if-no-files-found: ignore - path: clang-format.patch - - name: What happened? - if: failure() && steps.assert.outcome == 'failure' - env: - PREAMBLE: | - If you are reading this, you are looking at a failed Github Actions - job. That means you pushed one or more files that did not conform - to the formatting specified in .clang-format. That may be because - you neglected to run 'git clang-format' or 'clang-format' before - committing, or that your version of clang-format has an - incompatibility with the one on this - machine, which is: - SUGGESTION: | - - To fix it, you can do one of two things: - 1. Download and apply the patch generated as an artifact of this - job to your repo, commit, and push. - 2. Run 'git-clang-format --extensions cpp,h,hpp,ipp develop' - in your repo, commit, and push. - run: | - echo "${PREAMBLE}" - clang-format --version - echo "${SUGGESTION}" - exit 1 diff --git a/.github/workflows/debian.yml b/.github/workflows/debian.yml new file mode 100644 index 0000000000..fc97d9abeb --- /dev/null +++ b/.github/workflows/debian.yml @@ -0,0 +1,215 @@ +name: Debian + +# TODO: Use `workflow_run` to trigger this workflow after checks have completed. +# This can only be done if the `checks` workflow already exists on the default +# branch (i.e. `develop`), so we cannot do this yet. +# See https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#workflow_run. +on: + push: +# TODO: Re-enable after testing. +# branches: +# - develop + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +defaults: + run: + shell: bash + +env: + BUILD_DIR: .build + CONAN_GLOBAL_CONF: | + core.download:parallel={{ os.cpu_count() }} + core.upload:parallel={{ os.cpu_count() }} + tools.build:jobs={{ (os.cpu_count() * 4/5) | int }} + tools.build:verbosity=verbose + tools.compilation:verbosity=verbose + CONAN_REMOTE_URL: https://conan.ripplex.io + CONAN_REMOTE_NAME: xrplf + # GitHub does not allow us to specify a reusable matrix strategy, so to avoid + # duplication, we define it here using environment variables and create the + # matrix in the first job. The matrix defined below should be kept in sync + # with https://github.com/XRPLF/ci/blob/main/.github/workflows/debian.yml. + STRATEGY_MATRIX_ARCHITECTURE: | + [ + { + "platform": "linux/amd64", + "runner": "ubuntu-24.04" + }, + { + "platform": "linux/arm64", + "runner": "ubuntu-24.04-arm" + } + ] + STRATEGY_MATRIX_OS: | + [ + { + "release": "bookworm", + "compiler_name": "gcc", + "compiler_version": "12" + }, + { + "release": "bookworm", + "compiler_name": "gcc", + "compiler_version": "13" + }, + { + "release": "bookworm", + "compiler_name": "gcc", + "compiler_version": "14" + }, + { + "release": "bookworm", + "compiler_name": "clang", + "compiler_version": "16" + }, + { + "release": "bookworm", + "compiler_name": "clang", + "compiler_version": "17" + }, + { + "release": "bookworm", + "compiler_name": "clang", + "compiler_version": "18" + }, + { + "release": "bookworm", + "compiler_name": "clang", + "compiler_version": "19" + } + ] + STRATEGY_MATRIX_BUILDTYPE: | + [ + "Debug", + "Release" + ] + STRATEGY_MATRIX_UNITY: | + [ + "-DUnity=OFF", + "-DUnity=ON" + ] + +jobs: + # Generate the strategy matrix, see https://stackoverflow.com/a/78046142. + generate-matrix: + runs-on: ubuntu-latest + steps: + - name: Generate matrix + id: generate-matrix + run: | + # Use heredoc with random delimiter for multiline JSON. + DELIMITER="$(tr -dc A-Za-z0-9 > "$GITHUB_OUTPUT" + echo "os << ${DELIMITER} + ${STRATEGY_MATRIX_OS} + ${DELIMITER}" >> "$GITHUB_OUTPUT" + echo "build_type << ${DELIMITER} + ${STRATEGY_MATRIX_BUILDTYPE} + ${DELIMITER}" >> "$GITHUB_OUTPUT" + echo "unity << ${DELIMITER} + ${STRATEGY_MATRIX_UNITY} + ${DELIMITER}" >> "$GITHUB_OUTPUT" + outputs: + architecture: ${{ steps.generate-matrix.outputs.architecture }} + os: ${{ steps.generate-matrix.outputs.os }} + build_type: ${{ steps.generate-matrix.outputs.build_type }} + unity: ${{ steps.generate-matrix.outputs.unity }} + + # Install (and cache) the Conan dependencies. + install-dependencies: + 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) }} + runs-on: ${{ matrix.architecture.runner }} + image: ghcr.io/xrplf/ci/debian-${{ matrix.os.release }}:${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }} + 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 release." + lsb_release -a + + echo "Checking CMake version." + cmake --version + + echo "Checking compiler version." + ${{ matrix.os.compiler_name }} --version + - name: Configure Conan + uses: ./.github/actions/conan-configure + with: + conan_global_conf: ${{ env.CONAN_GLOBAL_CONF }} + conan_remote_name: ${{ env.CONAN_REMOTE_NAME }} + conan_remote_url: ${{ env.CONAN_REMOTE_URL }} + conan_remote_username: ${{ secrets.CONAN_USERNAME }} + conan_remote_password: ${{ secrets.CONAN_PASSWORD }} + - name: Install Conan dependencies + uses: ./.github/actions/conan-dependencies + with: + build_dir: ${{ env.BUILD_DIR }} + build_type: ${{ matrix.build_type }} + conan_remote_name: ${{ env.CONAN_REMOTE_NAME }} + + # Build and test the binary. + build-test: + needs: + - generate-matrix + - install-dependencies + 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) }} + unity: ${{ fromJson(needs.generate-matrix.outputs.unity) }} + runs-on: ${{ matrix.architecture.runner }} + image: ghcr.io/xrplf/ci/debian-${{ matrix.os.release }}:${{ matrix.os.compiler_name }}-${{ matrix.os.compiler_version }} + steps: + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - name: Configure Conan + uses: ./.github/actions/conan-configure + with: + conan_global_conf: ${{ env.CONAN_GLOBAL_CONF }} + conan_remote_name: ${{ env.CONAN_REMOTE_NAME }} + conan_remote_url: ${{ env.CONAN_REMOTE_URL }} + conan_remote_username: ${{ secrets.CONAN_USERNAME }} + conan_remote_password: ${{ secrets.CONAN_PASSWORD }} + - name: Build code + uses: ./.github/actions/build + with: + build_type: ${{ matrix.build_type }} + cmake_args: "-Dassert=TRUE -Dwerr=TRUE ${{ matrix.unity }}" + cmake_generator: Ninja + - name: Check linking + working-directory: ${{ env.BUILD_DIR }} + run: | + ldd ./rippled + if [ "$(ldd ./rippled | grep -E '(libstdc\+\+|libgcc)' | wc -l)" -eq 0 ]; then + echo 'The binary is statically linked.' + else + echo 'The binary is dynamically linked.' + exit 1 + fi + - name: Test code + working-directory: ${{ env.BUILD_DIR }} + run: | + ./rippled --unittest --unittest-jobs $(nproc) + ctest -j $(nproc) --output-on-failure diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 0000000000..88fbafbdef --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,53 @@ +name: Documentation + +# TODO: Use `workflow_run` to trigger this workflow after checks have completed. +# This can only be done if the `checks` workflow already exists on the default +# branch (i.e. `develop`), so we cannot do this yet. +# See https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#workflow_run. +on: + push: + branches: + - develop + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +defaults: + run: + shell: bash + +jobs: + doxygen: + runs-on: ubuntu-latest + permissions: + contents: write + container: ghcr.io/xrplf/rippled-build-ubuntu:aaf5e3e + 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 Doxygen version." + doxygen --version + - name: Build documentation + run: | + mkdir build + cd build + cmake -Donly_docs=TRUE .. + cmake --build . --target docs --parallel $(nproc) + - name: Publish documentation + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: build/docs/html diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml deleted file mode 100644 index 01e04a3f5a..0000000000 --- a/.github/workflows/doxygen.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Build and publish Doxygen documentation -# To test this workflow, push your changes to your fork's `develop` branch. -on: - push: - branches: - - develop - - doxygen -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - documentation: - runs-on: ubuntu-latest - permissions: - contents: write - container: ghcr.io/xrplf/rippled-build-ubuntu:aaf5e3e - steps: - - name: checkout - uses: actions/checkout@v4 - - name: check environment - run: | - echo ${PATH} | tr ':' '\n' - cmake --version - doxygen --version - env | sort - - name: build - run: | - mkdir build - cd build - cmake -Donly_docs=TRUE .. - cmake --build . --target docs --parallel $(nproc) - - name: publish - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: build/docs/html diff --git a/.github/workflows/levelization.yml b/.github/workflows/levelization.yml deleted file mode 100644 index 979049d630..0000000000 --- a/.github/workflows/levelization.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: levelization - -on: - push: - pull_request: - types: [opened, reopened, synchronize, ready_for_review] - -jobs: - check: - if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }} - runs-on: ubuntu-latest - env: - CLANG_VERSION: 10 - steps: - - uses: actions/checkout@v4 - - name: Check levelization - run: Builds/levelization/levelization.sh - - name: Check for differences - id: assert - run: | - set -o pipefail - git diff --exit-code | tee "levelization.patch" - - name: Upload patch - if: failure() && steps.assert.outcome == 'failure' - uses: actions/upload-artifact@v4 - continue-on-error: true - with: - name: levelization.patch - if-no-files-found: ignore - path: levelization.patch - - name: What happened? - if: failure() && steps.assert.outcome == 'failure' - env: - MESSAGE: | - If you are reading this, you are looking at a failed Github - Actions job. That means you changed the dependency relationships - between the modules in rippled. That may be an improvement or a - regression. This check doesn't judge. - - A rule of thumb, though, is that if your changes caused - something to be removed from loops.txt, that's probably an - improvement. If something was added, it's probably a regression. - - To fix it, you can do one of two things: - 1. Download and apply the patch generated as an artifact of this - job to your repo, commit, and push. - 2. Run './Builds/levelization/levelization.sh' in your repo, - commit, and push. - - See Builds/levelization/README.md for more info. - run: | - echo "${MESSAGE}" - exit 1 diff --git a/.github/workflows/libxrpl.yml b/.github/workflows/libxrpl.yml index 79cd872210..58ac9de913 100644 --- a/.github/workflows/libxrpl.yml +++ b/.github/workflows/libxrpl.yml @@ -1,6 +1,6 @@ name: Check libXRPL compatibility with Clio env: - CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/dev + CONAN_URL: https://conan.ripplex.io CONAN_LOGIN_USERNAME_RIPPLE: ${{ secrets.CONAN_USERNAME }} CONAN_PASSWORD_RIPPLE: ${{ secrets.CONAN_TOKEN }} on: @@ -33,18 +33,15 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} wait-interval: 10 - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - name: Generate channel id: channel - shell: bash run: | echo channel="clio/pr_${{ github.event.pull_request.number }}" | tee ${GITHUB_OUTPUT} - name: Export new package - shell: bash run: | conan export . ${{ steps.channel.outputs.channel }} - name: Add Ripple Conan remote - shell: bash run: | conan remote list conan remote remove ripple || true @@ -52,13 +49,11 @@ jobs: conan remote add ripple ${{ env.CONAN_URL }} --insert 0 - name: Parse new version id: version - shell: bash run: | echo version="$(cat src/libxrpl/protocol/BuildInfo.cpp | grep "versionString =" \ | awk -F '"' '{print $2}')" | tee ${GITHUB_OUTPUT} - name: Try to authenticate to Ripple Conan remote id: remote - shell: bash run: | # `conan user` implicitly uses the environment variables CONAN_LOGIN_USERNAME_ and CONAN_PASSWORD_. # https://docs.conan.io/1/reference/commands/misc/user.html#using-environment-variables @@ -69,7 +64,6 @@ jobs: - name: Upload new package id: upload if: (steps.remote.outputs.outcome == 'success') - shell: bash run: | echo "conan upload version ${{ steps.version.outputs.version }} on channel ${{ steps.channel.outputs.channel }}" echo outcome=$(conan upload xrpl/${{ steps.version.outputs.version }}@${{ steps.channel.outputs.channel }} --remote ripple --confirm >&2 \ @@ -83,7 +77,6 @@ jobs: steps: - name: Notify Clio about new version if: (needs.publish.outputs.outcome == 'success') - shell: bash run: | gh api --method POST -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" \ /repos/xrplf/clio/dispatches -f "event_type=check_libxrpl" \ diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml deleted file mode 100644 index adea15af9e..0000000000 --- a/.github/workflows/macos.yml +++ /dev/null @@ -1,125 +0,0 @@ -name: macos -on: - pull_request: - types: [opened, reopened, synchronize, ready_for_review] - push: - # If the branches list is ever changed, be sure to change it on all - # build/test jobs (nix, macos, windows, instrumentation) - branches: - # Always build the package branches - - develop - - release - - master - # Branches that opt-in to running - - 'ci/**' -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true -# This part of Conan configuration is specific to this workflow only; we do not want -# to pollute conan/profiles directory with settings which might not work for others -env: - CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/dev - CONAN_LOGIN_USERNAME_RIPPLE: ${{ secrets.CONAN_USERNAME }} - CONAN_PASSWORD_RIPPLE: ${{ secrets.CONAN_TOKEN }} - CONAN_GLOBAL_CONF: | - core.download:parallel={{os.cpu_count()}} - core.upload:parallel={{os.cpu_count()}} - tools.build:jobs={{ (os.cpu_count() * 4/5) | int }} - tools.build:verbosity=verbose - tools.compilation:verbosity=verbose - -jobs: - - test: - if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }} - strategy: - matrix: - platform: - - macos - generator: - - Ninja - configuration: - - Release - runs-on: [self-hosted, macOS, mac-runner-m1] - env: - # The `build` action requires these variables. - build_dir: .build - NUM_PROCESSORS: 12 - steps: - - name: checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - name: install Conan - run: | - brew install conan - - name: install Ninja - if: matrix.generator == 'Ninja' - run: brew install ninja - - name: install python - run: | - if which python > /dev/null 2>&1; then - echo "Python executable exists" - else - brew install python@3.13 - ln -s /opt/homebrew/bin/python3 /opt/homebrew/bin/python - fi - - name: install cmake - run: | - if which cmake > /dev/null 2>&1; then - echo "cmake executable exists" - else - brew install cmake - fi - - name: install nproc - run: | - brew install coreutils - - name: check environment - run: | - env | sort - echo ${PATH} | tr ':' '\n' - python --version - conan --version - cmake --version - nproc --version - echo -n "nproc returns: " - nproc - system_profiler SPHardwareDataType - sysctl -n hw.logicalcpu - clang --version - - name: configure Conan - run : | - echo "${CONAN_GLOBAL_CONF}" >> $(conan config home)/global.conf - conan config install conan/profiles/ -tf $(conan config home)/profiles/ - conan profile show - - name: export custom recipes - shell: bash - run: | - conan export --version 1.1.10 external/snappy - conan export --version 4.0.3 external/soci - - name: add Ripple Conan remote - if: env.CONAN_URL != '' - shell: bash - run: | - if conan remote list | grep -q "ripple"; then - conan remote remove ripple - echo "Removed conan remote ripple" - fi - conan remote add --index 0 ripple "${CONAN_URL}" - echo "Added conan remote ripple at ${CONAN_URL}" - - name: build dependencies - uses: ./.github/actions/dependencies - with: - configuration: ${{ matrix.configuration }} - - name: build - uses: ./.github/actions/build - with: - generator: ${{ matrix.generator }} - configuration: ${{ matrix.configuration }} - cmake-args: "-Dassert=TRUE -Dwerr=TRUE ${{ matrix.cmake-args }}" - - name: test - run: | - n=$(nproc) - echo "Using $n test jobs" - - cd ${build_dir} - ./rippled --unittest --unittest-jobs $n - ctest -j $n --output-on-failure diff --git a/.github/workflows/missing-commits.yml b/.github/workflows/missing-commits.yml index 8715671f33..877233fa19 100644 --- a/.github/workflows/missing-commits.yml +++ b/.github/workflows/missing-commits.yml @@ -1,60 +1,66 @@ -name: missing-commits +name: Check for missing commits +# TODO: Use `workflow_run` to trigger this workflow after checks have completed. +# This can only be done if the `checks` workflow already exists on the default +# branch (i.e. `develop`), so we cannot do this yet. +# See https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#workflow_run. on: push: branches: - # Only check that the branches are up to date when updating the - # relevant branches. - develop - release +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +defaults: + run: + shell: bash + jobs: - up_to_date: - runs-on: ubuntu-24.04 + check: + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with: fetch-depth: 0 - name: Check for missing commits - id: commits env: - SUGGESTION: | + MESSAGE: | - If you are reading this, then the commits indicated above are - missing from "develop" and/or "release". Do a reverse-merge - as soon as possible. See CONTRIBUTING.md for instructions. + If you are reading this, then the commits indicated above are missing + from the "develop" and/or "release" branch. Do a reverse-merge as soon + as possible. See CONTRIBUTING.md for instructions. run: | set -o pipefail - # Branches ordered by how "canonical" they are. Every commit in - # one branch should be in all the branches behind it - order=( master release develop ) + # Branches are ordered by how "canonical" they are. Every commit in one + # branch should be in all the branches behind it. + order=(master release develop) branches=() - for branch in "${order[@]}" - do - # Check that the branches exist so that this job will work on - # forked repos, which don't necessarily have master and - # release branches. + for branch in "${order[@]}"; do + # Check that the branches exist so that this job will work on forked + # repos, which don't necessarily have master and release branches. + echo "Checking if ${branch} exists." if git ls-remote --exit-code --heads origin \ - refs/heads/${branch} > /dev/null - then - branches+=( origin/${branch} ) + refs/heads/${branch} > /dev/null; then + branches+=(origin/${branch}) fi done prior=() - for branch in "${branches[@]}" - do - if [[ ${#prior[@]} -ne 0 ]] - then - echo "Checking ${prior[@]} for commits missing from ${branch}" + for branch in "${branches[@]}"; do + if [[ ${#prior[@]} -ne 0 ]]; then + echo "Checking ${prior[@]} for commits missing from ${branch}." git log --oneline --no-merges "${prior[@]}" \ ^$branch | tee -a "missing-commits.txt" echo fi - prior+=( "${branch}" ) + prior+=("${branch}") done - if [[ $( cat missing-commits.txt | wc -l ) -ne 0 ]] - then - echo "${SUGGESTION}" + + if [[ $(cat missing-commits.txt | wc -l) -ne 0 ]]; then + echo "${MESSAGE}" exit 1 fi diff --git a/.github/workflows/nix.yml b/.github/workflows/nix.yml deleted file mode 100644 index d6490e4caa..0000000000 --- a/.github/workflows/nix.yml +++ /dev/null @@ -1,421 +0,0 @@ -name: nix -on: - pull_request: - types: [opened, reopened, synchronize, ready_for_review] - push: - # If the branches list is ever changed, be sure to change it on all - # build/test jobs (nix, macos, windows) - branches: - # Always build the package branches - - develop - - release - - master - # Branches that opt-in to running - - "ci/**" -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -# This part of Conan configuration is specific to this workflow only; we do not want -# to pollute conan/profiles directory with settings which might not work for others -env: - CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/dev - CONAN_LOGIN_USERNAME_RIPPLE: ${{ secrets.CONAN_USERNAME }} - CONAN_PASSWORD_RIPPLE: ${{ secrets.CONAN_TOKEN }} - CONAN_GLOBAL_CONF: | - core.download:parallel={{ os.cpu_count() }} - core.upload:parallel={{ os.cpu_count() }} - tools.build:jobs={{ (os.cpu_count() * 4/5) | int }} - tools.build:verbosity=verbose - tools.compilation:verbosity=verbose - -# This workflow has multiple job matrixes. -# They can be considered phases because most of the matrices ("test", -# "coverage", "conan", ) depend on the first ("dependencies"). -# -# The first phase has a job in the matrix for each combination of -# variables that affects dependency ABI: -# platform, compiler, and configuration. -# It creates a GitHub artifact holding the Conan profile, -# and builds and caches binaries for all the dependencies. -# If an Artifactory remote is configured, they are cached there. -# If not, they are added to the GitHub artifact. -# GitHub's "cache" action has a size limit (10 GB) that is too small -# to hold the binaries if they are built locally. -# We must use the "{upload,download}-artifact" actions instead. -# -# The remaining phases have a job in the matrix for each test -# configuration. They install dependency binaries from the cache, -# whichever was used, and build and test rippled. -# -# "instrumentation" is independent, but is included here because it also -# builds on linux in the same "on:" conditions. - -jobs: - dependencies: - if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }} - strategy: - fail-fast: false - matrix: - platform: - - linux - compiler: - - gcc - - clang - configuration: - - Debug - - Release - include: - - compiler: gcc - compiler_version: 12 - distro: ubuntu - codename: jammy - - compiler: clang - compiler_version: 16 - distro: debian - codename: bookworm - runs-on: [self-hosted, heavy] - container: ghcr.io/xrplf/ci/${{ matrix.distro }}-${{ matrix.codename }}:${{ matrix.compiler }}-${{ matrix.compiler_version }} - env: - build_dir: .build - steps: - - name: checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - name: check environment - run: | - echo ${PATH} | tr ':' '\n' - lsb_release -a || true - ${{ matrix.compiler }}-${{ matrix.compiler_version }} --version - conan --version - cmake --version - env | sort - - name: configure Conan - run: | - echo "${CONAN_GLOBAL_CONF}" >> $(conan config home)/global.conf - conan config install conan/profiles/ -tf $(conan config home)/profiles/ - conan profile show - - name: archive profile - # Create this archive before dependencies are added to the local cache. - run: tar -czf conan.tar.gz -C ${CONAN_HOME} . - - name: build dependencies - uses: ./.github/actions/dependencies - with: - configuration: ${{ matrix.configuration }} - - name: upload archive - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 - with: - name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }} - path: conan.tar.gz - if-no-files-found: error - - test: - strategy: - fail-fast: false - matrix: - platform: - - linux - compiler: - - gcc - - clang - configuration: - - Debug - - Release - include: - - compiler: gcc - compiler_version: 12 - distro: ubuntu - codename: jammy - - compiler: clang - compiler_version: 16 - distro: debian - codename: bookworm - cmake-args: - - - - "-Dunity=ON" - needs: dependencies - runs-on: [self-hosted, heavy] - container: ghcr.io/xrplf/ci/${{ matrix.distro }}-${{ matrix.codename }}:${{ matrix.compiler }}-${{ matrix.compiler_version }} - env: - build_dir: .build - steps: - - name: download cache - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 - with: - name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }} - - name: extract cache - run: | - mkdir -p ${CONAN_HOME} - tar -xzf conan.tar.gz -C ${CONAN_HOME} - - name: check environment - run: | - env | sort - echo ${PATH} | tr ':' '\n' - conan --version - cmake --version - - name: checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - name: dependencies - uses: ./.github/actions/dependencies - with: - configuration: ${{ matrix.configuration }} - - name: build - uses: ./.github/actions/build - with: - generator: Ninja - configuration: ${{ matrix.configuration }} - cmake-args: "-Dassert=TRUE -Dwerr=TRUE ${{ matrix.cmake-args }}" - - name: check linking - run: | - cd ${build_dir} - ldd ./rippled - if [ "$(ldd ./rippled | grep -E '(libstdc\+\+|libgcc)' | wc -l)" -eq 0 ]; then - echo 'The binary is statically linked.' - else - echo 'The binary is dynamically linked.' - exit 1 - fi - - name: test - run: | - cd ${build_dir} - ./rippled --unittest --unittest-jobs $(nproc) - ctest -j $(nproc) --output-on-failure - - reference-fee-test: - strategy: - fail-fast: false - matrix: - platform: - - linux - compiler: - - gcc - configuration: - - Debug - cmake-args: - - "-DUNIT_TEST_REFERENCE_FEE=200" - - "-DUNIT_TEST_REFERENCE_FEE=1000" - needs: dependencies - runs-on: [self-hosted, heavy] - container: ghcr.io/xrplf/ci/ubuntu-jammy:gcc-12 - env: - build_dir: .build - steps: - - name: download cache - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 - with: - name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }} - - name: extract cache - run: | - mkdir -p ${CONAN_HOME} - tar -xzf conan.tar.gz -C ${CONAN_HOME} - - name: check environment - run: | - env | sort - echo ${PATH} | tr ':' '\n' - conan --version - cmake --version - - name: checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - name: dependencies - uses: ./.github/actions/dependencies - with: - configuration: ${{ matrix.configuration }} - - name: build - uses: ./.github/actions/build - with: - generator: Ninja - configuration: ${{ matrix.configuration }} - cmake-args: "-Dassert=TRUE -Dwerr=TRUE ${{ matrix.cmake-args }}" - - name: test - run: | - cd ${build_dir} - ./rippled --unittest --unittest-jobs $(nproc) - ctest -j $(nproc) --output-on-failure - - coverage: - strategy: - fail-fast: false - matrix: - platform: - - linux - compiler: - - gcc - configuration: - - Debug - needs: dependencies - runs-on: [self-hosted, heavy] - container: ghcr.io/xrplf/ci/ubuntu-jammy:gcc-12 - env: - build_dir: .build - steps: - - name: download cache - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 - with: - name: ${{ matrix.platform }}-${{ matrix.compiler }}-${{ matrix.configuration }} - - name: extract cache - run: | - mkdir -p ${CONAN_HOME} - tar -xzf conan.tar.gz -C ${CONAN_HOME} - - name: check environment - run: | - echo ${PATH} | tr ':' '\n' - conan --version - cmake --version - gcovr --version - env | sort - ls ${CONAN_HOME} - - name: checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - name: dependencies - uses: ./.github/actions/dependencies - with: - configuration: ${{ matrix.configuration }} - - name: build - uses: ./.github/actions/build - with: - generator: Ninja - configuration: ${{ matrix.configuration }} - cmake-args: >- - -Dassert=TRUE - -Dwerr=TRUE - -Dcoverage=ON - -Dcoverage_format=xml - -DCODE_COVERAGE_VERBOSE=ON - -DCMAKE_CXX_FLAGS="-O0" - -DCMAKE_C_FLAGS="-O0" - cmake-target: coverage - - name: move coverage report - shell: bash - run: | - mv "${build_dir}/coverage.xml" ./ - - name: archive coverage report - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 - with: - name: coverage.xml - path: coverage.xml - retention-days: 30 - - name: upload coverage report - uses: wandalen/wretry.action@v1.4.10 - with: - action: codecov/codecov-action@v4.5.0 - with: | - files: coverage.xml - fail_ci_if_error: true - disable_search: true - verbose: true - plugin: noop - token: ${{ secrets.CODECOV_TOKEN }} - attempt_limit: 5 - attempt_delay: 210000 # in milliseconds - - conan: - needs: dependencies - runs-on: [self-hosted, heavy] - container: - image: ghcr.io/xrplf/ci/ubuntu-jammy:gcc-12 - env: - build_dir: .build - platform: linux - compiler: gcc - compiler_version: 12 - configuration: Release - steps: - - name: download cache - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 - with: - name: ${{ env.platform }}-${{ env.compiler }}-${{ env.configuration }} - - name: extract cache - run: | - mkdir -p ${CONAN_HOME} - tar -xzf conan.tar.gz -C ${CONAN_HOME} - - name: check environment - run: | - env | sort - echo ${PATH} | tr ':' '\n' - conan --version - cmake --version - - name: checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - name: dependencies - uses: ./.github/actions/dependencies - with: - configuration: ${{ env.configuration }} - - name: export - run: | - conan export . --version head - - name: build - run: | - cd tests/conan - mkdir ${build_dir} && cd ${build_dir} - conan install .. \ - --settings:all build_type=${configuration} \ - --output-folder . \ - --build missing - cmake .. \ - -DCMAKE_TOOLCHAIN_FILE:FILEPATH=./build/${configuration}/generators/conan_toolchain.cmake \ - -DCMAKE_BUILD_TYPE=${configuration} - cmake --build . - ./example | grep '^[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+' - - instrumentation-build: - needs: dependencies - runs-on: [self-hosted, heavy] - container: ghcr.io/xrplf/ci/debian-bookworm:clang-16 - env: - build_dir: .build - steps: - - name: download cache - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 - with: - name: linux-clang-Debug - - - name: extract cache - run: | - mkdir -p ${CONAN_HOME} - tar -xzf conan.tar.gz -C ${CONAN_HOME} - - - name: check environment - run: | - echo ${PATH} | tr ':' '\n' - conan --version - cmake --version - env | sort - ls ${CONAN_HOME} - - - name: checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - - name: dependencies - uses: ./.github/actions/dependencies - with: - configuration: Debug - - - name: prepare environment - run: | - mkdir -p ${build_dir} - echo "SOURCE_DIR=$(pwd)" >> $GITHUB_ENV - echo "BUILD_DIR=$(pwd)/${build_dir}" >> $GITHUB_ENV - - - name: build with instrumentation - run: | - cd ${BUILD_DIR} - cmake -S ${SOURCE_DIR} -B ${BUILD_DIR} \ - -Dvoidstar=ON \ - -Dtests=ON \ - -Dxrpld=ON \ - -DCMAKE_BUILD_TYPE=Debug \ - -DSECP256K1_BUILD_BENCHMARK=OFF \ - -DSECP256K1_BUILD_TESTS=OFF \ - -DSECP256K1_BUILD_EXHAUSTIVE_TESTS=OFF \ - -DCMAKE_TOOLCHAIN_FILE=${BUILD_DIR}/build/generators/conan_toolchain.cmake - cmake --build . --parallel $(nproc) - - - name: verify instrumentation enabled - run: | - cd ${BUILD_DIR} - ./rippled --version | grep libvoidstar - - - name: run unit tests - run: | - cd ${BUILD_DIR} - ./rippled -u --unittest-jobs $(( $(nproc)/4 )) - ctest -j $(nproc) --output-on-failure diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml deleted file mode 100644 index 84a91bcb4e..0000000000 --- a/.github/workflows/windows.yml +++ /dev/null @@ -1,121 +0,0 @@ -name: windows - -on: - pull_request: - types: [opened, reopened, synchronize, ready_for_review] - push: - # If the branches list is ever changed, be sure to change it on all - # build/test jobs (nix, macos, windows, instrumentation) - branches: - # Always build the package branches - - develop - - release - - master - # Branches that opt-in to running - - 'ci/**' - -# https://docs.github.com/en/actions/using-jobs/using-concurrency -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true -# This part of Conan configuration is specific to this workflow only; we do not want -# to pollute conan/profiles directory with settings which might not work for others -env: - CONAN_URL: http://18.143.149.228:8081/artifactory/api/conan/dev - CONAN_LOGIN_USERNAME_RIPPLE: ${{ secrets.CONAN_USERNAME }} - CONAN_PASSWORD_RIPPLE: ${{ secrets.CONAN_TOKEN }} - CONAN_GLOBAL_CONF: | - core.download:parallel={{os.cpu_count()}} - core.upload:parallel={{os.cpu_count()}} - tools.build:jobs=24 - tools.build:verbosity=verbose - tools.compilation:verbosity=verbose - -jobs: - - test: - if: ${{ github.event_name == 'push' || github.event.pull_request.draft != true || contains(github.event.pull_request.labels.*.name, 'DraftRunCI') }} - strategy: - fail-fast: false - matrix: - version: - - generator: Visual Studio 17 2022 - runs-on: windows-2022 - configuration: - - type: Release - tests: true - - type: Debug - # Skip running unit tests on debug builds, because they - # take an unreasonable amount of time - tests: false - runtime: d - runs-on: ${{ matrix.version.runs-on }} - env: - build_dir: .build - steps: - - name: checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - name: choose Python - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 - with: - python-version: 3.13 - - name: learn Python cache directory - id: pip-cache - shell: bash - run: | - python -m pip install --upgrade pip - echo "dir=$(pip cache dir)" | tee ${GITHUB_OUTPUT} - - name: restore Python cache directory - uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-${{ hashFiles('.github/workflows/windows.yml') }} - - name: install Conan - run: pip install wheel conan - - name: check environment - run: | - dir env: - $env:PATH -split ';' - python --version - conan --version - cmake --version - - name: configure Conan - shell: bash - run: | - echo "${CONAN_GLOBAL_CONF}" >> $(conan config home)/global.conf - conan config install conan/profiles/ -tf $(conan config home)/profiles/ - conan profile show - - name: export custom recipes - shell: bash - run: | - conan export --version 1.1.10 external/snappy - conan export --version 4.0.3 external/soci - - name: add Ripple Conan remote - if: env.CONAN_URL != '' - shell: bash - run: | - if conan remote list | grep -q "ripple"; then - conan remote remove ripple - echo "Removed conan remote ripple" - fi - conan remote add --index 0 ripple "${CONAN_URL}" - echo "Added conan remote ripple at ${CONAN_URL}" - - name: build dependencies - uses: ./.github/actions/dependencies - with: - configuration: ${{ matrix.configuration.type }} - - name: build - uses: ./.github/actions/build - with: - generator: '${{ matrix.version.generator }}' - configuration: ${{ matrix.configuration.type }} - # Hard code for now. Move to the matrix if varied options are needed - cmake-args: '-Dassert=TRUE -Dwerr=TRUE -Dreporting=OFF -Dunity=ON' - cmake-target: install - - name: test - shell: bash - if: ${{ matrix.configuration.tests }} - run: | - cd ${build_dir}/${{ matrix.configuration.type }} - ./rippled --unittest --unittest-jobs $(nproc) - ctest -j $(nproc) --output-on-failure diff --git a/Builds/levelization/README.md b/Builds/levelization/README.md index 4ff3a54236..b079c45e01 100644 --- a/Builds/levelization/README.md +++ b/Builds/levelization/README.md @@ -72,15 +72,15 @@ It generates many files of [results](results): desired as described above. In a perfect repo, this file will be empty. This file is committed to the repo, and is used by the [levelization - Github workflow](../../.github/workflows/levelization.yml) to validate + Github workflow](../../.github/workflows/checks.yml) to validate that nothing changed. * [`ordering.txt`](results/ordering.txt): A list showing relationships between modules where there are no loops as they actually exist, as opposed to how they are desired as described above. This file is committed to the repo, and is used by the [levelization - Github workflow](../../.github/workflows/levelization.yml) to validate + Github workflow](../../.github/workflows/checks.yml) to validate that nothing changed. -* [`levelization.yml`](../../.github/workflows/levelization.yml) +* [`levelization.yml`](../../.github/workflows/checks.yml) Github Actions workflow to test that levelization loops haven't changed. Unfortunately, if changes are detected, it can't tell if they are improvements or not, so if you have resolved any issues or diff --git a/external/snappy/conandata.yml b/external/snappy/conandata.yml deleted file mode 100644 index 1488c7a2ba..0000000000 --- a/external/snappy/conandata.yml +++ /dev/null @@ -1,40 +0,0 @@ -sources: - "1.1.10": - url: "https://github.com/google/snappy/archive/1.1.10.tar.gz" - sha256: "49d831bffcc5f3d01482340fe5af59852ca2fe76c3e05df0e67203ebbe0f1d90" - "1.1.9": - url: "https://github.com/google/snappy/archive/1.1.9.tar.gz" - sha256: "75c1fbb3d618dd3a0483bff0e26d0a92b495bbe5059c8b4f1c962b478b6e06e7" - "1.1.8": - url: "https://github.com/google/snappy/archive/1.1.8.tar.gz" - sha256: "16b677f07832a612b0836178db7f374e414f94657c138e6993cbfc5dcc58651f" - "1.1.7": - url: "https://github.com/google/snappy/archive/1.1.7.tar.gz" - sha256: "3dfa02e873ff51a11ee02b9ca391807f0c8ea0529a4924afa645fbf97163f9d4" -patches: - "1.1.10": - - patch_file: "patches/1.1.10-0001-fix-inlining-failure.patch" - patch_description: "disable inlining for compilation error" - patch_type: "portability" - - patch_file: "patches/1.1.9-0002-no-Werror.patch" - patch_description: "disable 'warning as error' options" - patch_type: "portability" - - patch_file: "patches/1.1.10-0003-fix-clobber-list-older-llvm.patch" - patch_description: "disable inline asm on apple-clang" - patch_type: "portability" - - patch_file: "patches/1.1.9-0004-rtti-by-default.patch" - patch_description: "remove 'disable rtti'" - patch_type: "conan" - "1.1.9": - - patch_file: "patches/1.1.9-0001-fix-inlining-failure.patch" - patch_description: "disable inlining for compilation error" - patch_type: "portability" - - patch_file: "patches/1.1.9-0002-no-Werror.patch" - patch_description: "disable 'warning as error' options" - patch_type: "portability" - - patch_file: "patches/1.1.9-0003-fix-clobber-list-older-llvm.patch" - patch_description: "disable inline asm on apple-clang" - patch_type: "portability" - - patch_file: "patches/1.1.9-0004-rtti-by-default.patch" - patch_description: "remove 'disable rtti'" - patch_type: "conan" diff --git a/external/snappy/conanfile.py b/external/snappy/conanfile.py deleted file mode 100644 index 23558639f4..0000000000 --- a/external/snappy/conanfile.py +++ /dev/null @@ -1,89 +0,0 @@ -from conan import ConanFile -from conan.tools.build import check_min_cppstd -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir -from conan.tools.scm import Version -import os - -required_conan_version = ">=1.54.0" - - -class SnappyConan(ConanFile): - name = "snappy" - description = "A fast compressor/decompressor" - topics = ("google", "compressor", "decompressor") - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/google/snappy" - license = "BSD-3-Clause" - - package_type = "library" - settings = "os", "arch", "compiler", "build_type" - options = { - "shared": [True, False], - "fPIC": [True, False], - } - default_options = { - "shared": False, - "fPIC": True, - } - - def export_sources(self): - export_conandata_patches(self) - - def config_options(self): - if self.settings.os == 'Windows': - del self.options.fPIC - - def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") - - def layout(self): - cmake_layout(self, src_folder="src") - - def validate(self): - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) - - def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True) - - def generate(self): - tc = CMakeToolchain(self) - tc.variables["SNAPPY_BUILD_TESTS"] = False - if Version(self.version) >= "1.1.8": - tc.variables["SNAPPY_FUZZING_BUILD"] = False - tc.variables["SNAPPY_REQUIRE_AVX"] = False - tc.variables["SNAPPY_REQUIRE_AVX2"] = False - tc.variables["SNAPPY_INSTALL"] = True - if Version(self.version) >= "1.1.9": - tc.variables["SNAPPY_BUILD_BENCHMARKS"] = False - tc.generate() - - def build(self): - apply_conandata_patches(self) - cmake = CMake(self) - cmake.configure() - cmake.build() - - def package(self): - copy(self, "COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) - cmake = CMake(self) - cmake.install() - rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - - def package_info(self): - self.cpp_info.set_property("cmake_file_name", "Snappy") - self.cpp_info.set_property("cmake_target_name", "Snappy::snappy") - # TODO: back to global scope in conan v2 once cmake_find_package* generators removed - self.cpp_info.components["snappylib"].libs = ["snappy"] - if not self.options.shared: - if self.settings.os in ["Linux", "FreeBSD"]: - self.cpp_info.components["snappylib"].system_libs.append("m") - - # TODO: to remove in conan v2 once cmake_find_package* generators removed - self.cpp_info.names["cmake_find_package"] = "Snappy" - self.cpp_info.names["cmake_find_package_multi"] = "Snappy" - self.cpp_info.components["snappylib"].names["cmake_find_package"] = "snappy" - self.cpp_info.components["snappylib"].names["cmake_find_package_multi"] = "snappy" - self.cpp_info.components["snappylib"].set_property("cmake_target_name", "Snappy::snappy") diff --git a/external/snappy/patches/1.1.10-0001-fix-inlining-failure.patch b/external/snappy/patches/1.1.10-0001-fix-inlining-failure.patch deleted file mode 100644 index 66b0f05521..0000000000 --- a/external/snappy/patches/1.1.10-0001-fix-inlining-failure.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/snappy-stubs-internal.h b/snappy-stubs-internal.h -index 1548ed7..3b4a9f3 100644 ---- a/snappy-stubs-internal.h -+++ b/snappy-stubs-internal.h -@@ -100,7 +100,7 @@ - - // Inlining hints. - #if HAVE_ATTRIBUTE_ALWAYS_INLINE --#define SNAPPY_ATTRIBUTE_ALWAYS_INLINE __attribute__((always_inline)) -+#define SNAPPY_ATTRIBUTE_ALWAYS_INLINE - #else - #define SNAPPY_ATTRIBUTE_ALWAYS_INLINE - #endif // HAVE_ATTRIBUTE_ALWAYS_INLINE diff --git a/external/snappy/patches/1.1.10-0003-fix-clobber-list-older-llvm.patch b/external/snappy/patches/1.1.10-0003-fix-clobber-list-older-llvm.patch deleted file mode 100644 index 969ce3805d..0000000000 --- a/external/snappy/patches/1.1.10-0003-fix-clobber-list-older-llvm.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/snappy.cc b/snappy.cc -index d414718..e4efb59 100644 ---- a/snappy.cc -+++ b/snappy.cc -@@ -1132,7 +1132,7 @@ inline size_t AdvanceToNextTagX86Optimized(const uint8_t** ip_p, size_t* tag) { - size_t literal_len = *tag >> 2; - size_t tag_type = *tag; - bool is_literal; --#if defined(__GCC_ASM_FLAG_OUTPUTS__) && defined(__x86_64__) -+#if defined(__GCC_ASM_FLAG_OUTPUTS__) && defined(__x86_64__) && ( (!defined(__clang__) && !defined(__APPLE__)) || (!defined(__APPLE__) && defined(__clang__) && (__clang_major__ >= 9)) || (defined(__APPLE__) && defined(__clang__) && (__clang_major__ > 11)) ) - // TODO clang misses the fact that the (c & 3) already correctly - // sets the zero flag. - asm("and $3, %k[tag_type]\n\t" diff --git a/external/snappy/patches/1.1.9-0001-fix-inlining-failure.patch b/external/snappy/patches/1.1.9-0001-fix-inlining-failure.patch deleted file mode 100644 index cdc119c0d5..0000000000 --- a/external/snappy/patches/1.1.9-0001-fix-inlining-failure.patch +++ /dev/null @@ -1,14 +0,0 @@ -Fixes the following error: -error: inlining failed in call to ‘always_inline’ ‘size_t snappy::AdvanceToNextTag(const uint8_t**, size_t*)’: function body can be overwritten at link time - ---- snappy-stubs-internal.h -+++ snappy-stubs-internal.h -@@ -100,7 +100,7 @@ - - // Inlining hints. - #ifdef HAVE_ATTRIBUTE_ALWAYS_INLINE --#define SNAPPY_ATTRIBUTE_ALWAYS_INLINE __attribute__((always_inline)) -+#define SNAPPY_ATTRIBUTE_ALWAYS_INLINE - #else - #define SNAPPY_ATTRIBUTE_ALWAYS_INLINE - #endif diff --git a/external/snappy/patches/1.1.9-0002-no-Werror.patch b/external/snappy/patches/1.1.9-0002-no-Werror.patch deleted file mode 100644 index d86e4e0a9d..0000000000 --- a/external/snappy/patches/1.1.9-0002-no-Werror.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- CMakeLists.txt -+++ CMakeLists.txt -@@ -69,7 +69,7 @@ -- # Use -Werror for clang only. -+if(0) - if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") - if(NOT CMAKE_CXX_FLAGS MATCHES "-Werror") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") - endif(NOT CMAKE_CXX_FLAGS MATCHES "-Werror") - endif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") -- -+endif() diff --git a/external/snappy/patches/1.1.9-0003-fix-clobber-list-older-llvm.patch b/external/snappy/patches/1.1.9-0003-fix-clobber-list-older-llvm.patch deleted file mode 100644 index 84bc674fdd..0000000000 --- a/external/snappy/patches/1.1.9-0003-fix-clobber-list-older-llvm.patch +++ /dev/null @@ -1,12 +0,0 @@ -asm clobbers do not work for clang < 9 and apple-clang < 11 (found by SpaceIm) ---- snappy.cc -+++ snappy.cc -@@ -1026,7 +1026,7 @@ - size_t literal_len = *tag >> 2; - size_t tag_type = *tag; - bool is_literal; --#if defined(__GNUC__) && defined(__x86_64__) -+#if defined(__GNUC__) && defined(__x86_64__) && ( (!defined(__clang__) && !defined(__APPLE__)) || (!defined(__APPLE__) && defined(__clang__) && (__clang_major__ >= 9)) || (defined(__APPLE__) && defined(__clang__) && (__clang_major__ > 11)) ) - // TODO clang misses the fact that the (c & 3) already correctly - // sets the zero flag. - asm("and $3, %k[tag_type]\n\t" diff --git a/external/snappy/patches/1.1.9-0004-rtti-by-default.patch b/external/snappy/patches/1.1.9-0004-rtti-by-default.patch deleted file mode 100644 index c353a489d0..0000000000 --- a/external/snappy/patches/1.1.9-0004-rtti-by-default.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -53,8 +53,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - add_definitions(-D_HAS_EXCEPTIONS=0) - - # Disable RTTI. -- string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-") - else(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - # Use -Wall for clang and gcc. - if(NOT CMAKE_CXX_FLAGS MATCHES "-Wall") -@@ -78,8 +76,6 @@ endif() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions") - - # Disable RTTI. -- string(REGEX REPLACE "-frtti" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti") - endif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - - # BUILD_SHARED_LIBS is a standard CMake variable, but we declare it here to make diff --git a/external/soci/conandata.yml b/external/soci/conandata.yml deleted file mode 100644 index 6eb59aaffa..0000000000 --- a/external/soci/conandata.yml +++ /dev/null @@ -1,12 +0,0 @@ -sources: - "4.0.3": - url: "https://github.com/SOCI/soci/archive/v4.0.3.tar.gz" - sha256: "4b1ff9c8545c5d802fbe06ee6cd2886630e5c03bf740e269bb625b45cf934928" -patches: - "4.0.3": - - patch_file: "patches/0001-Remove-hardcoded-INSTALL_NAME_DIR-for-relocatable-li.patch" - patch_description: "Generate relocatable libraries on MacOS" - patch_type: "portability" - - patch_file: "patches/0002-Fix-soci_backend.patch" - patch_description: "Fix variable names for dependencies" - patch_type: "conan" diff --git a/external/soci/conanfile.py b/external/soci/conanfile.py deleted file mode 100644 index fe4c54e53e..0000000000 --- a/external/soci/conanfile.py +++ /dev/null @@ -1,212 +0,0 @@ -from conan import ConanFile -from conan.tools.build import check_min_cppstd -from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir -from conan.tools.microsoft import is_msvc -from conan.tools.scm import Version -from conan.errors import ConanInvalidConfiguration -import os - -required_conan_version = ">=1.55.0" - - -class SociConan(ConanFile): - name = "soci" - homepage = "https://github.com/SOCI/soci" - url = "https://github.com/conan-io/conan-center-index" - description = "The C++ Database Access Library " - topics = ("mysql", "odbc", "postgresql", "sqlite3") - license = "BSL-1.0" - - settings = "os", "arch", "compiler", "build_type" - options = { - "shared": [True, False], - "fPIC": [True, False], - "empty": [True, False], - "with_sqlite3": [True, False], - "with_db2": [True, False], - "with_odbc": [True, False], - "with_oracle": [True, False], - "with_firebird": [True, False], - "with_mysql": [True, False], - "with_postgresql": [True, False], - "with_boost": [True, False], - } - default_options = { - "shared": False, - "fPIC": True, - "empty": False, - "with_sqlite3": False, - "with_db2": False, - "with_odbc": False, - "with_oracle": False, - "with_firebird": False, - "with_mysql": False, - "with_postgresql": False, - "with_boost": False, - } - - def export_sources(self): - export_conandata_patches(self) - - def layout(self): - cmake_layout(self, src_folder="src") - - def config_options(self): - if self.settings.os == "Windows": - self.options.rm_safe("fPIC") - - def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") - - def requirements(self): - if self.options.with_sqlite3: - self.requires("sqlite3/3.47.0") - if self.options.with_odbc and self.settings.os != "Windows": - self.requires("odbc/2.3.11") - if self.options.with_mysql: - self.requires("libmysqlclient/8.1.0") - if self.options.with_postgresql: - self.requires("libpq/15.5") - if self.options.with_boost: - self.requires("boost/1.86.0") - - @property - def _minimum_compilers_version(self): - return { - "Visual Studio": "14", - "gcc": "4.8", - "clang": "3.8", - "apple-clang": "8.0" - } - - def validate(self): - if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) - - compiler = str(self.settings.compiler) - compiler_version = Version(self.settings.compiler.version.value) - if compiler not in self._minimum_compilers_version: - self.output.warning("{} recipe lacks information about the {} compiler support.".format(self.name, self.settings.compiler)) - elif compiler_version < self._minimum_compilers_version[compiler]: - raise ConanInvalidConfiguration("{} requires a {} version >= {}".format(self.name, compiler, compiler_version)) - - prefix = "Dependencies for" - message = "not configured in this conan package." - if self.options.with_db2: - # self.requires("db2/0.0.0") # TODO add support for db2 - raise ConanInvalidConfiguration("{} DB2 {} ".format(prefix, message)) - if self.options.with_oracle: - # self.requires("oracle_db/0.0.0") # TODO add support for oracle - raise ConanInvalidConfiguration("{} ORACLE {} ".format(prefix, message)) - if self.options.with_firebird: - # self.requires("firebird/0.0.0") # TODO add support for firebird - raise ConanInvalidConfiguration("{} firebird {} ".format(prefix, message)) - - def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True) - - def generate(self): - tc = CMakeToolchain(self) - - tc.variables["SOCI_SHARED"] = self.options.shared - tc.variables["SOCI_STATIC"] = not self.options.shared - tc.variables["SOCI_TESTS"] = False - tc.variables["SOCI_CXX11"] = True - tc.variables["SOCI_EMPTY"] = self.options.empty - tc.variables["WITH_SQLITE3"] = self.options.with_sqlite3 - tc.variables["WITH_DB2"] = self.options.with_db2 - tc.variables["WITH_ODBC"] = self.options.with_odbc - tc.variables["WITH_ORACLE"] = self.options.with_oracle - tc.variables["WITH_FIREBIRD"] = self.options.with_firebird - tc.variables["WITH_MYSQL"] = self.options.with_mysql - tc.variables["WITH_POSTGRESQL"] = self.options.with_postgresql - tc.variables["WITH_BOOST"] = self.options.with_boost - tc.generate() - - deps = CMakeDeps(self) - deps.generate() - - def build(self): - apply_conandata_patches(self) - cmake = CMake(self) - cmake.configure() - cmake.build() - - def package(self): - copy(self, "LICENSE_1_0.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - - cmake = CMake(self) - cmake.install() - - rmdir(self, os.path.join(self.package_folder, "lib", "cmake")) - - def package_info(self): - self.cpp_info.set_property("cmake_file_name", "SOCI") - - target_suffix = "" if self.options.shared else "_static" - lib_prefix = "lib" if is_msvc(self) and not self.options.shared else "" - version = Version(self.version) - lib_suffix = "_{}_{}".format(version.major, version.minor) if self.settings.os == "Windows" else "" - - # soci_core - self.cpp_info.components["soci_core"].set_property("cmake_target_name", "SOCI::soci_core{}".format(target_suffix)) - self.cpp_info.components["soci_core"].libs = ["{}soci_core{}".format(lib_prefix, lib_suffix)] - if self.options.with_boost: - self.cpp_info.components["soci_core"].requires.append("boost::headers") - - # soci_empty - if self.options.empty: - self.cpp_info.components["soci_empty"].set_property("cmake_target_name", "SOCI::soci_empty{}".format(target_suffix)) - self.cpp_info.components["soci_empty"].libs = ["{}soci_empty{}".format(lib_prefix, lib_suffix)] - self.cpp_info.components["soci_empty"].requires = ["soci_core"] - - # soci_sqlite3 - if self.options.with_sqlite3: - self.cpp_info.components["soci_sqlite3"].set_property("cmake_target_name", "SOCI::soci_sqlite3{}".format(target_suffix)) - self.cpp_info.components["soci_sqlite3"].libs = ["{}soci_sqlite3{}".format(lib_prefix, lib_suffix)] - self.cpp_info.components["soci_sqlite3"].requires = ["soci_core", "sqlite3::sqlite3"] - - # soci_odbc - if self.options.with_odbc: - self.cpp_info.components["soci_odbc"].set_property("cmake_target_name", "SOCI::soci_odbc{}".format(target_suffix)) - self.cpp_info.components["soci_odbc"].libs = ["{}soci_odbc{}".format(lib_prefix, lib_suffix)] - self.cpp_info.components["soci_odbc"].requires = ["soci_core"] - if self.settings.os == "Windows": - self.cpp_info.components["soci_odbc"].system_libs.append("odbc32") - else: - self.cpp_info.components["soci_odbc"].requires.append("odbc::odbc") - - # soci_mysql - if self.options.with_mysql: - self.cpp_info.components["soci_mysql"].set_property("cmake_target_name", "SOCI::soci_mysql{}".format(target_suffix)) - self.cpp_info.components["soci_mysql"].libs = ["{}soci_mysql{}".format(lib_prefix, lib_suffix)] - self.cpp_info.components["soci_mysql"].requires = ["soci_core", "libmysqlclient::libmysqlclient"] - - # soci_postgresql - if self.options.with_postgresql: - self.cpp_info.components["soci_postgresql"].set_property("cmake_target_name", "SOCI::soci_postgresql{}".format(target_suffix)) - self.cpp_info.components["soci_postgresql"].libs = ["{}soci_postgresql{}".format(lib_prefix, lib_suffix)] - self.cpp_info.components["soci_postgresql"].requires = ["soci_core", "libpq::libpq"] - - # TODO: to remove in conan v2 once cmake_find_package* generators removed - self.cpp_info.names["cmake_find_package"] = "SOCI" - self.cpp_info.names["cmake_find_package_multi"] = "SOCI" - self.cpp_info.components["soci_core"].names["cmake_find_package"] = "soci_core{}".format(target_suffix) - self.cpp_info.components["soci_core"].names["cmake_find_package_multi"] = "soci_core{}".format(target_suffix) - if self.options.empty: - self.cpp_info.components["soci_empty"].names["cmake_find_package"] = "soci_empty{}".format(target_suffix) - self.cpp_info.components["soci_empty"].names["cmake_find_package_multi"] = "soci_empty{}".format(target_suffix) - if self.options.with_sqlite3: - self.cpp_info.components["soci_sqlite3"].names["cmake_find_package"] = "soci_sqlite3{}".format(target_suffix) - self.cpp_info.components["soci_sqlite3"].names["cmake_find_package_multi"] = "soci_sqlite3{}".format(target_suffix) - if self.options.with_odbc: - self.cpp_info.components["soci_odbc"].names["cmake_find_package"] = "soci_odbc{}".format(target_suffix) - self.cpp_info.components["soci_odbc"].names["cmake_find_package_multi"] = "soci_odbc{}".format(target_suffix) - if self.options.with_mysql: - self.cpp_info.components["soci_mysql"].names["cmake_find_package"] = "soci_mysql{}".format(target_suffix) - self.cpp_info.components["soci_mysql"].names["cmake_find_package_multi"] = "soci_mysql{}".format(target_suffix) - if self.options.with_postgresql: - self.cpp_info.components["soci_postgresql"].names["cmake_find_package"] = "soci_postgresql{}".format(target_suffix) - self.cpp_info.components["soci_postgresql"].names["cmake_find_package_multi"] = "soci_postgresql{}".format(target_suffix) diff --git a/external/soci/patches/0001-Remove-hardcoded-INSTALL_NAME_DIR-for-relocatable-li.patch b/external/soci/patches/0001-Remove-hardcoded-INSTALL_NAME_DIR-for-relocatable-li.patch deleted file mode 100644 index 5de0027f75..0000000000 --- a/external/soci/patches/0001-Remove-hardcoded-INSTALL_NAME_DIR-for-relocatable-li.patch +++ /dev/null @@ -1,39 +0,0 @@ -From d491bf7b5040d314ffd0c6310ba01f78ff44c85e Mon Sep 17 00:00:00 2001 -From: Rasmus Thomsen -Date: Fri, 14 Apr 2023 09:16:29 +0200 -Subject: [PATCH] Remove hardcoded INSTALL_NAME_DIR for relocatable libraries - on MacOS - ---- - cmake/SociBackend.cmake | 2 +- - src/core/CMakeLists.txt | 1 - - 2 files changed, 1 insertion(+), 2 deletions(-) - -diff --git a/cmake/SociBackend.cmake b/cmake/SociBackend.cmake -index 5d4ef0df..39fe1f77 100644 ---- a/cmake/SociBackend.cmake -+++ b/cmake/SociBackend.cmake -@@ -171,7 +171,7 @@ macro(soci_backend NAME) - set_target_properties(${THIS_BACKEND_TARGET} - PROPERTIES - SOVERSION ${${PROJECT_NAME}_SOVERSION} -- INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib) -+ ) - - if(APPLE) - set_target_properties(${THIS_BACKEND_TARGET} -diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt -index 3e7deeae..f9eae564 100644 ---- a/src/core/CMakeLists.txt -+++ b/src/core/CMakeLists.txt -@@ -59,7 +59,6 @@ if (SOCI_SHARED) - PROPERTIES - VERSION ${SOCI_VERSION} - SOVERSION ${SOCI_SOVERSION} -- INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib - CLEAN_DIRECT_OUTPUT 1) - endif() - --- -2.25.1 - diff --git a/external/soci/patches/0002-Fix-soci_backend.patch b/external/soci/patches/0002-Fix-soci_backend.patch deleted file mode 100644 index eab3c3763c..0000000000 --- a/external/soci/patches/0002-Fix-soci_backend.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/cmake/SociBackend.cmake b/cmake/SociBackend.cmake -index 0a664667..3fa2ed95 100644 ---- a/cmake/SociBackend.cmake -+++ b/cmake/SociBackend.cmake -@@ -31,14 +31,13 @@ macro(soci_backend_deps_found NAME DEPS SUCCESS) - if(NOT DEPEND_FOUND) - list(APPEND DEPS_NOT_FOUND ${dep}) - else() -- string(TOUPPER "${dep}" DEPU) -- if( ${DEPU}_INCLUDE_DIR ) -- list(APPEND DEPS_INCLUDE_DIRS ${${DEPU}_INCLUDE_DIR}) -+ if( ${dep}_INCLUDE_DIR ) -+ list(APPEND DEPS_INCLUDE_DIRS ${${dep}_INCLUDE_DIR}) - endif() -- if( ${DEPU}_INCLUDE_DIRS ) -- list(APPEND DEPS_INCLUDE_DIRS ${${DEPU}_INCLUDE_DIRS}) -+ if( ${dep}_INCLUDE_DIRS ) -+ list(APPEND DEPS_INCLUDE_DIRS ${${dep}_INCLUDE_DIRS}) - endif() -- list(APPEND DEPS_LIBRARIES ${${DEPU}_LIBRARIES}) -+ list(APPEND DEPS_LIBRARIES ${${dep}_LIBRARIES}) - endif() - endforeach() -