-
Notifications
You must be signed in to change notification settings - Fork 0
197 lines (194 loc) · 5.23 KB
/
ikvm-native-sdk.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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
name: ikvm-native-sdk
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
release:
types:
- created
jobs:
build-win:
name: Build (win)
runs-on: ubuntu-latest
timeout-minutes: 240
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install
run: |
sudo apt-get update &&
sudo apt-get install -y zip unzip curl wget
- name: Cache (xwin)
uses: actions/cache@v4
with:
path: /tmp/xwincache
key: tmp--xwincache--${{ matrix.rid }}--${{ runner.os }}--${{ hashFiles('win/build.sh') }}-1
- name: Build
run: win/build.sh
- name: Package (win)
run: tar czvf /tmp/win.tar.gz win
working-directory: dist
- name: Upload (win)
uses: actions/upload-artifact@v4
with:
name: win
path: /tmp/win.tar.gz
- name: Package (win.ci)
run: tar czvf /tmp/win.ci.tar.gz win.ci
working-directory: dist
- name: Upload (win.ci)
uses: actions/upload-artifact@v4
with:
name: win.ci
path: /tmp/win.ci.tar.gz
build-linux:
strategy:
matrix:
rid:
- linux-x64
- linux-musl-x64
- linux-arm
- linux-musl-arm
- linux-arm64
- linux-musl-arm64
name: Build (${{ matrix.rid }})
runs-on: ubuntu-latest
timeout-minutes: 240
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache
uses: actions/cache@v4
with:
path: dist/${{ matrix.rid }}
key: dist--${{ matrix.rid }}--${{ runner.os }}--${{ hashFiles('linux/build.sh', 'linux/*/.config', 'linux/*/sdk.config') }}-1
- name: Check
id: dist-linux-stamp
uses: andstor/file-existence-action@v3
with:
files: dist/${{ matrix.rid }}/stamp
- name: Install
if: steps.dist-linux-stamp.outputs.files_exists != 'true'
run: |
sudo apt-get update &&
sudo apt-get install -y \
build-essential fakeroot \
gcc g++ \
ninja-build zip unzip curl wget \
help2man bison flex libtool libtool-bin patch libstdc++6 rsync git meson xutils-dev xz-utils texinfo symlinks \
autopoint gettext gperf expat \
libx11-dev
- name: Build
if: steps.dist-linux-stamp.outputs.files_exists != 'true'
run: linux/build.sh ${{ matrix.rid }} && touch dist/${{ matrix.rid }}/stamp
- name: Package
run: tar czvf /tmp/${{ matrix.rid }}.tar.gz ${{ matrix.rid }}
working-directory: dist
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.rid }}
path: /tmp/${{ matrix.rid }}.tar.gz
build-osx:
name: Build (osx)
runs-on: ubuntu-latest
timeout-minutes: 240
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: dist/osx
key: dist--osx--${{ runner.os }}--${{ hashFiles('osx/build.sh') }}-1
- name: Check
id: dist-osx-stamp
uses: andstor/file-existence-action@v3
with:
files: dist/osx/stamp
- name: Install
if: steps.dist-osx-stamp.outputs.files_exists != 'true'
run: |
sudo apt-get update &&
sudo apt-get install -y zip unzip curl
- name: Build
if: steps.dist-osx-stamp.outputs.files_exists != 'true'
run: osx/build.sh && touch dist/osx/stamp
- name: Package
run: tar czvf /tmp/osx.tar.gz osx
working-directory: dist
- name: Upload
uses: actions/upload-artifact@v4
with:
name: osx
path: /tmp/osx.tar.gz
release:
name: Release
if: github.event_name != 'pull_request'
needs:
- build-win
- build-linux
- build-osx
runs-on: ubuntu-latest
steps:
- name: Download (win)
uses: actions/download-artifact@v4
with:
name: win
path: dist
- name: Download (win.ci)
uses: actions/download-artifact@v4
with:
name: win.ci
path: dist
- name: Download (linux-x64)
uses: actions/download-artifact@v4
with:
name: linux-x64
path: dist
- name: Download (linux-musl-x64)
uses: actions/download-artifact@v4
with:
name: linux-musl-x64
path: dist
- name: Download (linux-arm64)
uses: actions/download-artifact@v4
with:
name: linux-arm64
path: dist
- name: Download (linux-musl-arm64)
uses: actions/download-artifact@v4
with:
name: linux-musl-arm64
path: dist
- name: Download (linux-arm)
uses: actions/download-artifact@v4
with:
name: linux-arm
path: dist
- name: Download (linux-musl-arm)
uses: actions/download-artifact@v4
with:
name: linux-musl-arm
path: dist
- name: Download (osx)
uses: actions/download-artifact@v4
with:
name: osx
path: dist
- name: Create Release
if: github.ref_type == 'tag'
uses: ncipollo/release-action@v1
with:
tag: ${{ github.ref_name }}
allowUpdates: true
artifacts: dist/*.tar.gz
draft: false
makeLatest: true
token: ${{ secrets.GITHUB_TOKEN }}