-
Notifications
You must be signed in to change notification settings - Fork 16
209 lines (192 loc) · 5.76 KB
/
lkms.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
198
199
200
201
202
203
204
205
206
207
208
209
#
# Copyright (C) 2022 Ing <https://github.com/wjz304>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
name: Build lkms
on:
workflow_dispatch:
inputs:
version:
description: "format %y.%-m.$i or auto"
required: false
type: string
prerelease:
description: "pre release"
default: false
type: boolean
jobs:
build:
strategy:
matrix:
include:
- version: 6.2
platform: apollolake
- version: 6.2
platform: braswell
- version: 6.2
platform: broadwell
- version: 6.2
platform: broadwellnk
- version: 6.2
platform: broadwellntbap
- version: 6.2
platform: bromolow
- version: 6.2
platform: denverton
# checkout 6.2.4
- version: 6.2
platform: geminilake
# checkout 6.2.4
- version: 6.2
platform: grantley
# checkout 6.2.4
- version: 6.2
platform: kvmx64
# checkout 6.2.4
- version: 6.2
platform: purley
# checkout 6.2.4
- version: 6.2
platform: v1000
- version: 7.1
platform: apollolake
- version: 7.1
platform: braswell
- version: 7.1
platform: broadwell
- version: 7.1
platform: broadwellnk
- version: 7.1
platform: broadwellnkv2
- version: 7.1
platform: broadwellntbap
- version: 7.1
platform: bromolow
- version: 7.1
platform: denverton
- version: 7.1
platform: epyc7002
- version: 7.1
platform: geminilake
- version: 7.1
platform: grantley
- version: 7.1
platform: kvmx64
- version: 7.1
platform: purley
- version: 7.1
platform: r1000
- version: 7.1
platform: v1000
- version: 7.2
platform: apollolake
- version: 7.2
platform: braswell
- version: 7.2
platform: broadwell
- version: 7.2
platform: broadwellnk
- version: 7.2
platform: broadwellnkv2
- version: 7.2
platform: broadwellntbap
#- version: 7.2
# platform: bromolow
- version: 7.2
platform: denverton
- version: 7.2
platform: epyc7002
- version: 7.2
platform: geminilake
- version: 7.2
platform: grantley
- version: 7.2
platform: kvmx64
- version: 7.2
platform: purley
- version: 7.2
platform: r1000
- version: 7.2
platform: v1000
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Checkout
uses: actions/checkout@main
with:
repository: RROrg/rr-lkms
token: ${{ secrets.RRORG }}
path: rr-lkms
- name: Init Env
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
sudo timedatectl set-timezone "Asia/Shanghai"
- name: Make lkms
run: |
. rr-lkms/compile.sh
echo "----------------- Env -----------------"
makeEnvDeploy ${{ github.workspace }} ${{ matrix.version }} ${{ matrix.platform }}
echo "----------------- Make -----------------"
makelkms ${{ github.workspace }} ${{ matrix.version }} ${{ matrix.platform }} rr-lkms output
- name: Upload to Artifacts
uses: actions/upload-artifact@v3
with:
name: rp-lkms
path: |
output/*
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@main
- name: Calculate version
run: |
# Calculate version
VERSION=""
if [ -n "${{ inputs.version }}" ]; then
if [ "$(echo ${{ inputs.version }} | cut -d '.' -f 1,2)" = "$(date +'%y.%-m')" ]; then
VERSION="${{ inputs.version }}"
else
LATEST_TAG="$(curl -skLH "Authorization: token ${{ secrets.RRORG }}" "https://api.github.com/repos/RROrg/rr-lkms/releases" | jq -r ".[0].tag_name" 2>/dev/null)"
if [ -n "${LATEST_TAG}" -a "$(echo ${LATEST_TAG} | cut -d '.' -f 1,2)" = "$(date +'%y.%-m')" ]; then # format %y.%-m.$i
VERSION="$(echo ${LATEST_TAG} | awk -F '.' '{$3=$3+1}1' OFS='.')"
else
VERSION="$(date +'%y.%-m').0"
fi
fi
else
VERSION=""
fi
echo "VERSION: ${VERSION}"
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: download to artifacts
if: env.VERSION != ''
uses: actions/download-artifact@v3
with:
name: rp-lkms
path: ./rp-lkms
- name: delete-artifact
if: env.VERSION != ''
uses: geekyeggo/delete-artifact@v2
with:
name: rp-lkms
- name: Zip lkms
if: env.VERSION != ''
run: |
echo "${{ env.VERSION }}" > "rp-lkms/VERSION"
zip -9 rp-lkms.zip -j rp-lkms/*
- name: Release
if: env.VERSION != ''
uses: ncipollo/release-action@v1
with:
tag: ${{ env.VERSION }}
prerelease: ${{ inputs.prerelease }}
artifacts: rp-lkms.zip
owner: RROrg
repo: rr-lkms
token: ${{ secrets.RRORG }}