-
Notifications
You must be signed in to change notification settings - Fork 2
194 lines (182 loc) · 7.46 KB
/
Copy pathbuild-rootfs.yml
File metadata and controls
194 lines (182 loc) · 7.46 KB
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
name: Winlator Rootfs Build (use BCC)
permissions:
contents: write
# https://xorg.freedesktop.org/archive/individual/data/xkeyboard-config/
# https://xorg.freedesktop.org/releases/individual/lib/
on:
workflow_dispatch:
inputs:
inputGstVersion:
description: "输入gstreamer版本:"
required: true
default: "1.28.1"
inputXzVersion:
description: "输入xz版本:"
required: true
default: "v5.8.1"
inputFlacVersion:
description: "输入flac版本:"
required: true
default: "1.5.0"
inputXkbcommonVersion:
description: "输入xkbcommon的版本:"
required: true
default: "xkbcommon-1.13.0"
inputMangohudVersion:
description: "输入MangoHud版本:"
required: true
default: "cmod"
inputGlibVersion:
description: "输入glib版本:"
required: true
default: "2.86.3"
# inputMonoVersion:
# description: "mono版本:"
# required: true
# default: "10.3.0"
# inputGeckoVersion:
# description: "gecko:版本:"
# required: true
# default: "2.47.4"
inputCustomTag:
description: "输入自定义Tag名称:"
required: true
default: "glibc2.39-"
inputWineArm64ecURL:
description: "输入 Wine ARM64EC 下载 URL:"
required: true
default: ""
inputWineAmd64URL:
description: "输入 Wine AMD64 下载 URL:"
required: true
default: ""
env:
gstVer: ${{ github.event.inputs.inputGstVersion }}
xzVer: ${{ github.event.inputs.inputXzVersion }}
xkbcommonVer: ${{ github.event.inputs.inputXkbcommonVersion }}
mangohudVer: ${{ github.event.inputs.inputMangohudVersion }}
customTag: ${{ github.event.inputs.inputCustomTag }}
glibVer: ${{ github.event.inputs.inputGlibVersion }}
flacVer: ${{ github.event.inputs.inputFlacVersion }}
wineArm64ecURL: ${{ github.event.inputs.inputWineArm64ecURL }}
wineAmd64URL: ${{ github.event.inputs.inputWineAmd64URL }}
#monoVer: ${{ github.event.inputs.inputMonoVersion }}
#geckoVer: ${{ github.event.inputs.inputGeckoVersion }}
jobs:
BCC:
runs-on: ubuntu-24.04-arm
steps:
- name: Restore ccache
id: restore-ccache
uses: actions/cache/restore@v4
with:
path: /tmp/ccache.tar.xz
key: ccache-${{ github.event.inputs.inputGstVersion }}-${{ github.event.inputs.inputGlibVersion }}-${{ github.event.inputs.inputXzVersion }}
restore-keys: |
ccache-${{ github.event.inputs.inputGstVersion }}-
ccache-
- name: Check ccache exists
run: |
if [[ -f /tmp/ccache.tar.xz ]]; then
echo "ccache 缓存已恢复"
ls -lh /tmp/ccache.tar.xz
else
echo "ccache 缓存不存在,将创建新的缓存"
fi
- name: BCC
run: |
echo "gstreamer ${gstVer}"
curl -L -O "https://github.com/Waim908/BCC/releases/download/wlt-bcc-latest/wlt-bcc.tar.xz"
sudo tar xf wlt-bcc.tar.xz -C /tmp
cd /tmp
git clone https://github.com/Waim908/rootfs-winlator.git
sudo cp rootfs-winlator-glibc/build-rootfs.sh /tmp/archlinux/bin
mv rootfs-winlator-glibc/data.tar.xz /tmp/archlinux/tmp
mv rootfs-winlator-glibc/tzdata-*-1-aarch64.pkg.tar.xz /tmp/archlinux/tmp
mv rootfs-winlator-glibc/patches /tmp/archlinux/tmp
mv rootfs-winlator-glibc/mangohud.tar.xz /tmp/archlinux/tmp
# mv rootfs-winlator-glibc/lame-3.100 /tmp/archlinux/tmp
# 复制 ccache 缓存到 chroot 环境(如果存在)
if [[ -f /tmp/ccache.tar.xz ]]; then
echo "复制 ccache 到 chroot 环境..."
sudo cp /tmp/ccache.tar.xz /tmp/archlinux/tmp/
fi
sudo chmod +x /tmp/archlinux/bin/build-rootfs.sh
# sudo chmod 777 /tmp/archlinux/tmp
# cd /tmp/archlinux/tmp
# git clone -b ${gstVer} https://gitlab.freedesktop.org/gstreamer/gstreamer.git gstreamer-src
# cd /tmp
cat > /tmp/archlinux/tmp/init.sh << EOF
export gstVer=$gstVer
export xzVer=$xzVer
export xkbcommonVer=$xkbcommonVer
export mangohudVer=$mangohudVer
export customTag=$customTag
export flacVer=$flacVer
export glibVer=$glibVer
export wineArm64ecURL=$wineArm64ecURL
export wineAmd64URL=$wineAmd64URL
#export monoVer=$monoVer
#export geckoVer=$geckoVer
EOF
# echo "export gstVer=$gstVer" > /tmp/archlinux/tmp/init.sh
# echo "export xzVer=$xzVer" >> /tmp/archlinux/tmp/init.sh
# echo "export vorbisVer=$vorbisVer" >> /tmp/archlinux/tmp/init.sh
sudo mount --bind /proc archlinux/proc
sudo mount --bind /sys archlinux/sys
sudo mount --bind /dev archlinux/dev
if ! sudo chroot /tmp/archlinux /bin/build-rootfs.sh; then
echo "失败"
exit 1
fi
sudo umount -l archlinux/dev
sudo umount -l archlinux/sys
sudo umount -l archlinux/proc
- name: Copy ccache from chroot
run: |
# 从 chroot 环境中复制打包好的 ccache
if [[ -f /tmp/archlinux/tmp/ccache.tar.xz ]]; then
echo "复制 ccache 从 chroot 环境..."
sudo cp /tmp/archlinux/tmp/ccache.tar.xz /tmp/ccache-new.tar.xz
sudo chmod 777 /tmp/ccache-new.tar.xz
ls -lh /tmp/ccache-new.tar.xz
else
echo "警告: chroot 环境中没有找到 ccache.tar.xz"
fi
- name: Save ccache
if: always()
uses: actions/cache/save@v4
with:
path: /tmp/ccache-new.tar.xz
key: ccache-${{ github.event.inputs.inputGstVersion }}-${{ github.event.inputs.inputGlibVersion }}-${{ github.event.inputs.inputXzVersion }}-${{ github.run_id }}
# - name: Package
# run: |
# cd /tmp/archlinux/data/data/com.termux/files/usr
# tar -I "xz -T$(nproc)" -cvf /tmp/gstreamer-${gstVer}.tar.xz glibc/
- name: Create Release
uses: softprops/action-gh-release@v2
with:
name: rootfs-${{ github.event.inputs.inputCustomTag }}
draft: false
prerelease: false
tag_name: rootfs-${{ github.event.inputs.inputCustomTag }}
body: |
xz=> ${{ github.event.inputs.inputXzVersion }}
libFLAC=> ${{ github.event.inputs.inputFlacVersion }}
gstreamer=> ${{ github.event.inputs.inputGstVersion }}
xkbcommon=> ${{ github.event.inputs.inputXkbcommonVersion }}
glib=> ${{ github.event.inputs.inputGlibVersion }}
MangoHud=> ${{ github.event.inputs.inputMangohudVersion }}
customTag=> ${{ github.event.inputs.inputCustomTag }}
...
run on winlator 7.1.6+
wine amd64:
wine arm64:
more info look '_version_.txt' for imagefs
Rename to `imagefs.txz` put to apk/assets/imagefs.txz
files: |
/tmp/archlinux/tmp/output/output-lite-${{ github.event.inputs.inputCustomTag }}.tar.xz
/tmp/archlinux/tmp/output/output-full-${{ github.event.inputs.inputCustomTag }}.tar.xz
/tmp/archlinux/tmp/output/imagefs-${{ github.event.inputs.inputCustomTag }}.tzst
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}