Skip to content

Commit

Permalink
Install GStreamer and Plugins (for Linux) and setup a Virtual Audio…
Browse files Browse the repository at this point in the history
… Device (for Linux)
  • Loading branch information
besidev committed Oct 17, 2024
1 parent c4be496 commit 5002510
Showing 1 changed file with 29 additions and 6 deletions.
35 changes: 29 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: CI build
on: [push]

env:
DISPLAY: ":99"
XVFB_PARAMS: "-screen 0 1920x1080x24"
RUNNING_ON_CI: true

jobs:
Expand All @@ -11,8 +13,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
jdk: [21, 23]
os: [ubuntu-latest, windows-latest] #, macos-13]
jdk: [17, 21, 23]
os: [ubuntu-latest, windows-latest]
fail-fast: false
max-parallel: 6
timeout-minutes: 30
Expand All @@ -27,19 +29,40 @@ jobs:
distribution: 'temurin'
java-version: ${{ matrix.jdk }}

- name: Install GStreamer and Plugins (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
libgstreamer1.0-0 \
gstreamer1.0-libav \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly
- name: Set up Virtual Audio Device (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get install -y pulseaudio
pulseaudio --start --exit-idle-time=-1
pacmd load-module module-null-sink sink_name=DummyOutput
- name: Compile
run: |
./gradlew jar
./gradlew example:jar
- name: Set up Virtual Display (for Linux)
if: runner.os == 'Linux'
run: |
Xvfb ${{env.DISPLAY}} ${{env.XVFB_PARAMS}} &
- name: Test
run: |
if [[ "$RUNNER_OS" == "Linux" ]]; then
export DISPLAY=:99.0 && /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16;
fi
./gradlew test
shell: bash

- name: Javadoc
run: |
./gradlew javadoc
./gradlew javadoc

0 comments on commit 5002510

Please sign in to comment.