mirror of
				https://github.com/XRPLF/clio.git
				synced 2025-11-04 11:55:51 +00:00 
			
		
		
		
	ci: Make separate download/upload options for ccache (#2637)
This commit is contained in:
		
							
								
								
									
										8
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							@@ -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
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										13
									
								
								.github/workflows/build_and_test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										13
									
								
								.github/workflows/build_and_test.yml
									
									
									
									
										vendored
									
									
								
							@@ -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 }}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										19
									
								
								.github/workflows/build_impl.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										19
									
								
								.github/workflows/build_impl.yml
									
									
									
									
										vendored
									
									
								
							@@ -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 }}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										6
									
								
								.github/workflows/nightly.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.github/workflows/nightly.yml
									
									
									
									
										vendored
									
									
								
							@@ -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
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							@@ -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:
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								.github/workflows/sanitizers.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.github/workflows/sanitizers.yml
									
									
									
									
										vendored
									
									
								
							@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user