diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3300aea8..98cc252a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -62,6 +62,8 @@ jobs: container: ${{ matrix.container }} conan_profile: ${{ matrix.conan_profile }} build_type: ${{ matrix.build_type }} + download_ccache: true + upload_ccache: true static: ${{ matrix.static }} run_unit_tests: true run_integration_tests: false @@ -76,7 +78,8 @@ jobs: container: '{ "image": "ghcr.io/xrplf/clio-ci:384e79cd32f5f6c0ab9be3a1122ead41c5a7e67d" }' conan_profile: gcc build_type: Debug - disable_cache: false + download_ccache: true + upload_ccache: false code_coverage: true static: true upload_clio_server: false @@ -94,7 +97,8 @@ jobs: container: '{ "image": "ghcr.io/xrplf/clio-ci:384e79cd32f5f6c0ab9be3a1122ead41c5a7e67d" }' conan_profile: gcc build_type: Release - disable_cache: false + download_ccache: true + upload_ccache: false code_coverage: false static: true upload_clio_server: false diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 21ee0402..59b6d5b7 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -23,8 +23,14 @@ on: required: true type: string - disable_cache: - description: Whether ccache should be disabled + download_ccache: + description: Whether to download ccache from the cache + required: false + type: boolean + default: true + + upload_ccache: + description: Whether to upload ccache to the cache required: false type: boolean default: false @@ -77,7 +83,8 @@ jobs: container: ${{ inputs.container }} conan_profile: ${{ inputs.conan_profile }} build_type: ${{ inputs.build_type }} - disable_cache: ${{ inputs.disable_cache }} + download_ccache: ${{ inputs.download_ccache }} + upload_ccache: ${{ inputs.upload_ccache }} code_coverage: false static: ${{ inputs.static }} upload_clio_server: ${{ inputs.upload_clio_server }} diff --git a/.github/workflows/build_impl.yml b/.github/workflows/build_impl.yml index 63aa9a61..aa9aae8e 100644 --- a/.github/workflows/build_impl.yml +++ b/.github/workflows/build_impl.yml @@ -23,10 +23,17 @@ on: required: true type: string - disable_cache: - description: Whether ccache should be disabled + download_ccache: + description: Whether to download ccache from the cache required: false type: boolean + default: true + + upload_ccache: + description: Whether to upload ccache to the cache + required: false + type: boolean + default: false code_coverage: description: Whether to enable code coverage @@ -90,7 +97,7 @@ jobs: - name: Prepare runner uses: XRPLF/actions/.github/actions/prepare-runner@7951b682e5a2973b28b0719a72f01fc4b0d0c34f with: - disable_ccache: ${{ inputs.disable_cache }} + disable_ccache: ${{ !inputs.download_ccache }} - name: Setup conan on macOS if: ${{ runner.os == 'macOS' }} @@ -98,7 +105,7 @@ jobs: run: ./.github/scripts/conan/init.sh - name: Restore cache - if: ${{ !inputs.disable_cache }} + if: ${{ inputs.download_ccache }} uses: ./.github/actions/restore_cache id: restore_cache with: @@ -144,7 +151,7 @@ jobs: path: build_time_report.txt - name: Show ccache's statistics - if: ${{ !inputs.disable_cache }} + if: ${{ inputs.download_ccache }} shell: bash id: ccache_stats run: | @@ -190,7 +197,7 @@ jobs: path: build/*.deb - name: Save cache - if: ${{ !inputs.disable_cache && github.ref == 'refs/heads/develop' }} + if: ${{ inputs.upload_ccache && github.ref == 'refs/heads/develop' }} uses: ./.github/actions/save_cache with: conan_profile: ${{ inputs.conan_profile }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index fe631614..27f2d4fd 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -61,7 +61,8 @@ jobs: run_unit_tests: true run_integration_tests: true upload_clio_server: true - disable_cache: true + download_ccache: false + upload_ccache: false analyze_build_time: name: Analyze Build Time @@ -84,7 +85,8 @@ jobs: container: ${{ matrix.container }} conan_profile: ${{ matrix.conan_profile }} build_type: Release - disable_cache: true + download_ccache: false + upload_ccache: false code_coverage: false static: ${{ matrix.static }} upload_clio_server: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bd93ad8e..479e1fe3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,7 +41,8 @@ jobs: run_unit_tests: true run_integration_tests: true upload_clio_server: true - disable_cache: true + download_ccache: false + upload_ccache: false expected_version: ${{ github.event_name == 'push' && github.ref_name || '' }} release: diff --git a/.github/workflows/sanitizers.yml b/.github/workflows/sanitizers.yml index 26cabdcb..e0aad56d 100644 --- a/.github/workflows/sanitizers.yml +++ b/.github/workflows/sanitizers.yml @@ -45,7 +45,8 @@ jobs: with: runs_on: heavy container: '{ "image": "ghcr.io/xrplf/clio-ci:384e79cd32f5f6c0ab9be3a1122ead41c5a7e67d" }' - disable_cache: true + download_ccache: false + upload_ccache: false conan_profile: ${{ matrix.compiler }}${{ matrix.sanitizer_ext }} build_type: ${{ matrix.build_type }} static: false