-
Notifications
You must be signed in to change notification settings - Fork 2
183 lines (164 loc) · 6.7 KB
/
Copy pathbuild-rootfs-docker.yml
File metadata and controls
183 lines (164 loc) · 6.7 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
name: Winlator Rootfs Build (use Docker)
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: false
default: ""
inputWineAmd64URL:
description: "输入 Wine AMD64 下载 URL:"
required: false
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: Docker
run: |
mkdir /tmp/archlinux/
sudo docker run -itd --name arch -v /tmp/archlinux/tmp2:/tmp waim908/archlinuxarm:wlt bash || { echo 容器创建失败 && exit 1;}
cd /tmp
git clone --depth=1 https://github.com/Waim908/rootfs-winlator.git
sudo chmod 777 rootfs-winlator/*
sudo cp rootfs-winlator/build-rootfs.sh /tmp/archlinux/tmp2
sudo mv rootfs-winlator/data.tar.xz /tmp/archlinux/tmp2
sudo mv rootfs-winlator/tzdata-*-1-aarch64.pkg.tar.xz /tmp/archlinux/tmp2
sudo mv rootfs-winlator/patches /tmp/archlinux/tmp2
sudo mv rootfs-winlator/mangohud.tar.xz /tmp/archlinux/tmp2
# 复制 ccache 缓存
if [[ -f /tmp/ccache.tar.xz ]]; then
echo "复制 ccache 到 chroot 环境..."
sudo cp /tmp/ccache.tar.xz /tmp/archlinux/tmp2/
fi
sudo cat > /tmp/archlinux/tmp2/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
EOF
sudo chmod 777 /tmp/archlinux/tmp2/init.sh
sudo docker exec arch bash -x /tmp/build-rootfs.sh || exit 1
sudo chmod 644 /tmp/archlinux/tmp2/output/*
- name: Copy ccache from docker
run: |
# 从 docker 环境中复制打包好的 ccache
if [[ -f /tmp/archlinux/tmp2/ccache.tar.xz ]]; then
echo "复制 ccache 从 chroot 环境..."
sudo cp /tmp/archlinux/tmp2/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 "警告: docker 环境中没有找到 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.tzst` put to apk/assets/imagefs.tzst
files: |
/tmp/archlinux/tmp2/output/output-lite-${{ github.event.inputs.inputCustomTag }}.tar.xz
/tmp/archlinux/tmp2/output/output-full-${{ github.event.inputs.inputCustomTag }}.tar.xz
/tmp/archlinux/tmp2/output/imagefs-${{ github.event.inputs.inputCustomTag }}.tzst
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}