-
Notifications
You must be signed in to change notification settings - Fork 16
80 lines (67 loc) · 1.87 KB
/
main.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: yode
on: push
jobs:
build:
runs-on: >-
${{
(matrix.os == 'mac' && matrix.arch == 'arm64') &&
'macos-15' ||
(fromJson('{"linux":"ubuntu-22.04","mac":"macos-13","win":"windows-2022"}')[matrix.os])
}}
continue-on-error: false
strategy:
fail-fast: false
matrix:
os: [linux, mac, win]
arch: [x64]
include:
- os: mac
arch: arm64
steps:
- name: Install Linux Dependencies
if: matrix.os == 'linux'
run: |
sudo apt update
sudo apt-get install -y libgtk-3-dev
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: CCache
uses: hendrikmuhs/[email protected]
with:
max-size: '2G'
key: ccache-${{ matrix.os }}-${{ matrix.arch }}
- name: Build
env:
CCACHE_SLOPPINESS: time_macros
run: npx zx build.mjs ${{ matrix.arch }} --verbose
- name: Test
if: matrix.arch == runner.arch
env:
DISPLAY: ':99.0'
run: out/Release/yode test/main.js
- name: Upload Binary Files
uses: actions/upload-artifact@v4
with:
name: yode-${{ matrix.os }}-${{ matrix.arch }}
path: out/Release/*.zip
retention-days: 1
release:
if: startsWith(github.ref, 'refs/tags/')
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Download Files
uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Release
uses: softprops/action-gh-release@v2
with:
draft: true
name: Yode ${{ github.ref_name }}
body: '## Changelog'
files: '*.zip'