Repository navigation
72 lines (65 loc) · 2.08 KB
/
Copy pathcheck_and_build.yaml
File metadata and controls
72 lines (65 loc) · 2.08 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Build
on:
push:
branches:
- master
- "release-[0-9].[0-9]*"
- "release-nextgen-[0-9]*"
paths-ignore:
- '**/*.md'
- '**/OWNERS'
- 'OWNERS'
- 'OWNERS_ALIASES'
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- master
- "release-[0-9].[0-9]*"
- "release-nextgen-[0-9]*"
paths-ignore:
- '**/*.md'
- '**/OWNERS'
- 'OWNERS'
- 'OWNERS_ALIASES'
# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency.
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
mac_build:
name: Mac OS Build - ${{ matrix.task.name }}
if: >-
${{
(matrix.task.architecture == 'classic' &&
((github.base_ref || github.ref_name) == 'master' ||
!startsWith(github.base_ref || github.ref_name, 'release-nextgen-'))) ||
(matrix.task.architecture == 'nextgen' &&
((github.base_ref || github.ref_name) == 'master' ||
startsWith(github.base_ref || github.ref_name, 'release-nextgen-')))
}}
runs-on: macos-latest
strategy:
fail-fast: true
matrix:
task:
- name: Build Classic CDC
command: make cdc
architecture: classic
- name: Build Next Gen CDC
command: NEXT_GEN=1 make cdc
architecture: nextgen
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@a37ce9120846195fa4ece8f58b268e6043cb2f26 # v3.7.0
- name: Setup Go environment
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version-file: 'go.mod'
- name: Cache Tools
id: cache-tools
uses: actions/cache@6f8efc29b200d32929f49075959781ed54ec270c # v3.5.0
with:
path: tools/bin
key: macos-latest-ticdc-tools-${{ hashFiles('tools/check/go.mod', 'tools/check/go.sum') }}
- name: ${{ matrix.task.name }}
run: ${{ matrix.task.command }}