Warm up cache #564
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | name: Warm up cache | |
| on: | |
| schedule: | |
| - cron: "0 4 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| main: | |
| name: Build YDB C++ SDK and cache artifacts | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| compiler: [clang, gcc] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Restore cache files | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ~/.ccache | |
| key: ubuntu-22.04-ccache-${{ matrix.compiler }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }} | |
| restore-keys: | | |
| ubuntu-22.04-ccache-${{ matrix.compiler }}- | |
| - name: Install dependencies | |
| uses: ./.github/actions/prepare_vm | |
| - name: Prepare ccache timestamp | |
| id: ccache_cache_timestamp | |
| shell: cmake -P {0} | |
| run: | | |
| string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) | |
| message("::set-output name=timestamp::${current_date}") | |
| - name: Cache files | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.ccache | |
| key: ubuntu-22.04-ccache-${{ matrix.compiler }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }} | |
| restore-keys: | | |
| ubuntu-22.04-ccache-${{ matrix.compiler }}- | |
| - name: Build | |
| uses: ./.github/actions/build | |
| with: | |
| compiler: ${{ matrix.compiler }} |