-
-
Notifications
You must be signed in to change notification settings - Fork 64
80 lines (67 loc) · 2 KB
/
release.binaries.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
name: Build
on:
workflow_dispatch:
release:
types:
- created
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v3
with:
submodules: recursive
- name: Get Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Install Lein
uses: knicknic/[email protected]
with:
macos: brew install leiningen
linux: echo "lein is already installed"
- name: Run Tests then Uberjar
run: |
lein run
lein uberjar
- name: Upload Uberjar
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: target/datalevin-${{ github.event.release.tag_name }}-standalone.jar
overwrite: true
- name: Setup Graalvm
uses: DeLaGuardo/setup-graalvm@master
with:
graalvm-version: '22.3.1.java11'
- name: Install Native Image
run: |
gu install native-image
- name: Build Native Datalevin
uses: knicknic/[email protected]
with:
macos: |
cd native
bash script/compile
linux: |
cd native
sudo bash script/setup-musl
bash script/compile-static
- name: Run Native Tests
run: |
native/dtlv-test0
- name: Zip Binary
run: |
cd native
7z a -tzip dtlv-${{ github.event.release.tag_name }}-${{ matrix.os}}-amd64.zip dtlv
- name: Upload Binary
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: native/dtlv-${{ github.event.release.tag_name }}-${{ matrix.os }}-amd64.zip
overwrite: true