From e90ef4b90ed198c8ee8a6eacbc4f6d6c4575aaf8 Mon Sep 17 00:00:00 2001 From: tohurtv Date: Tue, 9 Dec 2025 13:45:55 -0700 Subject: [PATCH] inital packaging --- .../ISSUE_TEMPLATE/-bug-report----issue.md | 34 +++++++++++ .github/dependabot.yml | 6 ++ .github/workflows/arch-package.yml | 44 ++++++++++++++ .github/workflows/build-package.yml | 60 +++++++++++++++++++ .github/workflows/build-source.yml | 34 +++++++++++ .github/workflows/mingw.yml | 17 ++++++ .github/workflows/param-check.yml | 23 +++++++ .github/workflows/ubuntu.yml | 59 ++++++++++++++++++ debian/changelog | 6 ++ 9 files changed, 283 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/-bug-report----issue.md create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/arch-package.yml create mode 100644 .github/workflows/build-package.yml create mode 100644 .github/workflows/build-source.yml create mode 100644 .github/workflows/mingw.yml create mode 100644 .github/workflows/param-check.yml create mode 100644 .github/workflows/ubuntu.yml diff --git a/.github/ISSUE_TEMPLATE/-bug-report----issue.md b/.github/ISSUE_TEMPLATE/-bug-report----issue.md new file mode 100644 index 0000000..985a551 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/-bug-report----issue.md @@ -0,0 +1,34 @@ +--- +name: "[Bug report] - Issue" +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Do not report issue for old MangoHud versions** + +**Describe the bug** +A clear and concise description of what the bug is. + +**List relevant hardware/software information** +- Linux Distribution +- MangoHud version +- GPU + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Additional context** +Add any other context about the problem here. diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..5ace460 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/arch-package.yml b/.github/workflows/arch-package.yml new file mode 100644 index 0000000..fa0d655 --- /dev/null +++ b/.github/workflows/arch-package.yml @@ -0,0 +1,44 @@ +name: arch package + +on: + workflow_dispatch: + +jobs: + build-arch-pkg: + runs-on: ubuntu-latest + container: + image: archlinux:latest + steps: + - name: set git global safe directory + run: | + pacman -Syu git --noconfirm + git config --global --add safe.directory $(realpath .) + - uses: actions/checkout@v3 + - name: Install prerequisites + run: | + echo "ParallelDownloads = 10" >> /etc/pacman.conf + echo "\n" && echo "[multilib]" >> /etc/pacman.conf + echo "Include = /etc/pacman.d/mirrorlist" >> /etc/pacman.conf + pacman -Syu base-devel sudo meson python-mako glslang hub python-numpy python-matplotlib --noconfirm + - name: makepkg + run: | + useradd -m builduser + echo "builduser ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/builduser + chmod 0440 /etc/sudoers.d/builduser + chown -R builduser:builduser pkgbuild + cd pkgbuild + pkgver=$(git describe --tags | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g') + sed -i "s/pkgver=.*/pkgver=$pkgver/g" PKGBUILD + sudo -u builduser -- sh -c "makepkg -fsCc --noconfirm" + - name: Edit release and add files + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + set -x + assets=() + for pkg in ./pkgbuild/*mangohud*.tar.zst; + do echo $pkg; + assets+=("-a" "$pkg") + done; + tag_name="${GITHUB_REF##*/}" + hub release edit "${assets[@]}" -m "" "$tag_name" diff --git a/.github/workflows/build-package.yml b/.github/workflows/build-package.yml new file mode 100644 index 0000000..41546ea --- /dev/null +++ b/.github/workflows/build-package.yml @@ -0,0 +1,60 @@ +name: Build release package +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v3 + - name: Install build tools + run: | + set -x + sudo dpkg --add-architecture i386 + curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg + echo "deb [signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages focal main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null + sudo apt update + sudo apt -y install gcc-multilib g++-multilib ninja-build python3-setuptools \ + python3-wheel mesa-common-dev libxnvctrl-dev libdbus-1-dev \ + python3-numpy python3-matplotlib unzip hub libxkbcommon-dev libwayland-dev wget unzip \ + libxkbcommon-dev:i386 libwayland-dev:i386 gh + sudo pip3 --no-input install 'meson>=0.60' mako + wget https://github.com/KhronosGroup/glslang/releases/download/SDK-candidate-26-Jul-2020/glslang-master-linux-Release.zip + unzip glslang-master-linux-Release.zip bin/glslangValidator + sudo install -m755 bin/glslangValidator /usr/local/bin/ + - name: Prepare Artifact Git Info + shell: bash + run: | + echo "##[set-output name=branch;]${GITHUB_REF#refs/heads/}" + ARTIFACT_NAME="commit-$(git rev-parse --short "$GITHUB_SHA")" + if [ ${{ github.event_name == 'pull_request' }} ]; then + echo "##[set-output name=short-sha;]$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")" + if [ ! -z "${{ github.event.pull_request.number }}" ]; then + ARTIFACT_NAME="pr-${{ github.event.pull_request.number }}-commit-$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")" + fi + else + echo "##[set-output name=short-sha;]$(git rev-parse --short "$GITHUB_SHA")" + fi + echo "##[set-output name=artifact-metadata;]$ARTIFACT_NAME" + - name: Build and package + run: | + ./build-source.sh + ./build.sh build -Dwerror=true package release + - name: Upload assets to release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + tag_name="${GITHUB_REF##*/}" + for pkg in ./build/*.tar.*; do + gh release upload "$tag_name" "$pkg" --clobber + done + + - name: Upload artifact + uses: actions/upload-artifact@v4 + continue-on-error: true + with: + name: MangoHud-${{steps.git-vars.outputs.artifact-metadata}} + path: ${{runner.workspace}}/MangoHud/build/MangoHud-*tar.gz + retention-days: 30 \ No newline at end of file diff --git a/.github/workflows/build-source.yml b/.github/workflows/build-source.yml new file mode 100644 index 0000000..a084e70 --- /dev/null +++ b/.github/workflows/build-source.yml @@ -0,0 +1,34 @@ +name: Build source tars +on: + release: + types: [published] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Run build-source.sh + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + set -x + sudo apt update + sudo apt -y install gcc g++ ninja-build python3-pip python3-setuptools python3-wheel pkg-config mesa-common-dev libx11-dev libxnvctrl-dev libdbus-1-dev glslang-tools hub libxkbcommon-dev libwayland-dev wget unzip + sudo pip3 --no-input install 'meson>=0.60' mako + ./build-source.sh + assets=() + for asset in ./MangoHud-*-Source*.tar.*; do + assets+=("-a" "$asset") + done + tag_name="${GITHUB_REF##*/}" + hub release edit "${assets[@]}" -m "" "$tag_name" + #hub release create "${assets[@]}" -m "$tag_name" "$tag_name" + - name: Upload artifact + uses: actions/upload-artifact@v4 + continue-on-error: true + with: + name: MangoHud-${{steps.git-vars.outputs.artifact-metadata}} + path: ${{runner.workspace}}/MangoHud/build/MangoHud-*tar.gz + retention-days: 30 \ No newline at end of file diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml new file mode 100644 index 0000000..125c071 --- /dev/null +++ b/.github/workflows/mingw.yml @@ -0,0 +1,17 @@ +name: Mingw build testing + +on: [push, pull_request] +jobs: + build-mingw: + runs-on: ubuntu-latest + container: + image: archlinux:latest + steps: + - uses: actions/checkout@v3 + - name: Install prerequisites + run: | + pacman -Syu mingw-w64-gcc meson python-mako glslang mingw-w64-headers git --noconfirm + - name: configure + run: meson setup --cross-file mingw64.txt build64 + - name: build + run: ninja -C build64 \ No newline at end of file diff --git a/.github/workflows/param-check.yml b/.github/workflows/param-check.yml new file mode 100644 index 0000000..13a151a --- /dev/null +++ b/.github/workflows/param-check.yml @@ -0,0 +1,23 @@ +name: param check + +on: + push: + paths: + - 'src/overlay_params.h' + - 'README.md' + - 'data/MangoHud.conf' + +jobs: + param-check: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11.2' # Replace with the version of Python you want to use + - name: Run Python script + run: | + cd tests + python params.py diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml new file mode 100644 index 0000000..75f1ca6 --- /dev/null +++ b/.github/workflows/ubuntu.yml @@ -0,0 +1,59 @@ +name: Ubuntu build testing + +on: [push, pull_request] + +jobs: + build-test: + strategy: + matrix: + compiler: [clang, gcc] + os: [ubuntu-22.04, ubuntu-20.04] + runs-on: ${{ matrix.os }} + steps: + - name: 'Checkout' + uses: actions/checkout@v3 + - name: 'Install prerequisites' + run: | + sudo apt-get update + sudo apt-get install -y \ + appstream \ + glslang-tools \ + ninja-build \ + python3-mako \ + python3-setuptools \ + python3-wheel \ + mesa-common-dev \ + libcmocka-dev \ + libdbus-1-dev \ + libglew-dev \ + libglfw3-dev \ + libwayland-dev \ + libxnvctrl-dev \ + libxkbcommon-dev + sudo pip3 install 'meson>=0.60' + - name: 'Install clang' + if: ${{ (matrix.compiler == 'clang') }} + run: | + sudo apt-get install -y clang + echo "CC=clang" >> "$GITHUB_ENV" + echo "CXX=clang++" >> "$GITHUB_ENV" + - name: 'Install gcc' + if: ${{ (matrix.compiler == 'gcc') }} + run: | + sudo apt-get install -y gcc g++ + echo "CC=gcc" >> "$GITHUB_ENV" + echo "CXX=g++" >> "$GITHUB_ENV" + - name: 'Configure' + run: meson setup ./builddir --prefix=/usr + -D include_doc=true + -D with_xnvctrl=enabled + -D with_x11=enabled + -D with_wayland=enabled + -D with_dbus=enabled + -D mangoapp=true + -D mangohudctl=true + -D tests=enabled + - name: 'Build' + run: meson compile -C ./builddir || ninja -C ./builddir + - name: 'Install' + run: sudo meson install -C ./builddir diff --git a/debian/changelog b/debian/changelog index be9e049..ac43ed2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +mangohud (0.8.2-1rakuos1) rakuos; urgency=medium + + * Upstream Update + + -- Joshua Webb Mon, 28 Nov 2025 18:58:00 +0300 + mangohud (0.8.1-1rakuos1) rakuos; urgency=medium * Packaging for RakuOS