-
Notifications
You must be signed in to change notification settings - Fork 72
144 lines (141 loc) · 4.02 KB
/
pr.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
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: PR Build Check
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
editorconfig-checker:
name: Check editorconfig
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: editorconfig-checker/action-editorconfig-checker@main
- run: editorconfig-checker
commitlint:
name: Lint commits for semantic-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: "20"
- run: npx commitlint --from=${{ github.event.pull_request.base.sha }} --to=${{ github.sha }} --verbose
security:
name: Security validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v3
cyclonedx-sbom:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Generate SBOMs
run: ./gradlew cyclonedxBom
- name: Upload SBOMs
uses: actions/upload-artifact@4
with:
name: cyclonedx-sboms
path: |
core/build/reports/bom.json
isthmus/build/reports/bom.json
isthmus-cli/build/reports/bom.json
osv-scanner:
needs: cyclonedx-sbom
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
project:
- core
- isthmus
- isthmus-cli
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Install OSV-Scanner
run: go install github.com/google/osv-scanner/cmd/osv-scanner@v1
- name: Download SBOMs
uses: actions/download-artifact@v4
with:
name: cyclonedx-sboms
- name: Scan
run: osv-scanner scan --sbom ${{ matrix.project }}/build/reports/bom.json
java:
name: Build and Test Java
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
run: gradle build --rerun-tasks
isthmus-native-image-mac-linux:
name: Build Isthmus Native Image
needs: java
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: graalvm/setup-graalvm@v1
with:
java-version: '17'
distribution: 'graalvm'
# helps avoid rate-limiting issues
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Report Java Version
run: java -version
- name: Install GraalVM native image
run: gu install native-image
- name: Build with Gradle
run: gradle nativeImage
- name: Smoke Test
run: |
./isthmus-cli/src/test/script/smoke.sh
./isthmus-cli/src/test/script/tpch_smoke.sh
- name: Rename the artifact to OS-unique name
shell: bash
run: |
value=`mv isthmus-cli/build/graal/isthmus isthmus-cli/build/graal/isthmus-${{ matrix.os }}`
- name: Publish artifact
uses: actions/upload-artifact@v4
with:
name: isthmus-${{ matrix.os }}
path: isthmus-cli/build/graal/isthmus-${{ matrix.os }}
dry-run-release:
name: Dry-run release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Check current status before next release
run: ./ci/release/dry_run.sh