Skip to content

Commit cdf5fd7

Browse files
committed
run tests on more API levels, build promo screen sperately
1 parent 5ea60e8 commit cdf5fd7

File tree

1 file changed

+67
-42
lines changed

1 file changed

+67
-42
lines changed

.github/workflows/bobtests_linux.yml

Lines changed: 67 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,72 @@ on:
1515
default: dummy
1616

1717
jobs:
18+
android-linux-promo_screens:
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: write
22+
if: ${{ true }}
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: install deps
26+
run: |
27+
sudo apt-get update && \
28+
sudo DEBIAN_FRONTEND=noninteractive \
29+
apt-get install -y --no-install-recommends \
30+
fonts-freefont-otf \
31+
adb \
32+
ghostscript \
33+
imagemagick \
34+
ca-certificates
35+
36+
- name: check imagemagick
37+
run: |
38+
convert -list font || echo "NO ERR"
39+
40+
- name: make promo screenshots 1
41+
run: |
42+
pwd
43+
git clone https://github.com/zoff99/android_promo_screens
44+
cd ./android_promo_screens/
45+
./test.sh "TRIfA" "Message your Friends and Family securely and with ease." /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/test_outputfiles/test_004b.png
46+
cp -av output.png promo_02.png
47+
mv -v promo_02.png ../
48+
./test.sh "TRIfA" "Send Messages and Files or just Call your Friends." /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/test_outputfiles/test_099.png
49+
cp -av output.png promo_03.png
50+
mv -v promo_03.png ../
51+
52+
- name: make promo screenshots 2
53+
run: |
54+
cd ./android_promo_screens/
55+
./test2.sh "TRIfA" "Message your Friends and Family securely and with ease." /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/images/101.png
56+
cp -av output.png promo_101.png
57+
mv -v promo_101.png ../
58+
./test2.sh "TRIfA" "Send Messages and Files or just Call your Friends." /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/images/102.png
59+
cp -av output.png promo_102.png
60+
mv -v promo_102.png ../
61+
62+
- name: Upload to nightly release
63+
uses: ncipollo/release-action@v1
64+
if: github.event_name == 'push' && github.ref == 'refs/heads/zoff99/dev003'
65+
with:
66+
allowUpdates: true
67+
tag: nightly
68+
omitBodyDuringUpdate: true
69+
omitNameDuringUpdate: true
70+
prerelease: true
71+
replacesArtifacts: true
72+
token: ${{ secrets.GITHUB_TOKEN }}
73+
artifacts: "promo_02.png,promo_03.png,promo_101.png,promo_102.png"
74+
75+
76+
77+
78+
1879
android-linux-test_bob:
1980
runs-on: ubuntu-latest
2081
strategy:
2182
matrix:
22-
api-level: [29]
83+
api-level: [35, 33, 29, 21]
2384
permissions:
2485
contents: write
2586
if: ${{ true }}
@@ -123,42 +184,6 @@ jobs:
123184
echo "---------------"
124185
ls -al /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/test_outputfiles/*.png
125186
126-
- name: make promo screenshots 1
127-
run: |
128-
pwd
129-
git clone https://github.com/zoff99/android_promo_screens
130-
cd ./android_promo_screens/
131-
./test.sh "TRIfA" "Message your Friends and Family securely and with ease." /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/test_outputfiles/test_004b.png
132-
cp -av output.png promo_02.png
133-
mv -v promo_02.png ../
134-
./test.sh "TRIfA" "Send Messages and Files or just Call your Friends." /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/test_outputfiles/test_099.png
135-
cp -av output.png promo_03.png
136-
mv -v promo_03.png ../
137-
138-
- name: make promo screenshots 2
139-
run: |
140-
cd ./android_promo_screens/
141-
./test2.sh "TRIfA" "Message your Friends and Family securely and with ease." /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/images/101.png
142-
cp -av output.png promo_101.png
143-
mv -v promo_101.png ../
144-
./test2.sh "TRIfA" "Send Messages and Files or just Call your Friends." /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/images/102.png
145-
cp -av output.png promo_102.png
146-
mv -v promo_102.png ../
147-
148-
- name: Upload to nightly release
149-
uses: ncipollo/release-action@v1
150-
if: github.event_name == 'push' && github.ref == 'refs/heads/zoff99/dev003'
151-
with:
152-
allowUpdates: true
153-
tag: nightly
154-
omitBodyDuringUpdate: true
155-
omitNameDuringUpdate: true
156-
prerelease: true
157-
replacesArtifacts: true
158-
token: ${{ secrets.GITHUB_TOKEN }}
159-
artifacts: "promo_02.png,promo_03.png,promo_101.png,promo_102.png"
160-
161-
162187
- name: put datetime on screenshots
163188
run: |
164189
cd /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/
@@ -175,7 +200,7 @@ jobs:
175200
- name: upload screenshots
176201
uses: actions/upload-artifact@v4
177202
with:
178-
name: linuxscreen
203+
name: linuxscreen_${{ matrix.api-level }}
179204
path: |
180205
/home/runner/screen*.png
181206
/home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/test_outputfiles/*.png
@@ -184,16 +209,16 @@ jobs:
184209
continue-on-error: true
185210
uses: actions/upload-artifact@v4
186211
with:
187-
name: logcat
212+
name: logcat_${{ matrix.api-level }}
188213
path: |
189214
/home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/android-refimpl-app/logcat.txt
190215
191216
- name: Rename artifact for nightly upload
192217
if: github.event_name == 'push' && github.ref == 'refs/heads/zoff99/dev003'
193218
run: |
194219
pwd
195-
cp -av /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/test_outputfiles/test_004b.png screen_shot_android_02.png
196-
cp -av /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/test_outputfiles/test_099.png screen_shot_android_03.png
220+
cp -av /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/test_outputfiles/test_004b.png screen_shot_android_${{ matrix.api-level }}_02.png
221+
cp -av /home/runner/work/ToxAndroidRefImpl/ToxAndroidRefImpl/test_outputfiles/test_099.png screen_shot_android_${{ matrix.api-level }}_03.png
197222
198223
- name: Upload to nightly release
199224
uses: ncipollo/release-action@v1
@@ -206,5 +231,5 @@ jobs:
206231
prerelease: true
207232
replacesArtifacts: true
208233
token: ${{ secrets.GITHUB_TOKEN }}
209-
artifacts: "screen_shot_android_02.png,screen_shot_android_03.png"
234+
artifacts: "screen_shot_android_${{ matrix.api-level }}_02.png,screen_shot_android_${{ matrix.api-level }}_03.png"
210235

0 commit comments

Comments
 (0)