-
Notifications
You must be signed in to change notification settings - Fork 15
94 lines (79 loc) · 2.6 KB
/
booker.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
on: push
jobs:
build-and-upload:
name: build and upload
strategy:
matrix:
# os: [macos, ubuntu, windows]
os: [windows]
include:
# - os: ubuntu
# gu-binary: gu
# artifact-name: booker
# asset-name: booker-linux-amd64
# - os: macos
# gu-binary: gu
# artifact-name: booker
# asset-name: booker-macos-amd64
- os: windows
runs-on: windows-latest
gu-binary: gu.cmd
artifact-name: booker.exe
asset-name: booker-windows-amd64.exe
runs-on: ${{ matrix.runs-on }}
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup GraalVM
uses: DeLaGuardo/[email protected]
with:
graalvm: 21.2.0
java: java11
arch: amd64
- name: install native-image
run: ${{ matrix.gu-binary }} install native-image
- name: Install msvc-dev
if: matrix.os == 'windows'
uses: ilammy/[email protected]
- name: Install msbuild
if: matrix.os == 'windows'
uses: microsoft/[email protected]
- name: Cache Coursier
if: matrix.os == 'windows'
uses: coursier/cache-action@v6
- name: Setup Coursier
if: matrix.os == 'windows'
uses: coursier/setup-action@v1
with:
apps: sbt
- name: build for windows
if: matrix.os == 'windows'
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
sbt graalvm-native-image:packageBin
- name: build for linux or mac
if: matrix.os != 'windows'
run: |
./bin/sbt graalvm-native-image:packageBin
- name: run upx on ${{ matrix.os }}
uses: svenstaro/upx-action@v2
with:
file: target/graalvm-native-image/${{matrix.artifact-name}}
args: --best --lzma
- name: verify booker by running it
run: |
target/graalvm-native-image/${{matrix.artifact-name}}
- name: upload ${{ matrix.os }}
uses: actions/upload-artifact@v2
with:
name: booker-${{ matrix.os }}
path: target/graalvm-native-image/${{matrix.artifact-name}}
- name: release binaries
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/graalvm-native-image/${{matrix.artifact-name}}
asset_name: ${{ matrix.asset-name }}
tag: ${{ github.ref }}
overwrite: true