-
-
Notifications
You must be signed in to change notification settings - Fork 7
1094 lines (968 loc) · 38.8 KB
/
nightly.yml
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
name: Nightly
on:
push:
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
- '.github/workflows/macos_pkg.yml'
- '.github/workflows/screens_only_for_nightly_linux.yml'
- '.github/workflows/screens_only_for_nightly_macos_arm.yml'
- '.github/workflows/screens_only_for_nightly_macos.yml'
- '.github/workflows/screens_only_for_nightly_win.yml'
- '.github/workflows/jni_libs.yml'
pull_request:
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
- '.github/workflows/macos_pkg.yml'
- '.github/workflows/screens_only_for_nightly_linux.yml'
- '.github/workflows/screens_only_for_nightly_macos_arm.yml'
- '.github/workflows/screens_only_for_nightly_macos.yml'
- '.github/workflows/screens_only_for_nightly_win.yml'
- '.github/workflows/jni_libs.yml'
workflow_dispatch:
inputs:
version:
description: dummy
default: dummy
defaults:
run:
shell: bash
jobs:
update-nightly-tag:
name: Update nightly release tag
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Move nightly tag to head for nightly release
run: git tag -f nightly && git push origin nightly -f
build-linux-nightly-artifact:
name: Nightly Artifact Linux Build
runs-on: ubuntu-20.04
needs: [update-nightly-tag]
if: |
always() &&
(needs.update-nightly-tag.result == 'success' ||
needs.update-nightly-tag.result == 'skipped')
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
sudo apt-get update && \
sudo DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
ca-certificates \
rpm \
openjdk-17-jdk \
openjdk-17-jdk-headless
- name: show java version
run: type -a java;java -version
- name: set java version
run: sudo update-java-alternatives -s java-1.17.0-openjdk-amd64
- name: show java version
run: type -a java;java -version
- name: build package
run: id;pwd;ls -al;./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-17-openjdk-amd64 packageReleaseDistributionForCurrentOS
- name: build jar
run: id;pwd;ls -al;./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-17-openjdk-amd64 packageReleaseUberJarForCurrentOS
- name: check jar
run: id;pwd;ls -hal ./build/compose/jars/trifa_material-linux-x64-*.jar
- name: check deb
run: id;pwd;ls -hal ./build/compose/binaries/main*/deb/trifa-material_*-1_amd64.deb
- name: check rpm
run: id;pwd;ls -hal ./build/compose/binaries/main*/rpm/trifa_material-*.x86_64.rpm
- name: Rename artifact for nightly upload
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
cp -v ./build/compose/binaries/main*/deb/trifa-material_*_amd64.deb trifa-material_nightly.deb
cp -v ./build/compose/binaries/main*/rpm/trifa_material-*.x86_64.rpm trifa-material_nightly.rpm
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: trifa-material_nightly.deb
path: trifa-material_nightly.deb
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: trifa-material_nightly.rpm
path: trifa-material_nightly.rpm
- name: Rename artifact for release upload
if: contains(github.ref, 'refs/tags/v')
run: |
cp -v ./build/compose/binaries/main*/deb/trifa-material_*_amd64.deb trifa-material.deb
cp -v ./build/compose/binaries/main*/rpm/trifa_material-*.x86_64.rpm trifa-material.rpm
- name: Upload to versioned release
if: contains(github.ref, 'refs/tags/v')
uses: ncipollo/release-action@v1
with:
allowUpdates: true
draft: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "trifa-material.deb,trifa-material.rpm"
- name: Upload to nightly release
uses: ncipollo/release-action@v1
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
with:
allowUpdates: true
tag: nightly
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "trifa-material_nightly.deb,trifa-material_nightly.rpm"
build-appimage-nightly-artifact:
name: Nightly Artifact AppImage Build
runs-on: ubuntu-20.04
needs: [update-nightly-tag]
if: |
always() &&
(needs.update-nightly-tag.result == 'success' ||
needs.update-nightly-tag.result == 'skipped')
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
sudo apt-get update && \
sudo DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
ca-certificates \
wget \
rpm \
sed \
openjdk-17-jdk \
openjdk-17-jdk-headless
- name: show java version
run: type -a java;java -version
- name: set java version
run: sudo update-java-alternatives -s java-1.17.0-openjdk-amd64
- name: show java version
run: type -a java;java -version
- name: activate appimage package creation
run: |
sed -i -e 's#TargetFormat.Dmg#TargetFormat.AppImage#' build.gradle.kts
- name: build package
run: id;pwd;ls -al;./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-17-openjdk-amd64 packageAppImage
- name: make appimage
run: id;pwd;ls -al;./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-17-openjdk-amd64 executeAppImageBuilder
- name: check appimage
run: id;pwd;ls -hal ./trifa*material*AppImage
- name: Rename artifact for nightly upload
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
cp -v ./trifa*material*AppImage trifa-material_nightly-x86_64.appimage
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: trifa-material_nightly-x86_64.appimage
path: trifa-material_nightly-x86_64.appimage
- name: Rename artifact for release upload
if: contains(github.ref, 'refs/tags/v')
run: |
cp -v ./trifa*material*AppImage trifa-material-x86_64.appimage
- name: Upload to versioned release
if: contains(github.ref, 'refs/tags/v')
uses: ncipollo/release-action@v1
with:
allowUpdates: true
draft: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "trifa-material-x86_64.appimage"
- name: Upload to nightly release
uses: ncipollo/release-action@v1
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
with:
allowUpdates: true
tag: nightly
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "trifa-material_nightly-x86_64.appimage"
build-macos-nightly-artifact:
name: Nightly Artifact macOS Build
runs-on: macos-13
needs: [update-nightly-tag]
if: |
always() &&
(needs.update-nightly-tag.result == 'success' ||
needs.update-nightly-tag.result == 'skipped')
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: show architecture
run: uname -m
- name: Install Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: |
11
17
- name: test java1
run: |
type java
java -version || exit 0
/usr/libexec/java_home -V
/usr/libexec/java_home -v 17
export JAVA_HOME=$(/usr/libexec/java_home -v17)
java -version
$JAVA_HOME/bin/java -version
$JAVA_HOME/bin/javac -version
ls -al /usr/local/Cellar/openjdk/
- name: build package
run: |
ls -al
id
pwd
./gradlew packageReleaseDistributionForCurrentOS || cat /Users/runner/work/trifa_material/trifa_material/build/compose/logs/createDistributable/codesign-2*txt
- name: Rename artifact for nightly upload
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
cp -v /Users/runner/work/trifa_material/trifa_material/build/compose/binaries/main*/dmg/trifa_material-*.dmg trifa-material_nightly.dmg
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: trifa-material_nightly.dmg
path: trifa-material_nightly.dmg
- name: Rename artifact for release upload
if: contains(github.ref, 'refs/tags/v')
run: |
cp -v /Users/runner/work/trifa_material/trifa_material/build/compose/binaries/main*/dmg/trifa_material-*.dmg trifa-material.dmg
- name: Upload to versioned release
if: contains(github.ref, 'refs/tags/v')
uses: ncipollo/release-action@v1
with:
allowUpdates: true
draft: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "trifa-material.dmg"
- name: Upload to nightly release
uses: ncipollo/release-action@v1
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
with:
allowUpdates: true
tag: nightly
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "trifa-material_nightly.dmg"
build-windows-nightly-artifact:
name: Nightly Artifact Windows Build
runs-on: windows-latest
needs: update-nightly-tag
if: |
always() &&
(needs.update-nightly-tag.result == 'success' ||
needs.update-nightly-tag.result == 'skipped')
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
- name: test java1
shell: bash
run: |
java -version
- name: build package
shell: bash
run: |
ls -al || echo "_"
id || echo "_"
pwd || echo "_"
./gradlew packageReleaseDistributionForCurrentOS
- name: Rename artifact for nightly upload
run: |
cp -v ./build/compose/binaries/main*/msi/trifa*material*.msi trifa-material_nightly.msi
cp -v ./build/compose/binaries/main*/exe/trifa_material-*.exe trifa-material_nightly.exe
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: trifa-material_nightly.msi
path: trifa-material_nightly.msi
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: trifa-material_nightly.exe
path: trifa-material_nightly.exe
- name: Rename artifact for release upload
if: contains(github.ref, 'refs/tags/v')
run: |
cp -v ./build/compose/binaries/main*/msi/trifa*material*.msi trifa-material.msi
cp -v ./build/compose/binaries/main*/exe/trifa_material-*.exe trifa-material.exe
- name: Upload to versioned release
if: contains(github.ref, 'refs/tags/v')
uses: ncipollo/release-action@v1
with:
allowUpdates: true
draft: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "trifa-material.msi,trifa-material.exe"
- name: Upload to nightly release
uses: ncipollo/release-action@v1
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
with:
allowUpdates: true
tag: nightly
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "trifa-material_nightly.msi,trifa-material_nightly.exe"
build-windows-nightly-zip-artifact:
runs-on: ubuntu-20.04
needs: [build-windows-nightly-artifact]
if: |
always() &&
(needs.build-windows-nightly-artifact.result == 'success')
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: trifa-material_nightly.msi
- name: show artifact
run: ls -al
- name: install dependencies
run: |
sudo apt-get update && \
sudo DEBIAN_FRONTEND=noninteractive \
apt-get install -y --no-install-recommends \
ca-certificates \
wget \
zip \
msitools
- name: show msitools version
run: msiextract --version
- name: show zip version
run: zip --version
- name: extract msi2zip
run: |
id;pwd;ls -al
msiextract trifa-material_nightly.msi
- name: create zip
run: |
id;pwd;ls -al
zip -r trifa-material-windows_nightly.zip trifa_material
id;pwd;ls -al
- name: Rename artifact for release upload
if: contains(github.ref, 'refs/tags/v')
run: |
cp -v trifa-material-windows_nightly.zip trifa-material-windows.zip
- name: Upload to versioned release
if: contains(github.ref, 'refs/tags/v')
uses: ncipollo/release-action@v1
with:
allowUpdates: true
draft: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "trifa-material-windows.zip"
- name: Upload to nightly release
uses: ncipollo/release-action@v1
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
with:
allowUpdates: true
tag: nightly
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "trifa-material-windows_nightly.zip"
macos-test:
runs-on: macos-13
if: ${{ true }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: install cliclick
run: brew install cliclick
- name: show architecture
run: uname -m
- name: install imagemagick
run: brew install imagemagick
- name: install wget
run: brew install wget
- name: install sendkeys
run: brew install socsieng/tap/sendkeys
- name: macos-version1
run: sw_vers -productVersion
- name: macos-version2
run: system_profiler SPSoftwareDataType
- name: csrutil-status
run: csrutil status || exit 0
- name: notifications_off_01
run: launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist || exit 0
- name: notifications_off_02
run: killall NotificationCenter || exit 0
- name: download tester
shell: bash
run: |
curl -L https://github.com/zoff99/java_tox_tester/archive/refs/heads/master.zip -o master.zip
unzip master.zip
ls -al java_tox_tester-master/
java -version
javac -version
- name: download jshowarch
shell: bash
run: |
curl -L https://github.com/zoff99/jshowarch/archive/refs/heads/master.zip -o master.zip
unzip master.zip
pwd
ls -al jshowarch-master/
java -version
javac -version
cd jshowarch-master/
javac jshowarch.java
- name: startup-app
run: |
pwd
ls -al /Users/runner/
_HOME_="/Users/runner/"
/usr/libexec/java_home -v 17
export JAVA_HOME=$(/usr/libexec/java_home -v17)
./gradlew assemble
cliclick -m verbose m:12,34
screencapture -T 1 -x -t png /Users/runner/screen01.png &
screencapture -T 2 -x -t png /Users/runner/screen02.png &
screencapture -T 3 -x -t png /Users/runner/screen03.png &
screencapture -T 10 -x -t png /Users/runner/screen04.png &
screencapture -T 25 -x -t png /Users/runner/screen05.png &
screencapture -T 50 -x -t png /Users/runner/screen06.png &
screencapture -T 60 -x -t png /Users/runner/screen07.png &
screencapture -T 90 -x -t png /Users/runner/screen09.png &
screencapture -T 110 -x -t png /Users/runner/screen10.png &
screencapture -T 238 -x -t png /Users/runner/screenshot-macos.png &
screencapture -T 230 -x -t png /Users/runner/screen12.png &
screencapture -T 300 -x -t png /Users/runner/screen13.png &
pwd
ls -al
./gradlew run > trifa.log 2>&1 &
pwd
sleep 20
cliclick -m verbose c:77,124
sleep 2
cliclick -m verbose c:139,124
sleep 30
cd /Users/runner/work/trifa_material/trifa_material/java_tox_tester-master/
./do_compile.sh
cat /Users/runner/work/trifa_material/trifa_material/trifa.log
./do_run.sh $(cat /Users/runner/work/trifa_material/trifa_material/toxid.txt) >/Users/runner/work/trifa_material/trifa_material/tester.log 2>&1 &
sleep 68
ls -al /Users/runner/work/trifa_material/trifa_material/
cat /Users/runner/work/trifa_material/trifa_material/trifa.log
cliclick -m verbose c:195,347
sleep 1
cliclick -m verbose c:745,627
sleep 1
cliclick -m verbose c:367,623
sleep 1
sendkeys apps
sendkeys -a "TRIfA" -c ":smile"
cd /Users/runner/work/trifa_material/trifa_material/jshowarch-master
java jshowarch 885 76 115 65 24 &
sleep 90
cliclick -m verbose c:367,623
sleep 120
cat /Users/runner/work/trifa_material/trifa_material/tester.log
pwd
ls -al /Users/runner/
cp -v /Users/runner/screenshot-macos.png /Users/runner/work/trifa_material/trifa_material/screenshot-macos.png
- name: tweak screenshot
run: |
cd /Users/runner/work/trifa_material/trifa_material/
pwd
cp -v screenshot-macos.png /Users/runner/screenshot-macos_orig.png
convert screenshot-macos.png -crop 1176x885+0+0 +repage crop_br.png
convert screenshot-macos.png -crop 1919x25+1663+0 crop_br2.png
convert screenshot-macos.png -crop 1560x88+180+993 crop_br3.png
convert crop_br3.png -resize 65% crop_br3small.png
composite -compose Copy -gravity South crop_br3small.png crop_br.png -alpha set dst.png
composite -compose Copy -gravity Northeast crop_br2.png dst.png -alpha set dst2.png
cp -v dst2.png screenshot-macos.png
- name: upload-screenshots
uses: actions/upload-artifact@v4
with:
name: screenshot-macos
path: |
/Users/runner/screen*.png
- name: Upload to nightly release
uses: ncipollo/release-action@v1
if: github.ref == 'refs/heads/master'
with:
allowUpdates: true
tag: nightly
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "screenshot-macos.png"
macos-14-test:
runs-on: macos-14
if: ${{ true }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: install cliclick
run: brew install cliclick
- name: show architecture
run: uname -m
- name: install imagemagick
run: brew install imagemagick
- name: install wget
run: brew install wget
- name: install sendkeys
run: brew install socsieng/tap/sendkeys
- name: macos-version1
run: sw_vers -productVersion
- name: macos-version2
run: system_profiler SPSoftwareDataType
- name: csrutil-status
run: csrutil status || exit 0
- name: notifications_off_01
run: launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist || exit 0
- name: notifications_off_02
run: killall NotificationCenter || exit 0
- name: download tester
shell: bash
run: |
curl -L https://github.com/zoff99/java_tox_tester/archive/refs/heads/master.zip -o master.zip
unzip master.zip
ls -al java_tox_tester-master/
java -version
javac -version
- name: download jshowarch
shell: bash
run: |
curl -L https://github.com/zoff99/jshowarch/archive/refs/heads/master.zip -o master.zip
unzip master.zip
pwd
ls -al jshowarch-master/
java -version
javac -version
cd jshowarch-master/
javac jshowarch.java
- name: startup-app
run: |
pwd
ls -al /Users/runner/
_HOME_="/Users/runner/"
/usr/libexec/java_home -v 17
export JAVA_HOME=$(/usr/libexec/java_home -v17)
./gradlew assemble
cliclick -m verbose m:12,34
screencapture -T 1 -x -t png /Users/runner/screen01.png &
screencapture -T 2 -x -t png /Users/runner/screen02.png &
screencapture -T 3 -x -t png /Users/runner/screen03.png &
screencapture -T 10 -x -t png /Users/runner/screen04.png &
screencapture -T 25 -x -t png /Users/runner/screen05.png &
screencapture -T 50 -x -t png /Users/runner/screen06.png &
screencapture -T 60 -x -t png /Users/runner/screen07.png &
screencapture -T 90 -x -t png /Users/runner/screen09.png &
screencapture -T 110 -x -t png /Users/runner/screen10.png &
screencapture -T 238 -x -t png /Users/runner/screenshot-macos-14.png &
screencapture -T 230 -x -t png /Users/runner/screen12.png &
screencapture -T 300 -x -t png /Users/runner/screen13.png &
pwd
ls -al
./gradlew run > trifa.log 2>&1 &
pwd
sleep 20
cliclick -m verbose c:77,124
sleep 2
cliclick -m verbose c:139,124
sleep 20
cd /Users/runner/work/trifa_material/trifa_material/java_tox_tester-master/
./do_compile.sh
cat /Users/runner/work/trifa_material/trifa_material/trifa.log
./do_run.sh $(cat /Users/runner/work/trifa_material/trifa_material/toxid.txt) >/Users/runner/work/trifa_material/trifa_material/tester.log 2>&1 &
sleep 68
ls -al /Users/runner/work/trifa_material/trifa_material/
cat /Users/runner/work/trifa_material/trifa_material/trifa.log
cliclick -m verbose c:195,347
sleep 1
cliclick -m verbose c:745,627
sleep 1
cliclick -m verbose c:367,623
sleep 1
sendkeys apps
sendkeys -a "TRIfA" -c ":smile"
cd /Users/runner/work/trifa_material/trifa_material/jshowarch-master
rm *.class
javac jshowarch.java
java jshowarch 885 76 115 65 24 &
sleep 90
cliclick -m verbose c:367,623
sleep 120
cat /Users/runner/work/trifa_material/trifa_material/tester.log
pwd
ls -al /Users/runner/
cp -v /Users/runner/screenshot-macos-14.png /Users/runner/work/trifa_material/trifa_material/screenshot-macos-14.png
- name: tweak screenshot
run: |
cd /Users/runner/work/trifa_material/trifa_material/
pwd
cp -v screenshot-macos-14.png /Users/runner/screenshot-macos-14_orig.png
convert screenshot-macos-14.png -crop 1176x885+0+0 +repage crop_br.png
convert screenshot-macos-14.png -crop 1919x25+1663+0 crop_br2.png
convert screenshot-macos-14.png -crop 1560x88+180+993 crop_br3.png
convert crop_br3.png -resize 65% crop_br3small.png
composite -compose Copy -gravity South crop_br3small.png crop_br.png -alpha set dst.png
composite -compose Copy -gravity Northeast crop_br2.png dst.png -alpha set dst2.png
cp -v dst2.png screenshot-macos-14.png
- name: upload-screenshots
uses: actions/upload-artifact@v4
with:
name: screenshot-macos-14
path: |
/Users/runner/screen*.png
- name: Upload to nightly release
uses: ncipollo/release-action@v1
if: github.ref == 'refs/heads/master'
with:
allowUpdates: true
tag: nightly
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "screenshot-macos-14.png"
linux-ub20-test:
runs-on: ubuntu-20.04
if: ${{ true }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: os version
run: uname -a
# This is necessary because GitHub Actions does not support IPv6 yet
# And if a user has `ipv6: true` set in their yaml config, it wouldn't work otherwise
# <https://github.com/actions/runner-images/issues/668#issuecomment-1872487355>
- name: show ip
run: |
ip addr
- name: Set up WARP
uses: fscarmen/[email protected]
with:
stack: ipv6 # Optional. Support [ ipv4, ipv6, dual ]. Default is dual.
- name: ipv6
run: |
curl -m 9 --ipv6 --verbose https://google.com
curl -m 9 -6 https://ifconfig.co
- name: show ip
run: |
ip addr
- name: install deps
run: |
sudo apt-get update
sudo apt-get install openjdk-17-jdk-headless openjdk-17-jdk
sudo apt-get install imagemagick
sudo apt-get install libv4l-0 libv4l-dev
sudo apt-get install xdotool xclip
sudo apt-get install x11-apps x11-utils
sudo apt-get install lwm fvwm
sudo apt-get install xvfb
sudo apt-get install libpulse0
- name: show installed font packages
run: |
dpkg -l|grep font
- name: install fonts
run: |
sudo apt-get install xfonts-utils xfonts-scalable xfonts-encodings xfonts-base xfonts-75dpi xfonts-100dpi
sudo apt-get install fonts-noto-color-emoji
sudo apt-get install fonts-dejavu fonts-dejavu-core fonts-freefont-ttf
sudo apt-get install xfonts-wqy \
xfonts-efont-unicode xfonts-efont-unicode-ib xfonts-intl-chinese xfonts-intl-chinese-big \
xfonts-intl-asian xfonts-intl-arabic xfonts-intl-european xfonts-unifont \
fonts-dejavu-core \
fonts-dejavu-extra \
fonts-droid-fallback \
fonts-guru \
fonts-guru-extra \
fonts-horai-umefont \
fonts-kacst \
fonts-kacst-one \
fonts-khmeros-core \
fonts-lao \
fonts-liberation \
fonts-lklug-sinhala \
fonts-lohit-guru \
fonts-nanum \
fonts-noto-cjk \
fonts-opensymbol \
fonts-roboto \
fonts-roboto-hinted \
fonts-sil-abyssinica \
fonts-sil-padauk \
fonts-stix \
fonts-symbola \
fonts-takao-pgothic \
fonts-thai-tlwg \
fonts-tibetan-machine \
fonts-tlwg-garuda \
fonts-tlwg-kinnari \
fonts-tlwg-laksaman \
fonts-tlwg-loma \
fonts-tlwg-mono \
fonts-tlwg-norasi \
fonts-tlwg-purisa \
fonts-tlwg-sawasdee \
fonts-tlwg-typewriter \
fonts-tlwg-typist \
fonts-tlwg-typo \
fonts-tlwg-umpush \
fonts-tlwg-waree \
fonts-unfonts-core
# use the ipv6-boot-only version of the tox tester
- name: download tester
shell: bash
run: |
curl -L https://github.com/zoff99/java_tox_tester/archive/refs/heads/ipv6only.zip -o master.zip
unzip master.zip
ls -al java_tox_tester-ipv6only/
java -version
javac -version
- name: create runscript
run: |
printf '#!/bin/bash\n' > /tmp/a.sh
printf 'xclock -digital -geometry 300x45+100+688 &\n' >> /tmp/a.sh
printf 'export LC_ALL=zh_CN.utf8\n' >> /tmp/a.sh
printf '/home/runner/work/trifa_material/trifa_material/gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-17-openjdk-amd64/ run &\n' >> /tmp/a.sh
printf 'sleep 20\n' >> /tmp/a.sh
printf 'xwininfo -id $(xdotool getactivewindow)\n' >> /tmp/a.sh
printf 'xdotool mousemove --sync 80 74 click 1\n' >> /tmp/a.sh
printf 'sleep 2\n' >> /tmp/a.sh
printf 'sleep 20\n' >> /tmp/a.sh
printf 'xdotool mousemove --sync 140 74 click 1\n' >> /tmp/a.sh
printf 'pwd\n' >> /tmp/a.sh
printf 'sleep 5\n' >> /tmp/a.sh
printf 'sleep 60\n' >> /tmp/a.sh
printf 'ls -ratl\n' >> /tmp/a.sh
printf 'cat /home/runner/work/trifa_material/trifa_material/toxid.txt;echo\n' >> /tmp/a.sh
printf 'cd /home/runner/work/trifa_material/trifa_material/java_tox_tester-ipv6only/\n' >> /tmp/a.sh
printf './do_run.sh $(cat /home/runner/work/trifa_material/trifa_material/toxid.txt) >/home/runner/work/trifa_material/trifa_material/tester.log 2>&1 &\n' >> /tmp/a.sh
printf 'sleep 220\n' >> /tmp/a.sh
printf 'xdotool mousemove --sync 214 295 click 1\n' >> /tmp/a.sh
printf 'sleep 4\n' >> /tmp/a.sh
printf 'xdotool mousemove --sync 750 602 click 1\n' >> /tmp/a.sh
printf 'sleep 2\n' >> /tmp/a.sh
printf 'import -window root /tmp/screenshot-linux_before_wm.png\n' >> /tmp/a.sh
printf 'sleep 40\n' >> /tmp/a.sh
printf 'fvwm2 &' >> /tmp/a.sh
printf 'sleep 20\n' >> /tmp/a.sh
printf 'import -window root /tmp/screenshot-linux.png\n' >> /tmp/a.sh
cat /tmp/a.sh
chmod a+rx /tmp/a.sh
- name: patch-app1
run: |
pwd
ls -al
sed -i -e 's#PREF__udp_enabled = udp_mode_int#PREF__udp_enabled = 0#' src/main/kotlin/com/zoffcc/applications/trifa/MainActivity.kt
git diff||echo "NO ERR"
- name: patch-app2
run: |
pwd
ls -al
sed -i -e 's#PREF__local_discovery_enabled = local_discovery_int#PREF__local_discovery_enabled = 0#' src/main/kotlin/com/zoffcc/applications/trifa/MainActivity.kt
git diff||echo "NO ERR"
- name: patch-app3
run: |
pwd
ls -al
tools/patch_src_disable_ipv4_boots.sh
git diff||echo "NO ERR"
- name: generate locale
run: |
cat /etc/locale.gen
cat /etc/locale.gen|grep -i zn||echo "NO ERR"
echo "zh_CN.UTF-8 UTF-8" |sudo tee -a /etc/locale.gen
sudo locale-gen
- name: generate locale
run: |
sudo localectl set-locale LANG="zh_CN.UTF-8"
export LANG="zh_CN.UTF-8"
sudo update-locale
locale -a
locale
locale -c -k LC_NUMERIC
sudo update-locale LANG="zh_CN.UTF-8"
localectl status
- name: startup-app
run: |
pwd
ls -al
export LC_ALL=zh_CN.utf8
./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-17-openjdk-amd64/ assemble
xvfb-run --server-args="-screen 0 1024x768x24" --auto-servernum /tmp/a.sh
echo "++++++++++++++++++"
echo "++++++++++++++++++"
cat /home/runner/work/trifa_material/trifa_material/trifa.log||echo "NO ERR"
echo "++++++++++++++++++"
echo "++++++++++++++++++"
cat /home/runner/work/trifa_material/trifa_material/tester.log||echo "NO ERR"
cp -av /tmp/screenshot-linux.png screenshot-linux.png
- name: upload-screenshots
uses: actions/upload-artifact@v4
with:
name: screenshot-linux
path: /tmp/screenshot-linux.png
- name: upload-screenshots
uses: actions/upload-artifact@v4
with:
name: screenshot-linux_before_wm
path: /tmp/screenshot-linux_before_wm.png
- name: Upload to nightly release
uses: ncipollo/release-action@v1
if: github.ref == 'refs/heads/master'
with:
allowUpdates: true
tag: nightly
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
prerelease: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: "screenshot-linux.png"
windows-test:
runs-on: windows-latest
if: ${{ true }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Display the path
run: echo %PATH%
shell: cmd
- uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '17'
- name: java-version
run: java -version
shell: bash
- name: download tester
shell: bash
run: |
curl -L https://github.com/zoff99/java_tox_tester/archive/refs/heads/master.zip -o master.zip
unzip master.zip
ls -al java_tox_tester-master/
java -version
javac -version
- name: compile-app
shell: bash
run: |
./gradlew.bat assemble
- name: startup-app
shell: pwsh
run: |
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
Start-Sleep -Seconds 30
Start-Process -FilePath 'C:\Windows\System32\cmd.exe' -WorkingDirectory "D:\a\trifa_material\trifa_material" -ArgumentList '/c', 'D:\a\trifa_material\trifa_material\gradlew.bat', "run" -windowstyle Maximized