Skip to content

Commit 754a098

Browse files
authored
chore: 使用新的CI流程 (#11)
* fix: wine environment * fix: wine environment * fix: environment * perf: remove recommend * fix: env * Update release.yml * fix: permission of wcsc.exe * fix: 一处越界问题 * fix: pnpm install * fix: wine prepare * fix: wine cfg * feat: error console * fix: 兼容clang * perf: 调整位置 * perf: 带入环境 * fix: version * perf: log * fix: version check * fix: version
1 parent 002f1b4 commit 754a098

File tree

13 files changed

+1840
-62
lines changed

13 files changed

+1840
-62
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -106,33 +106,19 @@ jobs:
106106

107107
- name: Prepare
108108
run: |
109-
set -x -u -o pipefail
110-
source /etc/os-release
111-
112-
# Get rid of packages installed from ppa:ondrej/php so that we will be able to install wine32:i386 without conflicts
113-
# (see issue https://github.com/actions/virtual-environments/issues/4589)
114-
# In detail we:
115-
# 1. Remove all packages that ppa:ondrej/php has but plain Ubuntu doesn't, e.g. everything PHP
116-
# 2. Revert (remaining) packages that ppa:ondrej/php and plain Ubuntu share, back to the plain Ubuntu version
117-
# 3. Assert that no packages from ppa:ondrej/php are left installed
118-
dpkg -l | grep '^ii' | grep -F deb.sury.org | awk '{print $2}' | grep '^php' \
119-
| xargs -r -t sudo apt-get remove --yes libpcre2-posix3 libzip4
120-
dpkg -l | grep '^ii' | grep -F deb.sury.org | awk '{print $2}' | sed "s,\$,/${UBUNTU_CODENAME}," \
121-
| xargs -r -t sudo apt-get install --yes --no-install-recommends --allow-downgrades -V
122-
! dpkg -l | grep '^ii' | grep -F deb.sury.org
109+
set -x
123110
124111
sudo apt update
125-
sudo apt install -y wine64
126-
sudo apt-add-repository universe
112+
sudo apt upgrade -y
127113
sudo dpkg --add-architecture i386
128-
dpkg --print-foreign-architectures
129-
130-
sudo apt update
131-
sudo apt install libwine
132-
echo "install wine32..."
133-
sudo apt install wine32
134-
sudo apt-get install wine-binfmt
114+
sudo mkdir -pm755 /etc/apt/keyrings
115+
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
116+
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/jammy/winehq-jammy.sources
117+
sudo apt update
118+
sudo apt install winehq-stable -y
119+
sudo apt-get install wine-binfmt wine32 -y
135120
sudo update-binfmts --import /usr/share/binfmts/wine
121+
wine --version
136122
137123
corepack enable
138124
ls -l
@@ -144,20 +130,21 @@ jobs:
144130
chmod +x build/*
145131
ls -l build
146132
node -v
147-
pnpm install
133+
pnpm install --no-frozen-lockfile
148134
149135
- name: Test
150136
run: |
151137
ls -l test/wine
152138
# ./test/wine/wcc.exe
139+
sudo apt install -y xvfb curl
153140
pnpm run test-prepare
154-
sudo apt install -y xvfb
155141
ls -l build
156142
ls -l test/runner/nwjs/wcc/build/Release
143+
# fix: 预先运行,做一下配置,不然第一次执行会有问题
144+
./test/wine/wcc.exe || true
145+
./test/wine/wcc.exe -v || true
146+
# 需要wine64
157147
pnpm run test
158-
# - uses: ./.github/actions/test
159-
# with:
160-
# who-to-greet: 'Mona the Octocat'
161148
162149
upload:
163150
name: Create release and upload artifacts

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ node_modules
88
*err.js
99
*stderr.json
1010
.cache
11-
*/spec/**/*output.js
11+
*/spec/**/*output.js
12+
tmp

0 commit comments

Comments
 (0)