aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/prewarm-ccache.yml
blob: 080849d97ab9b93ed34cd3e3ae2de17f693d946d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
name: Prewarm-Ccache
on:
  schedule:
    - cron: "0 4 * * *"  # At 04:00 every day
  workflow_dispatch:

jobs:
  build:
    runs-on: [self-hosted, auto-provisioned]
    strategy:
      fail-fast: false
      matrix:
        version: ["ubuntu-2204", "ubuntu-2004", "ubuntu-1804"]
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: build
        shell: bash
        run: |
          echo "::group::docker-build"
          docker build -f .github/prewarm/${{ matrix.version }}.dockerfile -t $IMG .
          echo "::endgroup::"
          
          docker run --rm -v `pwd`:/ydbwork/ydb \
            -e CCACHE_REMOTE_STORAGE="${CCACHE_REMOTE_STORAGE}" \
            $IMG \
            bash /ydbwork/ydb/.github/prewarm/build.sh
        env:
          IMG: runner-${{ matrix.version }}
          CCACHE_REMOTE_STORAGE: ${{ vars.REMOTE_CACHE_URL && format('http://{0}{1}', secrets.REMOTE_CACHE_AUTH, vars.REMOTE_CACHE_URL) || ''}}