-
Notifications
You must be signed in to change notification settings - Fork 4
84 lines (67 loc) · 2.11 KB
/
build.yaml
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
name: Build YDB Examples
on:
push:
branches:
- master
- develop
pull_request:
type: [opened, reopened, edited, synchronize]
jobs:
build:
name: Build YDB Examples
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '8', '11', '17']
env:
MAVEN_ARGS: --batch-mode --update-snapshots -Dstyle.color=always
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
- name: Extract SDK version
id: getversion
uses: mavrosxristoforos/[email protected]
with:
xml-file: 'pom.xml'
xpath: '//*[local-name()="ydb.sdk.version"]'
- name: Check SDK version
run: |
echo "NEED_SDK=${{ endsWith(steps.getversion.outputs.info, 'SNAPSHOT') }}" >> "$GITHUB_ENV"
- name: Checkout YDB Java SDK
if: ${{ env.NEED_SDK }}
uses: actions/checkout@v4
with:
repository: ydb-platform/ydb-java-sdk
ref: develop
path: ydb-java-sdk
- name: Build YDB Java SDK
working-directory: ./ydb-java-sdk
if: ${{ env.NEED_SDK }}
run: mvn $MAVEN_ARGS -DskipTests=true -Dmaven.javadoc.skip=true install
- name: Remove YDB Java SDK
if: ${{ env.NEED_SDK }}
run: rm -rf ydb-java-sdk
- name: Checkout YDB YC Auth Provider
if: ${{ env.NEED_SDK }}
uses: actions/checkout@v4
with:
repository: ydb-platform/ydb-java-yc
ref: develop
path: ydb-java-yc
- name: Build YDB YC Auth Provider
working-directory: ./ydb-java-yc
if: ${{ env.NEED_SDK }}
run: mvn $MAVEN_ARGS -DskipTests=true -Dmaven.javadoc.skip=true install
- name: Remove YDB YC Auth Provider
if: ${{ env.NEED_SDK }}
run: rm -rf ydb-java-yc
- name: Download dependencies
run: mvn $MAVEN_ARGS dependency:go-offline
- name: Build with Maven
run: mvn $MAVEN_ARGS package