-
Notifications
You must be signed in to change notification settings - Fork 0
144 lines (137 loc) · 3.92 KB
/
ci.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
name: Build and Test or Release
on:
push:
branches:
- master
tags-ignore:
- '**'
paths-ignore:
- '**/*.md'
- LICENSE
pull_request:
jobs:
linux:
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.bump.outputs.bumped }}
changed-files: ${{ steps.bump.outputs.changed-files }}
steps:
- name: Checkout Sources
uses: actions/checkout@v4
- name: Setup V
uses: prantlf/setup-v-action@v2
- name: Bump version
id: bump
uses: prantlf/bump-version-action@v2
with:
bump-files: jsonlint.v
- name: Shelve changes
uses: prantlf/shelve-changes-action@v1
- name: Build and Test
run: make RELEASE=1
- name: Shelve output
uses: prantlf/shelve-output-action@v2
with:
enable: ${{ steps.bump.outputs.bumped }}
- name: Install ARM Cross-Compiler
run: |
sudo apt-get update
sudo apt-get install gcc gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
- name: Build ARM
run: make build RELEASE=1 LINUX_ARM=1
- name: Shelve output
uses: prantlf/shelve-output-action@v2
with:
enable: ${{ steps.bump.outputs.bumped }}
arch: arm64
macos:
needs:
- linux
runs-on: macos-latest
steps:
- name: Checkout Sources
uses: actions/checkout@v4
- name: Setup V
uses: prantlf/setup-v-action@v2
- name: Unshelve changes
if: ${{ needs.linux.outputs.changed == 'true' }}
uses: prantlf/unshelve-changes-action@v1
with:
files: ${{ needs.linux.outputs.changed-files }}
discard-shelf: false
- name: Build and Test
run: make RELEASE=1
- name: Shelve output
if: ${{ needs.linux.outputs.changed == 'true' }}
uses: prantlf/shelve-output-action@v2
- name: Build ARM
run: make build RELEASE=1 MACOS_ARM=1
- name: Shelve output
if: ${{ needs.linux.outputs.changed == 'true' }}
uses: prantlf/shelve-output-action@v2
with:
arch: arm64
windows:
needs:
- linux
runs-on: ubuntu-latest
steps:
- name: Checkout Sources
uses: actions/checkout@v4
- name: Setup V
uses: prantlf/setup-v-action@v2
- name: Unshelve changes
if: ${{ needs.linux.outputs.changed == 'true' }}
uses: prantlf/unshelve-changes-action@v1
with:
files: ${{ needs.linux.outputs.changed-files }}
discard-shelf: false
- name: Install Cross-Compiler
run: sudo apt-get install gcc-mingw-w64-x86-64
- name: Build Windows
run: make build RELEASE=1 WINDOWS=1
- name: Shelve output
if: ${{ needs.linux.outputs.changed == 'true' }}
uses: prantlf/shelve-output-action@v2
with:
os: windows
# windows:
# needs:
# - linux
# runs-on: windows-latest
# steps:
# - name: Checkout Sources
# uses: actions/checkout@v4
# - name: Setup V
# uses: prantlf/setup-v-action@v2
# - name: Unshelve changes
# if: ${{ needs.linux.outputs.changed == 'true' }}
# uses: prantlf/unshelve-changes-action@v1
# with:
# files: ${{ needs.linux.outputs.changed-files }}
# discard-shelf: false
# - name: Build
# run: cmd /c make.bat
# - name: Shelve output
# if: ${{ needs.linux.outputs.changed == 'true' }}
# uses: prantlf/shelve-output-action@v2
release:
if: ${{ github.ref_name == 'master' && needs.linux.outputs.changed == 'true' }}
needs:
- linux
- macos
- windows
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Unshelve changes
uses: prantlf/unshelve-changes-action@v1
with:
files: ${{ needs.linux.outputs.changed-files }}
- name: Unshelve output
uses: prantlf/unshelve-output-action@v5
- name: Publish release
uses: prantlf/finish-release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}