-
Notifications
You must be signed in to change notification settings - Fork 8
128 lines (106 loc) · 3.12 KB
/
build.yaml
File metadata and controls
128 lines (106 loc) · 3.12 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# Copyright 2021, 2025 Oracle Corporation and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at
# https://oss.oracle.com/licenses/upl.
# ---------------------------------------------------------------------------
# Coherence CLI GitHub Actions CI build.
# ---------------------------------------------------------------------------
name: CI
on:
workflow_dispatch:
push:
branches-ignore:
- gh-pages
jobs:
build:
runs-on: ubuntu-latest
# Checkout the source, we need a depth of zero to fetch all of the history otherwise
# the copyright check cannot work out the date of the files from Git.
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get Docker Images
shell: bash
run: |
docker pull gcr.io/distroless/java17
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
- name: Cache Go Modules
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-mods-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-mods-
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Code Review
shell: bash
run: |
make golangci
- name: Copyright Check
shell: bash
run: |
make copyright
- name: Unit Tests
shell: bash
run: make test-cohctl
- name: E2E Local Tests
shell: bash
run: |
COHERENCE_BASE_IMAGE=gcr.io/distroless/java17 PROFILES=,executor COHERENCE_VERSION=14.1.2-0-3 make clean build-test-images test-e2e-standalone
- name: Discovery Tests
shell: bash
run: make test-clean test-discovery
- name: Document Links tests
shell: bash
run: make test-docs
- name: Build for all platforms
shell: bash
run: make cohctl-all
- name: Upload Linux amd64
uses: actions/upload-artifact@v4
if: success()
with:
name: cohctl-linux-amd64
path: bin/linux/amd64/cohctl
- name: Upload Linux arm64
uses: actions/upload-artifact@v4
if: success()
with:
name: cohctl-linux-arm64
path: bin/linux/arm64/cohctl
- name: Upload Linux 386
uses: actions/upload-artifact@v4
if: success()
with:
name: cohctl-linux-386
path: bin/linux/386/cohctl
- name: Upload Windows amd64
uses: actions/upload-artifact@v4
if: success()
with:
name: cohctl-windows-amd64
path: bin/windows/amd64/cohctl.exe
- name: Upload Windows arm
uses: actions/upload-artifact@v4
if: success()
with:
name: cohctl-windows-arm
path: bin/windows/arm/cohctl.exe
- uses: actions/upload-artifact@v4
if: failure()
with:
name: test-output
path: build/_output/test-logs