-
Notifications
You must be signed in to change notification settings - Fork 0
182 lines (169 loc) · 4.94 KB
/
baboon-build.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
name: Baboon Build
on:
push:
branches: [ "main" ]
tags:
- "v*.*.*"
pull_request:
branches: [ "main" ]
permissions:
contents: write
jobs:
build-linux:
strategy:
fail-fast: false
matrix:
# 1) don't forget about os entry in prepare-release
# 2) see : https://github.com/actions/runner-images
include:
- target: linux-amd64
os: ubuntu-latest
runs-on: [ ]
java-version: '23'
- target: linux-aarch64
os: self-hosted
runs-on: [ "ARM64" ]
preconfigured: true
name: ${{ matrix.target }}
runs-on:
- ${{ matrix.os }}
- ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- name: Cache Nix store
uses: actions/cache@v3
with:
path: |
/nix/store
key: nix-${{ matrix.target }}
- name: Install Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Build (linux)
run: nix-shell --pure ./shell.nix --run ./build.sh
- uses: actions/upload-artifact@v4
with:
name: baboon-${{ matrix.target }}
path: |
target/graalvm-native-image/**
build-windows:
strategy:
fail-fast: false
matrix:
# 1) don't forget about os entry in prepare-release
# 2) see : https://github.com/actions/runner-images
include:
- target: windows-amd64
os: windows-2022
runs-on: [ ]
java-version: '23'
name: ${{ matrix.target }}
runs-on:
- ${{ matrix.os }}
- ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- name: Set up GraalVM (Java ${{ matrix.java-version }})
uses: graalvm/setup-graalvm@v1
with:
java-version: '${{ matrix.java-version }}'
distribution: 'graalvm-community'
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: 'sbt'
native-image-job-reports: true
- name: Build (windows)
shell: bash
run: bash ./test.sh
- uses: actions/upload-artifact@v4
with:
name: baboon-${{ matrix.target }}
path: |
target/graalvm-native-image/**
build-mac:
strategy:
fail-fast: false
matrix:
# 1) don't forget about os entry in prepare-release
# 2) see : https://github.com/actions/runner-images
include:
- target: macos-aarch64-14
runs-on: [ ]
os: macos-14 # yes, this is aarch64
java-version: '23'
- target: macos-amd64-13
os: macos-13 # this is amd64
runs-on: [ ]
java-version: '23'
name: ${{ matrix.target }}
runs-on:
- ${{ matrix.os }}
- ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- name: Set up GraalVM (Java ${{ matrix.java-version }})
uses: graalvm/setup-graalvm@v1
with:
java-version: '${{ matrix.java-version }}'
distribution: 'graalvm-community'
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: 'sbt'
native-image-job-reports: true
- name: Cache Nix store
uses: actions/cache@v3
with:
path: |
/nix/store
key: nix-${{ matrix.target }}
- name: Install Nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
# - name: Build NI (linux)
# if: matrix.notunix != true && matrix.nix-impure != true
# run: nix-shell --pure ./shell.nix --run "sbt GraalVMNativeImage/packageBin"
# - name: Build NI (macos)
# if: matrix.notunix != true && matrix.nix-impure == true
# run: nix-shell --impure ./shell.nix --run "sbt GraalVMNativeImage/packageBin"
# - name: Build NI (windows)
# if: matrix.notunix == true
# shell: bash
# run: sbt GraalVMNativeImage/packageBin
#
# - uses: actions/upload-artifact@v4
# with:
# name: baboon-${{ matrix.target }}
# path: |
# target/graalvm-native-image/**
- name: Build (macos)
#run: nix-shell --impure ./shell.nix --run ./test.sh
shell: bash
run: bash ./test.sh
- uses: actions/upload-artifact@v4
with:
name: baboon-${{ matrix.target }}
path: |
target/graalvm-native-image/**
prepare-release:
runs-on: ubuntu-latest
needs:
- build-linux
- build-windows
- build-mac
steps:
- uses: actions/checkout@v4
- name: Download All Artifacts
uses: actions/download-artifact@v4
with:
path: binaries
pattern: baboon-*
- name: Prepare layout
run: |
bash prepare-dist.sh ./binaries
- uses: softprops/action-gh-release@v2
id: create-release
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist-bin/**
dist-zip/**