-
Notifications
You must be signed in to change notification settings - Fork 6
112 lines (99 loc) · 3.03 KB
/
paladin-PR-build.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
name: Paladin Build
permissions:
contents: write
packages: write
id-token: write
on:
push:
branches: [main]
paths-ignore:
- '**.md'
- 'operator/charts/**'
pull_request:
paths-ignore:
- '**.md'
- 'operator/charts/**'
workflow_dispatch:
# Ensure this workflow only runs for the most recent commit of a pull-request
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
# Install protoc only on non-Windows systems
- name: Install protoc
run: |
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
curl -LO $PB_REL/download/v25.1/protoc-25.1-linux-x86_64.zip
unzip protoc-25.1-linux-x86_64.zip -d protoc
echo "${PWD}/protoc/bin" >> $GITHUB_PATH
# Set up Java
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
# Set up Go
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
check-latest: true
cache-dependency-path: |
**/*.sum
# Set up Gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
# Build with Gradle
# This does not build any docker images, and does not run any dockerized tests.
# It does run Go/Java/Solidity component and integration tests that use PostgreSQL and Besu
- name: Build with Gradle
run: ./gradlew -PcomposeLogs=true -PverboseTests=true --no-daemon --parallel --max-workers=5 build
- name: Upload logs
uses: actions/upload-artifact@v4
if: always()
with:
name: testbed-logs
path: |
**/testbed.*.log
core-image-build:
# run only on PRs
if: github.event_name == 'pull_request'
uses: ./.github/workflows/build-image.yaml
with:
dockerfile: ./Dockerfile
registry: paladin.io
image: paladin
image_tag: test
push: false
platforms: linux/amd64
runs-on: ubuntu-latest
operator-image-build:
# run only on PRs
if: github.event_name == 'pull_request'
uses: ./.github/workflows/build-image.yaml
with:
dockerfile: ./operator/Dockerfile
registry: paladin.io
image: paladin-operator
image_tag: test
push: false
platforms: linux/amd64
runs-on: ubuntu-latest
image-release:
# run only on pushes to main or manual triggers
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/cross-build-images.yaml
with:
registry: ghcr.io
repository: ${{ github.repository_owner }}
image_tags: ${{ github.ref_name }}
secrets:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}