update dependencies #615
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Nightly | |
on: | |
push: | |
paths-ignore: | |
- 'README.md' | |
- 'CHANGELOG.md' | |
- '.github/workflows/macos_pkg.yml' | |
pull_request: | |
paths-ignore: | |
- 'README.md' | |
- 'CHANGELOG.md' | |
- '.github/workflows/macos_pkg.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-12 | |
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 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-12 | |
if: ${{ true }} | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install cliclick | |
run: brew install cliclick | |
- 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: 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,645 | |
sleep 1 | |
cliclick -m verbose c:367,641 | |
sleep 1 | |
sendkeys apps | |
sendkeys -a "TRIfA" -c ":smile" | |
sleep 90 | |
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 1506x88+207+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: 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: 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,645 | |
sleep 1 | |
cliclick -m verbose c:367,641 | |
sleep 1 | |
sendkeys apps | |
sendkeys -a "TRIfA" -c ":smile" | |
sleep 90 | |
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 1506x88+207+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: Setup 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 xdotool xclip | |
sudo apt-get install x11-apps x11-utils | |
sudo apt-get install lwm fvwm | |
sudo apt-get install xvfb | |
- 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 620 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 | |
Start-Sleep -Seconds 20 | |
Start-Sleep -Seconds 8 | |
$signature=@' | |
[DllImport("user32.dll",CharSet=CharSet.Auto,CallingConvention=CallingConvention.StdCall)] | |
public static extern void mouse_event(long dwFlags, long dx, long dy, long cButtons, long dwExtraInfo); | |
'@ | |
$SendMouseClick = Add-Type -memberDefinition $signature -name "Win32MouseEventNew" -namespace Win32Functions -passThru | |
$x = 84 | |
$y = 104 | |
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y) | |
sleep -Seconds 02 | |
$SendMouseClick::mouse_event(0x00000002, 0, 0, 0, 0); | |
$SendMouseClick::mouse_event(0x00000004, 0, 0, 0, 0); | |
sleep -Seconds 02 | |
$x = 146 | |
$y = 104 | |
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y) | |
$SendMouseClick::mouse_event(0x00000002, 0, 0, 0, 0); | |
$SendMouseClick::mouse_event(0x00000004, 0, 0, 0, 0); | |
Start-Sleep -Seconds 2 | |
- name: start tester | |
shell: bash | |
run: | | |
cat toxid.txt;echo | |
cd java_tox_tester-master | |
bash -x ./do_compile.sh | |
./do_run.sh $(cat ../toxid.txt) & | |
sleep 180 | |
- name: startup-app | |
shell: pwsh | |
run: | | |
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") | |
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | |
$signature=@' | |
[DllImport("user32.dll",CharSet=CharSet.Auto,CallingConvention=CallingConvention.StdCall)] | |
public static extern void mouse_event(long dwFlags, long dx, long dy, long cButtons, long dwExtraInfo); | |
'@ | |
$SendMouseClick = Add-Type -memberDefinition $signature -name "Win32MouseEventNew" -namespace Win32Functions -passThru | |
$x = 215 | |
$y = 325 | |
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y) | |
sleep -Seconds 02 | |
$SendMouseClick::mouse_event(0x00000002, 0, 0, 0, 0); | |
$SendMouseClick::mouse_event(0x00000004, 0, 0, 0, 0); | |
sleep -Seconds 02 | |
$x = 735 | |
$y = 613 | |
[System.Windows.Forms.Cursor]::Position = New-Object System.Drawing.Point($x, $y) | |
sleep -Seconds 02 | |
$SendMouseClick::mouse_event(0x00000002, 0, 0, 0, 0); | |
$SendMouseClick::mouse_event(0x00000004, 0, 0, 0, 0); | |
sleep -Seconds 02 | |
- name: capture-screen | |
shell: pwsh | |
run: | | |
Add-Type -AssemblyName System.Windows.Forms | |
Add-Type -AssemblyName System.Drawing | |
$Screen = [System.Windows.Forms.SystemInformation]::VirtualScreen | |
$Width = $Screen.Width | |
$Height = $Screen.Height | |
$Left = $Screen.Left | |
$Top = $Screen.Top | |
$bitmap = New-Object System.Drawing.Bitmap $Width, $Height | |
$graphic = [System.Drawing.Graphics]::FromImage($bitmap) | |
$graphic.CopyFromScreen($Left, $Top, 0, 0, $bitmap.Size) | |
$bitmap.Save("D:\a\trifa_material\trifa_material\screenshot-windows.png") | |
Write-Output "Screenshot saved to:" | |
Write-Output D:\a\trifa_material\trifa_material\screenshot-windows.png | |
- name: upload-screenshots | |
uses: actions/upload-artifact@v4 | |
with: | |
name: screenshot-windows | |
path: | | |
D:\a\trifa_material\trifa_material\screenshot-windows.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-windows.png" | |