Translations update from Hosted Weblate #158
Workflow file for this run
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@v3 | |
- 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@v3 | |
- 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 packageDistributionForCurrentOS | |
- name: build jar | |
run: id;pwd;ls -al;./gradlew -Dorg.gradle.java.home=/usr/lib/jvm/java-17-openjdk-amd64 packageUberJarForCurrentOS | |
- 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@v3 | |
with: | |
name: trifa-material_nightly.deb | |
path: trifa-material_nightly.deb | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
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@v3 | |
- 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@v3 | |
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-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@v3 | |
- name: Install Java | |
uses: actions/setup-java@v3 | |
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 packageDistributionForCurrentOS || 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@v3 | |
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@v3 | |
- uses: actions/setup-java@v3 | |
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 packageDistributionForCurrentOS | |
- name: Rename artifact for nightly upload | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
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@v3 | |
with: | |
name: trifa-material_nightly.msi | |
path: trifa-material_nightly.msi | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: trifa-material_nightly.exe | |
path: trifa-material_nightly.exe | |
- name: Rename artifact for nightly upload for tags | |
if: contains(github.ref, 'refs/tags/v') | |
run: | | |
cp -v ./build/compose/binaries/main/msi/trifa*material*.msi trifa-material_nightly.msi | |
- name: Upload artifact for tags | |
uses: actions/upload-artifact@v3 | |
with: | |
name: trifa-material_nightly.msi | |
path: trifa-material_nightly.msi | |
- 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@v3 | |
- uses: actions/download-artifact@v3 | |
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-11 | |
if: ${{ true }} | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install cliclick | |
run: brew install cliclick | |
- 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 200 -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 2 | |
cat /Users/runner/work/trifa_material/trifa_material/toxid.txt;echo | |
cd /Users/runner/work/trifa_material/trifa_material/java_tox_tester-master/ | |
./do_compile.sh | |
./do_run.sh $(cat /Users/runner/work/trifa_material/trifa_material/toxid.txt) >/dev/null 2>/dev/null & | |
sleep 58 | |
cliclick -m verbose c:195,347 | |
sleep 90 | |
sleep 120 | |
pwd | |
ls -al /Users/runner/ | |
cp -v /Users/runner/screenshot-macos.png /Users/runner/work/trifa_material/trifa_material/screenshot-macos.png | |
- name: upload-screenshots | |
uses: actions/upload-artifact@v3 | |
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" | |
linux-ub20-test: | |
runs-on: ubuntu-20.04 | |
if: ${{ true }} | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: os version | |
run: uname -a | |
- 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: 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: create runscript | |
run: | | |
printf '#!/bin/bash\n' > /tmp/a.sh | |
printf 'xclock -digital -geometry 300x45+100+688 &\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 '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 '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-master/\n' >> /tmp/a.sh | |
printf './do_run.sh $(cat /home/runner/work/trifa_material/trifa_material/toxid.txt) >/dev/null 2>/dev/null &\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 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: startup-app | |
run: | | |
pwd | |
ls -al | |
./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 | |
cp -av /tmp/screenshot-linux.png screenshot-linux.png | |
- name: upload-screenshots | |
uses: actions/upload-artifact@v3 | |
with: | |
name: screenshot-linux | |
path: /tmp/screenshot-linux.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@v3 | |
- name: Display the path | |
run: echo %PATH% | |
shell: cmd | |
- uses: actions/setup-java@v3 | |
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 | |
- 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@v3 | |
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" | |