github actions

This commit is contained in:
galister
2025-12-12 20:38:46 +09:00
parent 8a81441645
commit c95e4a93f6
16 changed files with 45 additions and 15 deletions

46
.github/ISSUE_TEMPLATE/bug-report.md vendored Normal file
View File

@@ -0,0 +1,46 @@
---
name: Bug Report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
## Description
<!--
If this is a regression, please mention which version was working previously.
-->
## System Info
**Linux Distribution**:
<!-- Paste output of `echo $XDG_CURRENT_DESKTOP`, optionally add version -->
**Desktop Environment**:
<!-- Paste output of `uname -r` -->
**Kernel version**:
**VR Runtime**:
- [ ] Monado/WiVRn
- [ ] SteamVR/ALVR
<!-- Run `vulkaninfo --summary` and paste the devices section from the bottom. -->
**GPU models and driver versions**:
## Overlay Logs
<!-- Start the overlay once more with the following environment variables:
RUST_BACKTRACE=full
RUST_LOG=debug
If your issue is graphical or crash or freeze, also add:
VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation
Next, create the empty log file: echo > /tmp/wlx.log
Be sure to go and reproduce the issue once more, after these have been set.
Upload the log file from: /tmp/wlx.log
-->

View File

@@ -0,0 +1,28 @@
name: Check All Features
on:
pull_request:
branches: [ "!main" ]
env:
CARGO_TERM_COLOR: always
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
jobs:
build:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ./wlx-overlay-s
steps:
- uses: actions/checkout@v4
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Prepare Environment
run: |
../.github/workflows/scripts/appimage_prepare_env.sh
- name: Build
run: cargo build --verbose --all-features
- name: Run tests
run: cargo test --verbose --all-features

38
.github/workflows/build-appimage.yml vendored Normal file
View File

@@ -0,0 +1,38 @@
name: Build AppImage
on:
push:
branches:
- 'main'
- 'staging'
env:
APPDIR: WlxOverlay-S.AppDir
CARGO_TERM_COLOR: always
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
jobs:
build_appimage:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ./wlx-overlay-s
steps:
- uses: actions/checkout@v3
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Prepare Environment
run: |
../.github/workflows/scripts/appimage_prepare_env.sh
- name: Cargo Build
run: |
../.github/workflows/scripts/appimage_build_wlx.sh
- name: Package AppImage
run: |
../.github/workflows/scripts/appimage_package.sh
- name: Upload AppImage
uses: actions/upload-artifact@v4
with:
name: WlxOverlay-S-${{ github.ref_name }}-x86_64.AppImage
path: ./WlxOverlay-S-x86_64.AppImage

32
.github/workflows/build-default.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: Check Default
on:
pull_request:
#branches: [ "!main" ]
env:
CARGO_TERM_COLOR: always
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
jobs:
build:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ./wlx-overlay-s
steps:
- uses: actions/checkout@v4
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Prepare Environment
run: |
../.github/workflows/scripts/appimage_prepare_env.sh
- name: Run cargo fmt
run: cargo fmt --check
- name: Build
run: cargo build --verbose
- name: Run clippy
run: cargo clippy --no-deps
- name: Run tests
run: cargo test --verbose

View File

@@ -0,0 +1,41 @@
name: Build AppImage (with WayVR Dashboard)
on:
push:
branches:
- 'main'
- 'staging'
env:
APPDIR: WlxOverlay-S-Full.AppDir
CARGO_TERM_COLOR: always
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
jobs:
build_appimage:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ./wlx-overlay-s
steps:
- uses: actions/checkout@v3
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Prepare Environment
run: |
../.github/workflows/scripts/appimage_prepare_env.sh
- name: Cargo Build
run: |
../.github/workflows/scripts/appimage_build_wlx.sh
- name: Build WayVR Dashboard
run: |
../.github/workflows/scripts/appimage_build_wayvr_dashboard.sh
- name: Package AppImage
run: |
../.github/workflows/scripts/appimage_package_full.sh
- name: Upload AppImage
uses: actions/upload-artifact@v4
with:
name: WlxOverlay-S-Full-${{ github.ref_name }}-x86_64.AppImage
path: ./WlxOverlay-S-Full-x86_64.AppImage

View File

@@ -0,0 +1,28 @@
name: Check Wayland+OpenVR
on:
pull_request:
#branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
jobs:
build:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ./wlx-overlay-s
steps:
- uses: actions/checkout@v4
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Prepare Environment
run: |
../.github/workflows/scripts/appimage_prepare_env.sh
- name: Build
run: cargo build --verbose --no-default-features --features=wayland,openvr
- name: Run tests
run: cargo test --verbose --no-default-features --features=wayland,openvr

View File

@@ -0,0 +1,28 @@
name: Check Wayland+OpenXR+OpenVR+WayVR
on:
pull_request:
#branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
jobs:
build:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ./wlx-overlay-s
steps:
- uses: actions/checkout@v4
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Prepare Environment
run: |
../.github/workflows/scripts/appimage_prepare_env.sh
- name: Build
run: cargo build --verbose --no-default-features --features=wayland,openxr,openvr,wayvr
- name: Run tests
run: cargo test --verbose --no-default-features --features=wayland,openxr,openvr,wayvr

View File

@@ -0,0 +1,28 @@
name: Check Wayland+OpenXR
on:
pull_request:
#branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
jobs:
build:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ./wlx-overlay-s
steps:
- uses: actions/checkout@v4
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Prepare Environment
run: |
../.github/workflows/scripts/appimage_prepare_env.sh
- name: Build
run: cargo build --verbose --no-default-features --features=wayland,openxr
- name: Run tests
run: cargo test --verbose --no-default-features --features=wayland,openxr

28
.github/workflows/build-x11-openvr.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
name: Check X11+OpenVR
on:
pull_request:
#branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
jobs:
build:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ./wlx-overlay-s
steps:
- uses: actions/checkout@v4
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Prepare Environment
run: |
../.github/workflows/scripts/appimage_prepare_env.sh
- name: Build
run: cargo build --verbose --no-default-features --features=x11,openvr
- name: Run tests
run: cargo test --verbose --no-default-features --features=x11,openvr

28
.github/workflows/build-x11-openxr.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
name: Check X11+OpenXR
on:
pull_request:
#branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
jobs:
build:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ./wlx-overlay-s
steps:
- uses: actions/checkout@v4
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Prepare Environment
run: |
../.github/workflows/scripts/appimage_prepare_env.sh
- name: Build
run: cargo build --verbose --no-default-features --features=x11,openxr
- name: Run tests
run: cargo test --verbose --no-default-features --features=x11,openxr

85
.github/workflows/make-release.yml vendored Normal file
View File

@@ -0,0 +1,85 @@
name: Make Release
on:
push:
tags:
- 'v**'
env:
APPDIR: WlxOverlay-S.AppDir
CARGO_TERM_COLOR: always
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
jobs:
make_release:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ./wlx-overlay-s
steps:
- uses: actions/checkout@v3
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Prepare Environment
run: |
../.github/workflows/scripts/appimage_prepare_env.sh
- name: Cargo Build
run: |
cargo build --release
cp target/release/wlx-overlay-s ${APPDIR}/usr/bin
chmod +x ${APPDIR}/usr/bin/wlx-overlay-s
- name: Package AppImage
run: |
export VERSION=$GITHUB_REF_NAME
./linuxdeploy-x86_64.AppImage -dwlx-overlay-s.desktop -iwlx-overlay-s.png --appdir=${APPDIR} --output appimage --exclude-library '*libpipewire*'
mv WlxOverlay-S-$VERSION-x86_64.AppImage WlxOverlay-S-x86_64.AppImage
- name: Make tarball
run: |
pip install portage pycargoebuild
wget https://github.com/gentoo/gentoo/raw/refs/heads/master/metadata/license-mapping.conf
mkdir dist
pycargoebuild --distdir dist --license-mapping license-mapping.conf --crate-tarball --crate-tarball-path wlx-overlay-s-crates.tar.xz
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_KEY }}
with:
tag_name: ${{ github.ref_name }}
release_name: WlxOverlay-S ${{ github.ref_name }}
draft: true
prerelease: false
- name: Upload ELF
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_KEY }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/release/wlx-overlay-s
asset_name: wlx-overlay-s
asset_content_type: application/octet-stream
- name: Upload AppImage
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_KEY }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./WlxOverlay-S-x86_64.AppImage
asset_name: WlxOverlay-S-${{ github.ref_name }}-x86_64.AppImage
asset_content_type: application/octet-stream
- name: Upload crates tarball
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_KEY }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./wlx-overlay-s-crates.tar.xz
asset_name: WlxOverlay-S-${{ github.ref_name }}-crates.tar.xz
asset_content_type: application/x-gtar

View File

@@ -0,0 +1,34 @@
#!/bin/sh
git clone --depth=1 https://github.com/olekolek1000/wayvr-dashboard.git wayvr-dashboard
WLX_DIR=$(realpath $(pwd))
cd wayvr-dashboard
.github/workflows/build.sh
# See https://github.com/olekolek1000/wayvr-dashboard/blob/master/.github/workflows/appimage.sh
cd ..
cd ${APPDIR}
# Fix webkit
echo "Copying webkit runtime executables"
# Copy runtime executables
find -L /usr/lib /usr/libexec -name WebKitNetworkProcess -exec mkdir -p . ';' -exec cp -v --parents '{}' . ';' || true
find -L /usr/lib /usr/libexec -name WebKitWebProcess -exec mkdir -p . ';' -exec cp -v --parents '{}' . ';' || true
find -L /usr/lib /usr/libexec -name libwebkit2gtkinjectedbundle.so -exec mkdir -p . ';' -exec cp --parents '{}' . ';' || true
echo "Patching webkit lib"
# Patch libwebkit .so file: Replace 4 bytes containing "/usr" into "././". Required!
TARGET_WEBKIT_SO="./usr/lib/libwebkit2gtk-4.1.so.0"
cp /usr/lib/x86_64-linux-gnu/libwebkit2gtk-4.1.so.0 ${TARGET_WEBKIT_SO}
sed -i -e "s|/usr|././|g" "${TARGET_WEBKIT_SO}"
cd ${WLX_DIR}
DASH_PATH="${WLX_DIR}/wayvr-dashboard/temp/wayvr-dashboard"
chmod +x ${DASH_PATH}
# Put resulting executable into wlx AppDir
cp ${DASH_PATH} ${APPDIR}/usr/bin/wayvr-dashboard

View File

@@ -0,0 +1,4 @@
#!/bin/sh
cargo build --release
mv target/release/wlx-overlay-s ${APPDIR}/usr/bin
chmod +x ${APPDIR}/usr/bin/wlx-overlay-s

View File

@@ -0,0 +1,4 @@
#!/bin/sh
export VERSION=$GITHUB_REF_NAME
./linuxdeploy-x86_64.AppImage -dwlx-overlay-s.desktop -iwlx-overlay-s.png --appdir=${APPDIR} --output appimage --exclude-library '*libpipewire*'
mv WlxOverlay-S-$VERSION-x86_64.AppImage WlxOverlay-S-x86_64.AppImage

View File

@@ -0,0 +1,4 @@
#!/bin/sh
export VERSION=$GITHUB_REF_NAME
./linuxdeploy-x86_64.AppImage -dwlx-overlay-s.desktop -iwlx-overlay-s.png --appdir=${APPDIR} --output appimage --exclude-library '*libpipewire*'
mv WlxOverlay-S-$VERSION-x86_64.AppImage WlxOverlay-S-Full-x86_64.AppImage

View File

@@ -0,0 +1,15 @@
#!/bin/sh
sudo add-apt-repository -syn universe
sudo add-apt-repository -syn ppa:pipewire-debian/pipewire-upstream || sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 25088A0359807596
sudo apt-get update
sudo apt-get install -y fuse cmake pkg-config fontconfig libasound2-dev libxkbcommon-dev libxkbcommon-x11-0 libxkbcommon-x11-dev libopenxr-dev libfontconfig-dev libdbus-1-dev libpipewire-0.3-0 libpipewire-0.3-dev libspa-0.2-dev libx11-6 libxext6 libxrandr2 libx11-dev libxext-dev libxrandr-dev libopenvr-dev libopenvr-api1 libwayland-dev libegl-dev libxcb-glx0 libxcb-glx0-dev
rustup update
if [ "$APPDIR" != "" ]; then
test -f linuxdeploy-x86_64.AppImage || wget -q "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
chmod +x linuxdeploy-x86_64.AppImage
test -d ${APPDIR} && rm -rf ${APPDIR}
mkdir -p ${APPDIR}/usr/bin
fi