forked from apache/calcite
-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (55 loc) · 2.29 KB
/
buildcache.yml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Seed build cache
on:
push:
branches:
- main
concurrency:
# On main/release, we don't want any jobs cancelled so the sha is used to name the group
# On PR branches, we cancel the job if new commits are pushed
# More info: https://stackoverflow.com/a/68422069/253468
group: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release' ) && format('ci-buildcache-{0}', github.sha) || format('ci-buildcache-{0}', github.ref) }}
cancel-in-progress: true
jobs:
seed-build-cache:
strategy:
# CI resources are shared, so reduce concurrent builds
max-parallel: 3
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
jdk: [8, 11, 17, 21]
name: '${{ matrix.os }}, ${{ matrix.jdk }} seed build cache'
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 50
- name: 'Set up JDK ${{ matrix.jdk }}'
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.jdk }}
distribution: 'zulu'
- uses: burrunan/gradle-cache-action@v1
name: Build Calcite
env:
S3_BUILD_CACHE_ACCESS_KEY_ID: ${{ secrets.S3_BUILD_CACHE_ACCESS_KEY_ID }}
S3_BUILD_CACHE_SECRET_KEY: ${{ secrets.S3_BUILD_CACHE_SECRET_KEY }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
with:
job-id: jdk${{ matrix.jdk }}
remote-build-cache-proxy-enabled: false
arguments: --scan --no-parallel --no-daemon build -x test