Skip to content

Commit

Permalink
test15
Browse files Browse the repository at this point in the history
  • Loading branch information
womendoushihaoyin committed Oct 9, 2024
1 parent f082676 commit dac4d8e
Showing 1 changed file with 78 additions and 2 deletions.
80 changes: 78 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,83 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2 # 检出仓库代码

- name: Install GUI Dependency
run: |
sudo apt-get update
sudo apt-get install -y \
libgl1-mesa-glx \
libglu1-mesa \
libx11-6 \
libxext6 \
libxrender1 \
libxi6 \
libxtst6 \
libxt6 \
libxfixes3 \
libxrandr2 \
libasound2 \
libpango1.0-0 \
libatk1.0-0 \
libgtk-3-0 \
libgstreamer1.0-0 \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
libfuse-dev \
libegl1 \
libwebkit2gtk-4.0-37 \
xvfb \
at-spi2-core \
dbus-x11 \
imagemagick
- name: Start Xvfb
run: |
Xvfb :99 -screen 0 1024x768x24 &
echo "DISPLAY=:99" >> $GITHUB_ENV
- name: Setup Xauthority
run: |
touch $HOME/.Xauthority
xauth nlist $DISPLAY | xauth -f $HOME/.Xauthority nmerge -
- name: Start AT-SPI Registry
run: |
echo "Starting AT-SPI Registry"
export XDG_SESSION_COOKIE=`xauth list|grep .$DISPLAY|cut -d' ' -f1`
dbus-launch --exit-with-session
echo "AT-SPI Registry started"
- name: Download AppImage
run: |
wget https://github.com/Snapmaker/OrcaSlicer/releases/download/nightlybuild/Snapmaker_Orca_Engine_Linux_V0.0.1.AppImage -O appimage.AppImage # 下载AppImage
chmod 777 appimage.AppImage # 给AppImage执行权限
- name: Copy Config
run: |
cd /home/runner/work/Snapmaker_Engine/Snapmaker_Engine/
ls -a
mkdir -p ~/.config/Snapmaker_Orca
cp Snapmaker_Orca.conf ~/.config/Snapmaker_Orca/Snapmaker_Orca.conf
- name: Run AppImage
run: |
./appimage.AppImage /home/runner/work/Snapmaker_Engine/Snapmaker_Engine/3DBenchy.3mf &
APPIMAGE_PID=$!
echo "AppImage is running with PID $APPIMAGE_PID"
env:
DISPLAY: ":99"

- name: Capture Screenshots
run: |
for i in {1..10}; do
sleep 5 # Capture a screenshot every 5 seconds
import -display :99 -window root /home/runner/work/screenshot_$i.png
echo "Screenshot $i captured"
done
kill $APPIMAGE_PID # Gracefully stop the AppImage
- name: Upload Screenshots
uses: actions/upload-artifact@v2
with:
name: Screenshots
path: /home/runner/work/screenshot_*.png

0 comments on commit dac4d8e

Please sign in to comment.