diff --git a/.github/actions/setup_conan/action.yml b/.github/actions/setup_conan/action.yml index 8c697e434..e2a11ef70 100644 --- a/.github/actions/setup_conan/action.yml +++ b/.github/actions/setup_conan/action.yml @@ -1,22 +1,19 @@ name: Setup conan description: Setup conan profile and artifactory + inputs: conan_profile: description: Conan profile name required: true -outputs: - conan_profile: - description: Created conan profile name - value: ${{ steps.conan_export_output.outputs.conan_profile }} + runs: using: composite steps: - - name: On mac + - name: Create conan profile on macOS if: ${{ runner.os == 'macOS' }} shell: bash env: - CONAN_PROFILE: apple_clang_16 - id: conan_setup_mac + CONAN_PROFILE: ${{ inputs.conan_profile }} run: | echo "Creating $CONAN_PROFILE conan profile" conan profile new $CONAN_PROFILE --detect --force @@ -24,20 +21,6 @@ runs: conan profile update settings.compiler.cppstd=20 $CONAN_PROFILE conan profile update env.CXXFLAGS=-DBOOST_ASIO_DISABLE_CONCEPTS $CONAN_PROFILE conan profile update "conf.tools.build:cxxflags+=[\"-DBOOST_ASIO_DISABLE_CONCEPTS\"]" $CONAN_PROFILE - echo "created_conan_profile=$CONAN_PROFILE" >> $GITHUB_OUTPUT - - - name: On linux - if: ${{ runner.os == 'Linux' }} - shell: bash - id: conan_setup_linux - run: | - echo "created_conan_profile=${{ inputs.conan_profile }}" >> $GITHUB_OUTPUT - - - name: Export output variable - shell: bash - id: conan_export_output - run: | - echo "conan_profile=${{ steps.conan_setup_mac.outputs.created_conan_profile || steps.conan_setup_linux.outputs.created_conan_profile }}" >> $GITHUB_OUTPUT - name: Add conan-non-prod artifactory shell: bash diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 056726605..2e363f795 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -71,6 +71,7 @@ jobs: code_coverage: false static: true - os: macos15 + conan_profile: default_apple_clang build_type: Release code_coverage: false static: false @@ -109,7 +110,7 @@ jobs: container: image: rippleci/clio_ci:latest - os: macos15 - conan_profile: apple_clang_16 + conan_profile: default_apple_clang build_type: Release runs-on: ${{ matrix.os }} container: ${{ matrix.container }} diff --git a/.github/workflows/build_impl.yml b/.github/workflows/build_impl.yml index 364c301a7..f086a28f0 100644 --- a/.github/workflows/build_impl.yml +++ b/.github/workflows/build_impl.yml @@ -104,7 +104,7 @@ jobs: id: restore_cache with: conan_dir: ${{ env.CONAN_USER_HOME }}/.conan - conan_profile: ${{ steps.conan.outputs.conan_profile }} + conan_profile: ${{ inputs.conan_profile }} ccache_dir: ${{ env.CCACHE_DIR }} build_type: ${{ inputs.build_type }} code_coverage: ${{ inputs.code_coverage }} @@ -112,7 +112,7 @@ jobs: - name: Run conan and cmake uses: ./.github/actions/generate with: - conan_profile: ${{ steps.conan.outputs.conan_profile }} + conan_profile: ${{ inputs.conan_profile }} conan_cache_hit: ${{ !inputs.disable_cache && steps.restore_cache.outputs.conan_cache_hit }} build_type: ${{ inputs.build_type }} code_coverage: ${{ inputs.code_coverage }} @@ -146,21 +146,21 @@ jobs: if: ${{ inputs.clio_server }} uses: actions/upload-artifact@v4 with: - name: clio_server_${{ runner.os }}_${{ inputs.build_type }}_${{ steps.conan.outputs.conan_profile }} + name: clio_server_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }} path: build/clio_server - name: Upload clio_tests if: ${{ inputs.unit_tests && !inputs.code_coverage }} uses: actions/upload-artifact@v4 with: - name: clio_tests_${{ runner.os }}_${{ inputs.build_type }}_${{ steps.conan.outputs.conan_profile }} + name: clio_tests_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }} path: build/clio_tests - name: Upload clio_integration_tests if: ${{ inputs.integration_tests && !inputs.code_coverage }} uses: actions/upload-artifact@v4 with: - name: clio_integration_tests_${{ runner.os }}_${{ inputs.build_type }}_${{ steps.conan.outputs.conan_profile }} + name: clio_integration_tests_${{ runner.os }}_${{ inputs.build_type }}_${{ inputs.conan_profile }} path: build/clio_integration_tests - name: Save cache @@ -175,7 +175,7 @@ jobs: ccache_cache_miss_rate: ${{ steps.ccache_stats.outputs.miss_rate }} build_type: ${{ inputs.build_type }} code_coverage: ${{ inputs.code_coverage }} - conan_profile: ${{ steps.conan.outputs.conan_profile }} + conan_profile: ${{ inputs.conan_profile }} # TODO: This is not a part of build process but it is the easiest way to do it here. # It will be refactored in https://github.com/XRPLF/clio/issues/1075 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 610aae099..b6f0d96f5 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -16,13 +16,16 @@ jobs: matrix: include: - os: macos15 + conan_profile: default_apple_clang build_type: Release static: false - os: heavy + conan_profile: gcc build_type: Release static: true container: '{ "image": "rippleci/clio_ci:latest" }' - os: heavy + conan_profile: gcc build_type: Debug static: true container: '{ "image": "rippleci/clio_ci:latest" }' @@ -30,7 +33,7 @@ jobs: with: runs_on: ${{ matrix.os }} container: ${{ matrix.container }} - conan_profile: gcc + conan_profile: ${{ matrix.conan_profile }} build_type: ${{ matrix.build_type }} code_coverage: false static: ${{ matrix.static }} @@ -46,7 +49,7 @@ jobs: matrix: include: - os: macos15 - conan_profile: apple_clang_16 + conan_profile: default_apple_clang build_type: Release integration_tests: false - os: heavy