Skip to content

Commit a3796de

Browse files
authored
ci: windows stable & canary, debug linux
1 parent 6182754 commit a3796de

1 file changed

Lines changed: 57 additions & 92 deletions

File tree

.github/workflows/nightly.yml

Lines changed: 57 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ jobs:
3636
retention-days: 1
3737

3838

39-
test-linux:
40-
name: Test Linux
39+
test-linux-stable:
40+
name: Test Linux Stable
4141

4242
needs: build
4343
runs-on: ubuntu-latest
@@ -57,20 +57,21 @@ jobs:
5757
5858
- name: Download Client with OpenAsar
5959
run: |
60-
wget "https://discord.com/api/download/canary?platform=linux&format=tar.gz" -O discord.tar.gz
60+
wget "https://discord.com/api/download/stable?platform=linux&format=tar.gz" -O discord.tar.gz
6161
tar xf discord.tar.gz
62-
cp app.asar DiscordCanary/resources/app.asar
62+
cp app.asar Discord/resources/app.asar
6363
6464
- name: Check if Discord will startup
6565
run: |
66-
coproc { xvfb-run -e /dev/stdout ./DiscordCanary/DiscordCanary --enable-logging; }
67-
grep -m1 "Finished discord_rpc" <&${COPROC[0]}
68-
sleep 1
69-
[[ $COPROC_PID ]] && kill $COPROC_PID
66+
# coproc { xvfb-run -e /dev/stdout ./Discord/Discord --enable-logging; }
67+
# grep -m1 "Finished discord_rpc" <&${COPROC[0]}
68+
# sleep 1
69+
# [[ $COPROC_PID ]] && kill $COPROC_PID
70+
./Discord/Discord --enable-logging
7071
timeout-minutes: 3
7172

72-
test-win:
73-
name: Test Windows
73+
test-win-stable:
74+
name: Test Windows Stable
7475

7576
needs: build
7677
runs-on: windows-latest
@@ -108,20 +109,58 @@ jobs:
108109
cd discord/app-1.0.0
109110
mkdir modules
110111
111-
# - name: Upload artifact
112-
# uses: actions/upload-artifact@v2
113-
# with:
114-
# name: testing
115-
# path: app.asar
116-
# retention-days: 1
117-
118112
- name: Check if Discord will startup
119113
run: |
120114
cd discord/app-1.0.0
121115
./Discord.exe | grep -m1 "ABRA"
122116
timeout-minutes: 3
123117
shell: bash
124118

119+
test-win-canary:
120+
name: Test Windows Canary
121+
122+
needs: build
123+
runs-on: windows-latest
124+
125+
steps:
126+
- uses: actions/checkout@v2
127+
128+
- name: Setup Node.js v20.x
129+
uses: actions/setup-node@v2
130+
with:
131+
node-version: 20.x
132+
133+
- name: Retrieve artifact
134+
uses: actions/download-artifact@v4
135+
with:
136+
name: built-asar
137+
path: artifact
138+
139+
- name: Extract artifact
140+
run: |
141+
cp artifact/app.asar .
142+
143+
- name: Setup Client
144+
shell: bash
145+
run: |
146+
node scripts/downloadWin.js canary
147+
tar xf client.tar
148+
149+
# Install OpenAsar build and setup environment
150+
sed -r -i "s/const config=require\('.\/config'\);/console.log\('ABRA'\);app.quit\(\); /" app.asar
151+
sed -r -i "s/if\(next!=cur&&!options\?\.allowObsoleteHost\)/if\(false\) /" app.asar
152+
cp -f app.asar files/resources/app.asar
153+
mkdir discord
154+
cp -rf files/ discord/app-1.0.0
155+
cd discord/app-1.0.0
156+
mkdir modules
157+
158+
- name: Check if Discord will startup
159+
run: |
160+
cd discord/app-1.0.0
161+
./DiscordCanary.exe | grep -m1 "ABRA"
162+
timeout-minutes: 3
163+
shell: bash
125164

126165
release:
127166
name: Release
@@ -156,78 +195,4 @@ jobs:
156195
env:
157196
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
158197
VERSION: 'nightly'
159-
FILES: app.asar
160-
161-
# debug-linux:
162-
# name: Debug Linux
163-
164-
# needs: build
165-
# runs-on: ubuntu-latest
166-
167-
# steps:
168-
# - uses: actions/checkout@v2
169-
170-
# - name: Retrieve artifact
171-
# uses: actions/download-artifact@v2
172-
# with:
173-
# name: built-asar
174-
# path: artifact
175-
176-
# - name: Extract artifact
177-
# run: |
178-
# cp artifact/app.asar .
179-
180-
# - name: Download Client with OpenAsar
181-
# run: |
182-
# wget "https://discord.com/api/download/canary?platform=linux&format=tar.gz" -O discord.tar.gz
183-
# tar xf discord.tar.gz
184-
# cp app.asar DiscordCanary/resources/app.asar
185-
186-
# - name: Run Client
187-
# run: |
188-
# xvfb-run -e /dev/stdout ./DiscordCanary/DiscordCanary --enable-logging 2>&1
189-
# timeout-minutes: 5
190-
191-
# debug-win:
192-
# name: Debug Windows
193-
194-
# needs: build
195-
# runs-on: windows-latest
196-
197-
# steps:
198-
# - uses: actions/checkout@v2
199-
200-
# - name: Setup Node.js v16.x
201-
# uses: actions/setup-node@v2
202-
# with:
203-
# node-version: 16.x
204-
205-
# - name: Retrieve artifact
206-
# uses: actions/download-artifact@v2
207-
# with:
208-
# name: built-asar
209-
# path: artifact
210-
211-
# - name: Extract artifact
212-
# run: |
213-
# cp artifact/app.asar .
214-
215-
# - name: Setup Client
216-
# shell: bash
217-
# run: |
218-
# node scripts/downloadWin.js
219-
# tar xf client.tar
220-
221-
# # Install OpenAsar build and setup environment
222-
# cp -f app.asar files/resources/app.asar
223-
# mkdir discord
224-
# cp -rf files/ discord/app-1.0.0
225-
# cd discord/app-1.0.0
226-
# mkdir modules
227-
228-
# - name: Run Client
229-
# run: |
230-
# cd discord/app-1.0.0
231-
# ./DiscordCanary.exe --enable-logging
232-
# timeout-minutes: 5
233-
# shell: bash
198+
FILES: app.asar

0 commit comments

Comments
 (0)