Skip to content

Commit

Permalink
Update workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
io7m committed May 16, 2024
1 parent 329d8c0 commit 2e93cdb
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/deploy-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ fi
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<!-- Enable deployment of OCI images. -->
<activeProfiles>
<activeProfile>io7m-oci-image</activeProfile>
</activeProfiles>
<profiles>
<profile>
<id>io7m</id>
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/run-with-xvfb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/bin/bash -ex
#
# Automatically generated: DO NOT EDIT.
#
# Generation code: https://www.github.com/io7m-com/.github/
#

exec > >(tee build.txt) 2>&1

#---------------------------------------------------------------------
# Install all of the various required packages.
#
# We use:
# xvfb to provide a virtual X server
# fluxbox to provide a bare-minimum window manager with click-to-focus
# ffmpeg to record the session
# feh to set a background
#

sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y install xvfb fluxbox feh ffmpeg

#---------------------------------------------------------------------
# Start Xvfb on a new display.
#

Xvfb :99 &
export DISPLAY=:99
sleep 1

#---------------------------------------------------------------------
# Start recording the session.
#

ffmpeg -f x11grab -y -r 60 -video_size 1280x1024 -i :99 -vcodec vp9 test-suite.webm &
FFMPEG_PID="$!"

#---------------------------------------------------------------------
# Start fluxbox on the X server.
#

fluxbox &
sleep 1

#---------------------------------------------------------------------
# Set a desktop image.
#

feh --bg-tile .github/workflows/wallpaper.png
sleep 1

#---------------------------------------------------------------------
# Execute the passed-in build command.
#

"$@"

#---------------------------------------------------------------------
# Wait a while, and then instruct ffmpeg to stop recording. This step
# is necessary because video files need to be processed when recording
# stops.
#

sleep 20
kill -INT "${FFMPEG_PID}" || true
Binary file added .github/workflows/wallpaper.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2e93cdb

Please sign in to comment.