-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (39 loc) · 1.56 KB
/
build-ci.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
---
name: Build CI
on:
pull_request:
types: [assigned, opened, synchronize, reopened]
concurrency:
# Documentation suggests ${{ github.head_ref }}, but that's only available on pull_request/pull_request_target triggers, so using ${{ github.ref }}.
# On master, we want all builds to complete even if merging happens faster to make it easier to discover at which point something broke.
group: ${{ github.ref == 'refs/heads/main' && format('build-ci-main-{0}', github.sha) || format('build-ci-{0}', github.ref) }}
cancel-in-progress: true
env:
GRADLE_OPTS: -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false
jobs:
build-and-test:
name: Build CLI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set variables
id: setvars
run: |
version=$(sed -n 's,palantir-version = "\(.*\)",\1,p' gradle/libs.dependencies.toml)
echo "palantir_version=$version" >> $GITHUB_OUTPUT
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 21
cache: gradle
- name: Build palantir cli ${{ github.event.inputs.palantir_version }}
run: |
./gradlew build -S --warning-mode all --no-daemon
env:
PALANTIR_VERSION: ${{ steps.setvars.outputs.palantir_version }}
- name: Test palantir cli ${{ github.event.inputs.palantir_version }}
run: |
java -jar build/libs/palantir-cli-*-standalone.jar
env:
PALANTIR_VERSION: ${{ steps.setvars.outputs.palantir_version }}