-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (46 loc) · 1.48 KB
/
native.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
name: Native Image
on:
release:
types: [published]
jobs:
native-image:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
include:
- os: macos-latest
uploaded_filename: pq-darwin-amd64
local_path: build/native-image/pq
- os: ubuntu-latest
uploaded_filename: pq-linux-amd64
local_path: build/native-image/pq
- os: windows-latest
uploaded_filename: pq-windows-amd64.exe
local_path: build\native-image\pq.exe
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'oracle'
cache: 'gradle'
- name: Native Image Linux
run: ./gradlew nativeImage && ./gradlew compressExecutable
shell: bash
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: Native Image Macos
run: ./gradlew nativeImage
shell: bash
if: ${{ matrix.os == 'macos-latest' }}
- name: Native Image Windows
shell: cmd
if: ${{ matrix.os == 'windows-latest' }}
run: >-
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" && gradlew.bat nativeImage
- uses: actions/upload-artifact@v3
with:
path: ${{ matrix.local_path }}
name: ${{ matrix.uploaded_filename }}