mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-23 23:03:14 +03:00
202 lines
8.2 KiB
YAML
202 lines
8.2 KiB
YAML
name: Linux
|
|
|
|
on: [push, pull_request]
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
Linux:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v6
|
|
with:
|
|
ref: ${{ github.ref }}
|
|
fetch-depth: 2
|
|
- name: Checkout submodules
|
|
run: |
|
|
git submodule update --init --recursive
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo add-apt-repository -y universe
|
|
sudo add-apt-repository -y multiverse
|
|
sudo apt update
|
|
sudo apt install -y gcc-13 g++-13 wget mesa-utils xvfb xauth gdb zstd \
|
|
weston xdotool imagemagick \
|
|
python3-gi gir1.2-atspi-2.0 at-spi2-core dbus-x11
|
|
bash projects/linux/scripts/install_sdl3.sh --keep-build
|
|
wget https://cdn.ensoft.dev/eepp-assets/premake-5.0.0-beta6-linux.tar.gz
|
|
tar xvzf premake-5.0.0-beta6-linux.tar.gz
|
|
- name: Build
|
|
id: build
|
|
run: |
|
|
./premake5 --disable-static-build --with-debug-symbols --with-backend=SDL3 gmake
|
|
cd make/linux
|
|
make all -j$(nproc) -e config=release_x86_64
|
|
- name: Package development environment
|
|
if: github.event_name == 'push'
|
|
run: |
|
|
{
|
|
echo "commit=${GITHUB_SHA}"
|
|
echo "compiler=g++-13"
|
|
echo "configuration=release_x86_64"
|
|
echo "platform=linux"
|
|
echo "arch=x86_64"
|
|
echo "sdl3=$(pkg-config --modversion sdl3)"
|
|
} > .eepp-dev-environment
|
|
|
|
# Preserve graphics and X11 declarations used by cached objects. Otherwise a partial
|
|
# rebuild without system X11 headers can silently disable only part of native dragging.
|
|
mkdir -p .eepp-dev/sysroot/include
|
|
for include_dir in GL EGL GLES GLES2 GLES3 KHR X11; do
|
|
if [ -d "/usr/include/$include_dir" ]; then
|
|
cp -rL "/usr/include/$include_dir" .eepp-dev/sysroot/include/
|
|
fi
|
|
done
|
|
|
|
tar \
|
|
--exclude='.git' \
|
|
--exclude='projects/linux/sdk' \
|
|
--zstd \
|
|
-cf "$RUNNER_TEMP/eepp-dev-linux-x86_64.tar.zst" \
|
|
.
|
|
|
|
- name: Upload development environment
|
|
if: github.event_name == 'push'
|
|
uses: ./.github/actions/upload-split-artifact
|
|
with:
|
|
archive: ${{ runner.temp }}/eepp-dev-linux-x86_64.tar.zst
|
|
artifact_prefix: eepp-dev-linux-x86_64
|
|
chunk_size: 64M
|
|
retention_days: 5
|
|
max_parts: 64
|
|
- name: Set SDK version
|
|
id: sdk_version
|
|
run: |
|
|
if [[ "$GITHUB_REF" == refs/tags/eepp-* ]]; then
|
|
echo "version=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "version=nightly" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
- name: Package eepp SDK
|
|
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
|
run: |
|
|
bash projects/scripts/package_sdk.sh linux x86_64 --strip --version ${{ steps.sdk_version.outputs.version }}
|
|
- name: Upload SDK package
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: linux-eepp-sdk-x86_64
|
|
path: projects/linux/sdk/eepp-sdk-*.tar.gz
|
|
- name: Unit Tests
|
|
id: unit_tests
|
|
run: |
|
|
cd projects/scripts
|
|
bash ./run_gdb_tests.sh
|
|
- name: Native X11 Drag and Drop Tests
|
|
timeout-minutes: 5
|
|
shell: bash
|
|
run: |
|
|
mkdir -p bin/unit_tests/output/native-dnd
|
|
projects/scripts/xvfb-run-eepp \
|
|
env SDL_VIDEO_DRIVER=x11 SDL_VIDEODRIVER=x11 LIBGL_ALWAYS_SOFTWARE=1 \
|
|
bin/eepp-native-dnd-tests --automated \
|
|
2>&1 | tee bin/unit_tests/output/native-dnd/x11.log
|
|
- name: Native Wayland Drag and Drop Tests
|
|
timeout-minutes: 5
|
|
shell: bash
|
|
run: |
|
|
python3 projects/scripts/test-wayland-dnd.py \
|
|
--log-dir bin/unit_tests/output/native-dnd/wayland \
|
|
2>&1 | tee bin/unit_tests/output/native-dnd/wayland.log
|
|
- name: Native Wayland Drag and Drop Tests (2x Scale)
|
|
timeout-minutes: 5
|
|
shell: bash
|
|
run: |
|
|
python3 projects/scripts/test-wayland-dnd.py --scale=2 \
|
|
--log-dir bin/unit_tests/output/native-dnd/wayland-scale2 \
|
|
2>&1 | tee bin/unit_tests/output/native-dnd/wayland-scale2.log
|
|
- name: Inactive Benchmark Runner Tests
|
|
run: |
|
|
/usr/bin/python3 -m unittest discover -s projects/scripts/tests \
|
|
-p test_benchmark_accessibility_inactive.py
|
|
- name: Inactive Accessibility Benchmark
|
|
timeout-minutes: 2
|
|
run: |
|
|
mkdir -p bin/unit_tests/output
|
|
benchmark_exit_code=0
|
|
# Redirect only Python's JSON, not stdout inherited by activated D-Bus services.
|
|
env -u AT_SPI_BUS_ADDRESS dbus-run-session -- projects/scripts/xvfb-run-eepp \
|
|
bash -c '/usr/bin/python3 projects/scripts/benchmark_accessibility_inactive.py --json \
|
|
> bin/unit_tests/output/accessibility-inactive-benchmark.json' || benchmark_exit_code=$?
|
|
cat bin/unit_tests/output/accessibility-inactive-benchmark.json
|
|
exit "$benchmark_exit_code"
|
|
- name: Native AT-SPI Regression Tests
|
|
# A noisy performance failure must not skip correctness coverage or turn the job green.
|
|
if: ${{ !cancelled() && steps.build.outcome == 'success' && steps.unit_tests.outcome == 'success' }}
|
|
timeout-minutes: 2
|
|
run: |
|
|
mkdir -p bin/unit_tests/output
|
|
env -u AT_SPI_BUS_ADDRESS dbus-run-session -- projects/scripts/xvfb-run-eepp \
|
|
/usr/bin/python3 projects/scripts/test_atspi.py --hidden --close-primary \
|
|
> bin/unit_tests/output/atspi-regressions.log
|
|
cat bin/unit_tests/output/atspi-regressions.log
|
|
- name: Native AT-SPI Secondary Window Tests
|
|
if: ${{ !cancelled() && steps.build.outcome == 'success' && steps.unit_tests.outcome == 'success' }}
|
|
# Closes a secondary window while the client stays connected; the primary must keep answering.
|
|
timeout-minutes: 2
|
|
run: |
|
|
mkdir -p bin/unit_tests/output
|
|
env -u AT_SPI_BUS_ADDRESS dbus-run-session -- projects/scripts/xvfb-run-eepp \
|
|
/usr/bin/python3 projects/scripts/test_atspi.py --hidden --multi-window \
|
|
> bin/unit_tests/output/atspi-multi-window.log
|
|
cat bin/unit_tests/output/atspi-multi-window.log
|
|
- name: Native AT-SPI Deferred Policy Tests
|
|
if: ${{ !cancelled() && steps.build.outcome == 'success' && steps.unit_tests.outcome == 'success' }}
|
|
# Changes policy from inside a native text request; teardown must wait for its reply.
|
|
timeout-minutes: 2
|
|
run: |
|
|
mkdir -p bin/unit_tests/output
|
|
env -u AT_SPI_BUS_ADDRESS dbus-run-session -- projects/scripts/xvfb-run-eepp \
|
|
/usr/bin/python3 projects/scripts/test_atspi.py --hidden --policy-reset \
|
|
> bin/unit_tests/output/atspi-deferred-policy.log
|
|
cat bin/unit_tests/output/atspi-deferred-policy.log
|
|
- name: AT-SPI Benchmark
|
|
if: ${{ !cancelled() && steps.build.outcome == 'success' && steps.unit_tests.outcome == 'success' }}
|
|
timeout-minutes: 5
|
|
run: |
|
|
mkdir -p bin/unit_tests/output
|
|
env -u AT_SPI_BUS_ADDRESS dbus-run-session -- projects/scripts/xvfb-run-eepp \
|
|
/usr/bin/python3 projects/scripts/benchmark_atspi.py --json \
|
|
> bin/unit_tests/output/atspi-benchmark.json
|
|
cat bin/unit_tests/output/atspi-benchmark.json
|
|
- name: Publish nightly SDK package
|
|
if: github.ref == 'refs/heads/develop'
|
|
uses: softprops/action-gh-release@v3
|
|
with:
|
|
tag_name: ${{ steps.sdk_version.outputs.version }}
|
|
draft: false
|
|
prerelease: true
|
|
generate_release_notes: false
|
|
fail_on_unmatched_files: true
|
|
files: |
|
|
projects/linux/sdk/eepp-sdk-linux-x86_64-nightly.tar.gz
|
|
- name: Publish stable release package
|
|
if: startsWith(github.ref, 'refs/tags/eepp-')
|
|
uses: softprops/action-gh-release@v3
|
|
with:
|
|
tag_name: ${{ steps.sdk_version.outputs.version }}
|
|
draft: false
|
|
prerelease: false
|
|
generate_release_notes: false
|
|
fail_on_unmatched_files: true
|
|
files: |
|
|
projects/linux/sdk/eepp-sdk-linux-x86_64-*.tar.gz
|
|
- name: Upload artifacts
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: linux-test-output
|
|
path: bin/unit_tests/output/*
|