-
Notifications
You must be signed in to change notification settings - Fork 19
92 lines (79 loc) · 2.71 KB
/
Copy pathbuild.yaml
File metadata and controls
92 lines (79 loc) · 2.71 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
name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
packages: read
jobs:
build_and_test:
name: "Build & UTs: JDK ${{ matrix.Java }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [ '17', '21', '22', '23', '24', '25' ]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}
- name: Build and run unit tests with Maven
run: mvn --batch-mode -Dspotbugs.skip=true test
# Build the SDK on a fixed image, to catch dependency bumps that break it.
docker_build:
name: "Build [docker]"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Build SDK [docker]
run: docker build --file .github/workflows/ext/Dockerfile .
integration_test:
name: "ITs: JDK ${{ matrix.Java }}"
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17', '21', '25' ]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}
- name: Log in to GHCR
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build IT image
working-directory: bmq-sdk/src/test/docker
run: docker build --tag bmq-broker-java-it --build-arg "image=ghcr.io/bloomberg/blazingmq:latest" .
- name: Build and run integration tests with Maven
timeout-minutes: 120
run: mvn --batch-mode -DskipUnitTests=true -Dspotbugs.skip=true -Dit.dockerImage=bmq-broker-java-it:latest verify
- name: Compress collected broker logs
if: failure()
working-directory: /tmp/bmq-broker
run: tar -zcvf broker_logs.tar.gz /tmp/bmq-broker/bmq-broker-java-it*
- name: Upload broker logs as artifacts
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: broker_logs_${{ matrix.java }}
path: /tmp/bmq-broker/broker_logs.tar.gz
retention-days: 5