From f117a769b52d0ecc2e32c4b203c76944a7120c06 Mon Sep 17 00:00:00 2001 From: Paulchen-Panther <16664240+Paulchen-Panther@users.noreply.github.com> Date: Sun, 15 Oct 2023 19:47:55 +0200 Subject: [PATCH] cleanup after branch rebase --- .github/workflows/apt.yml | 6 +- .github/workflows/dnf.yml | 5 +- .github/workflows/pull-request.yml | 8 - .github/workflows/push.yml | 310 ++++++++++++++--------------- .github/workflows/release.yml | 28 --- debian/compat | 1 - 6 files changed, 160 insertions(+), 198 deletions(-) delete mode 100644 debian/compat diff --git a/.github/workflows/apt.yml b/.github/workflows/apt.yml index b73709b6..e3509c9a 100644 --- a/.github/workflows/apt.yml +++ b/.github/workflows/apt.yml @@ -39,7 +39,7 @@ on: required: false env: - ghcr: paulchen-panther # hyperion-project + ghcr: hyperion-project jobs: build: @@ -105,7 +105,7 @@ jobs: -v "${GITHUB_WORKSPACE}:/source:rw" \ ghcr.io/${{ env.ghcr }}/${{ matrix.os.distribution }}:${{ matrix.os.codename }} \ /bin/bash -c "cd /source && \ - mkdir -p debian/source && echo '${{ env.DEBIAN_FORMAT }}' > debian/source/format && \ + mkdir -p debian/source && echo '${{ env.DEBIAN_FORMAT }}' > debian/source/format && echo 10 > debian/compat && \ dch --create --distribution ${{ matrix.os.codename }} --package 'hyperion' -v '${{ env.VERSION }}~${{ matrix.os.codename }}' '${{ github.event.commits[0].message }}' && \ cp -fr LICENSE debian/copyright && \ sed 's/@ARCHITECTURE@/${{ matrix.architecture[0] }}/g; s/@STANDARDS_VERSION@/${{ env.STANDARDS_VERSION }}/g' debian/control.in > debian/control && \ @@ -121,7 +121,7 @@ jobs: publish: name: 🚀 Publish DEB packages - # if: ${{ github.repository == 'hyperion-project' && inputs.publish }} + if: ${{ github.repository == 'hyperion-project' && inputs.publish }} needs: [build] runs-on: ubuntu-latest steps: diff --git a/.github/workflows/dnf.yml b/.github/workflows/dnf.yml index 16feaf9e..42676f54 100644 --- a/.github/workflows/dnf.yml +++ b/.github/workflows/dnf.yml @@ -39,7 +39,7 @@ on: required: false env: - ghcr: paulchen-panther # hyperion-project + ghcr: hyperion-project jobs: build: @@ -56,7 +56,6 @@ jobs: ] architecture: [ [ amd64, linux/amd64 ] - # [ arm64, linux/arm64 ] temporary disabled ] steps: @@ -106,7 +105,7 @@ jobs: publish: name: 🚀 Publish RPM packages - # if: ${{ github.repository == 'hyperion-project' && inputs.publish }} + if: ${{ github.repository == 'hyperion-project' && inputs.publish }} needs: [build] runs-on: ubuntu-latest container: diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 1522c5e0..a0a6635b 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -23,19 +23,15 @@ jobs: dockerImage: [ x86_64, armv6l, armv7l, aarch64 ] include: - dockerImage: x86_64 - dockerName: Debian Buster (x86_64) dockerName: Debian Buster (x86_64) platform: x11 - dockerImage: armv6l - dockerName: Debian Buster (Raspberry Pi v1 & ZERO) dockerName: Debian Buster (Raspberry Pi v1 & ZERO) platform: rpi - dockerImage: armv7l - dockerName: Debian Buster (Raspberry Pi 2 & 3) dockerName: Debian Buster (Raspberry Pi 2 & 3) platform: rpi - dockerImage: aarch64 - dockerName: Debian Buster (Generic AARCH64) dockerName: Debian Buster (Generic AARCH64) platform: amlogic @@ -44,7 +40,6 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - submodules: recursive - name: 🔧 Prepare shell: bash @@ -58,7 +53,6 @@ jobs: env: DOCKER_IMAGE: ${{ matrix.dockerImage }} DOCKER_TAG: buster - DOCKER_TAG: buster DOCKER_NAME: ${{ matrix.dockerName }} PLATFORM: ${{ matrix.platform }} shell: bash @@ -90,7 +84,6 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - submodules: recursive - name: 🔧 Prepare shell: bash @@ -139,7 +132,6 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - submodules: recursive - name: 🔧 Prepare shell: bash diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 7141ec84..64f45adc 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -8,176 +8,176 @@ on: jobs: +################## +##### Linux ###### +################## + + Linux: + name: 🐧 ${{ matrix.dockerName }} + runs-on: ubuntu-latest + strategy: + matrix: + dockerImage: [ x86_64, armv6l, armv7l, aarch64 ] + include: + - dockerImage: x86_64 + dockerName: Debian Buster (x86_64) + platform: x11 + - dockerImage: armv6l + dockerName: Debian Buster (Raspberry Pi v1 & ZERO) + platform: rpi + - dockerImage: armv7l + dockerName: Debian Buster (Raspberry Pi 2 & 3) + platform: rpi + - dockerImage: aarch64 + dockerName: Debian Buster (Generic AARCH64) + platform: amlogic + + steps: + - name: ⬇ Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: 👷 Build + env: + DOCKER_IMAGE: ${{ matrix.dockerImage }} + DOCKER_TAG: buster + DOCKER_NAME: ${{ matrix.dockerName }} + PLATFORM: ${{ matrix.platform }} + shell: bash + run: ./.ci/ci_build.sh + + - name: 📦 Upload + if: startsWith(github.event.ref, 'refs/tags') + uses: actions/upload-artifact@v3 + with: + path: deploy/Hyperion-* + ################### -###### Linux ###### +###### macOS ###### ################### -# Linux: -# name: 🐧 ${{ matrix.dockerName }} -# runs-on: ubuntu-latest -# strategy: -# matrix: -# dockerImage: [ x86_64, armv6l, armv7l, aarch64 ] -# include: -# - dockerImage: x86_64 -# dockerName: Debian Buster (x86_64) -# platform: x11 -# - dockerImage: armv6l -# dockerName: Debian Buster (Raspberry Pi v1 & ZERO) -# platform: rpi -# - dockerImage: armv7l -# dockerName: Debian Buster (Raspberry Pi 2 & 3) -# platform: rpi -# - dockerImage: aarch64 -# dockerName: Debian Buster (Generic AARCH64) -# platform: amlogic + macOS: + name: 🍏 macOS + runs-on: macos-latest + steps: + - name: ⬇ Checkout + uses: actions/checkout@v4 + with: + submodules: recursive -# steps: -# - name: ⬇ Checkout -# uses: actions/checkout@v4 -# with: -# submodules: recursive + - name: 🔧 Prepare + shell: bash + run: | + echo '::group::Install dependencies' + ./.ci/ci_install.sh + echo '::endgroup::' -# - name: 👷 Build -# env: -# DOCKER_IMAGE: ${{ matrix.dockerImage }} -# DOCKER_TAG: buster -# DOCKER_NAME: ${{ matrix.dockerName }} -# PLATFORM: ${{ matrix.platform }} -# shell: bash -# run: ./.ci/ci_build.sh + - name: 👷 Build + env: + PLATFORM: osx + shell: bash + run: ./.ci/ci_build.sh -# - name: 📦 Upload -# if: startsWith(github.event.ref, 'refs/tags') -# uses: actions/upload-artifact@v3 -# with: -# path: deploy/Hyperion-* + - name: 📦 Upload + if: startsWith(github.event.ref, 'refs/tags') + uses: actions/upload-artifact@v3 + with: + path: build/Hyperion-* -# ################### -# ###### macOS ###### -# ################### +##################### +###### Windows ###### +##################### -# macOS: -# name: 🍏 macOS -# runs-on: macos-latest -# steps: -# - name: ⬇ Checkout -# uses: actions/checkout@v4 -# with: -# submodules: recursive + windows: + name: 🪟 Windows + runs-on: windows-2022 + env: + VCINSTALLDIR: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC' + QT_VERSION: 5.15.2 + steps: + - name: ⬇ Checkout + uses: actions/checkout@v4 + with: + submodules: recursive -# - name: 🔧 Prepare -# shell: bash -# run: | -# echo '::group::Install dependencies' -# ./.ci/ci_install.sh -# echo '::endgroup::' + - name: 💾 Cache/Restore + uses: actions/cache@v3 + with: + path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey + key: ${{ runner.os }}-chocolatey -# - name: 👷 Build -# env: -# PLATFORM: osx -# shell: bash -# run: ./.ci/ci_build.sh + - name: 📥 Install OpenSSL, DirectX SDK, libjpeg-turbo + shell: powershell + run: | + choco install --no-progress openssl --version=1.1.1.2100 -y + choco install --no-progress directx-sdk -y + Invoke-WebRequest https://netcologne.dl.sourceforge.net/project/libjpeg-turbo/2.0.6/libjpeg-turbo-2.0.6-vc64.exe -OutFile libjpeg-turbo.exe -UserAgent NativeHost + .\libjpeg-turbo /S -# - name: 📦 Upload -# if: startsWith(github.event.ref, 'refs/tags') -# uses: actions/upload-artifact@v3 -# with: -# path: build/Hyperion-* + - name: 📥 Install Qt + uses: jurplel/install-qt-action@v3 + with: + version: ${{env.QT_VERSION}} + target: 'desktop' + arch: 'win64_msvc2019_64' + cache: 'true' + cache-key-prefix: 'cache-qt-windows' -# ##################### -# ###### Windows ###### -# ##################### + - name: 🛠️ Setup + shell: cmd + run: call "${{env.VCINSTALLDIR}}\Auxiliary\Build\vcvars64.bat" -# windows: -# name: 🪟 Windows -# runs-on: windows-2022 -# env: -# VCINSTALLDIR: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC' -# QT_VERSION: 5.15.2 -# steps: -# - name: ⬇ Checkout -# uses: actions/checkout@v4 -# with: -# submodules: recursive + - name: 👷 Build + env: + PLATFORM: windows + shell: bash + run: | + echo '::group::Build packages' + ./.ci/ci_build.sh + echo '::endgroup::' -# - name: 💾 Cache/Restore -# uses: actions/cache@v3 -# with: -# path: C:\Users\runneradmin\AppData\Local\Temp\chocolatey -# key: ${{ runner.os }}-chocolatey + - name: 📦 Upload + if: startsWith(github.event.ref, 'refs/tags') + uses: actions/upload-artifact@v3 + with: + path: build/Hyperion-* + retention-days: 1 -# - name: 📥 Install OpenSSL, DirectX SDK, libjpeg-turbo -# shell: powershell -# run: | -# choco install --no-progress openssl --version=1.1.1.2100 -y -# choco install --no-progress directx-sdk -y -# Invoke-WebRequest https://netcologne.dl.sourceforge.net/project/libjpeg-turbo/2.0.6/libjpeg-turbo-2.0.6-vc64.exe -OutFile libjpeg-turbo.exe -UserAgent NativeHost -# .\libjpeg-turbo /S +##################################### +###### Publish GitHub Releases ###### +##################################### -# - name: 📥 Install Qt -# uses: jurplel/install-qt-action@v3 -# with: -# version: ${{env.QT_VERSION}} -# target: 'desktop' -# arch: 'win64_msvc2019_64' -# cache: 'true' -# cache-key-prefix: 'cache-qt-windows' + github_publish: + name: 🚀 Publish GitHub Releases + if: startsWith(github.event.ref, 'refs/tags') + needs: [Linux, macOS, windows] + runs-on: ubuntu-latest + steps: + - name: ⬇ Checkout + uses: actions/checkout@v4 -# - name: 🛠️ Setup -# shell: cmd -# run: call "${{env.VCINSTALLDIR}}\Auxiliary\Build\vcvars64.bat" + - name: 🔧 Prepare + run: | + echo '::group::Generate environment variables from .version and tag' + echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV + echo "VERSION=$(tr -d '\n' < .version)" >> $GITHUB_ENV + echo '::endgroup::' -# - name: 👷 Build -# env: -# PLATFORM: windows -# shell: bash -# run: | -# echo '::group::Build packages' -# ./.ci/ci_build.sh -# echo '::endgroup::' + - name: 💾 Artifact download + uses: actions/download-artifact@v3.0.2 + with: + path: artifacts -# - name: 📦 Upload -# if: startsWith(github.event.ref, 'refs/tags') -# uses: actions/upload-artifact@v3 -# with: -# path: build/Hyperion-* -# retention-days: 1 - -# ##################################### -# ###### Publish GitHub Releases ###### -# ##################################### - -# github_publish: -# name: 🚀 Publish GitHub Releases -# if: startsWith(github.event.ref, 'refs/tags') -# needs: [Linux, macOS, windows] -# runs-on: ubuntu-latest -# steps: -# - name: ⬇ Checkout -# uses: actions/checkout@v4 - -# - name: 🔧 Prepare -# run: | -# echo '::group::Generate environment variables from .version and tag' -# echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV -# echo "VERSION=$(tr -d '\n' < .version)" >> $GITHUB_ENV -# echo '::endgroup::' - -# - name: 💾 Artifact download -# uses: actions/download-artifact@v3.0.2 -# with: -# path: artifacts - -# - name: 📦 Upload -# uses: softprops/action-gh-release@v1 -# with: -# name: Hyperion ${{ env.VERSION }} -# tag_name: ${{ env.TAG }} -# files: "artifacts/**" -# draft: true -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: 📦 Upload + uses: softprops/action-gh-release@v1 + with: + name: Hyperion ${{ env.VERSION }} + tag_name: ${{ env.TAG }} + files: "artifacts/**" + draft: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ################################### ###### APT reusable workflow ###### @@ -185,8 +185,8 @@ jobs: apt_build: name: APT Build - # if: startsWith(github.event.ref, 'refs/tags') - # needs: [Linux, macOS, windows] + if: startsWith(github.event.ref, 'refs/tags') + needs: [Linux, macOS, windows] uses: ./.github/workflows/apt.yml secrets: inherit with: @@ -199,8 +199,8 @@ jobs: dnf_build: name: DNF Build - # if: startsWith(github.event.ref, 'refs/tags') - # needs: [Linux, macOS, windows] + if: startsWith(github.event.ref, 'refs/tags') + needs: [Linux, macOS, windows] uses: ./.github/workflows/dnf.yml secrets: inherit with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 240f3ba3..c25a1661 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,31 +18,3 @@ jobs: repository: hyperion-project/HyperBian token: ${{ secrets.HYPERION_BOT_TOKEN }} event-type: hyperion_push - - - # TODO FOR APT/DNF: - - # dnf_release: - # name: Release DNF repository - # runs-on: ubuntu-latest - # steps: - # - name: Create Backup and Release draft files on DNF repository - # run: | - # sudo apt-get install -y ncftp - # mkdir backup draft_folder - # ncftpget -R -T -V -u ${{ secrets.YUM_USER }} -p ${{ secrets.YUM_PASSWORD }} yum.hyperion-project.org ./backup/ ./ - # cd backup/ && mv ${{ secrets.DRAFT_FOLDER }}* ../draft_folder/ && rm -f backup.tar.gz - # tar -zcf ../backup.tar.gz . - # find -maxdepth 1 $(printf "! -name %s " ${{ secrets.EXCLUDED_FTP_FILES }}) - # find -maxdepth 1 $(printf "! -name %s " ${{ secrets.EXCLUDED_FTP_FILES }}) -exec rm -rf {} \; - # mv ../draft_folder/* . && mv ../backup.tar.gz . - - # - name: Update DNF Package Repository (Release) - # uses: SamKirkland/FTP-Deploy-Action@4.3.3 - # with: - # server: yum.hyperion-project.org - # username: ${{ secrets.YUM_USER }} - # password: ${{ secrets.YUM_PASSWORD }} - # local-dir: "./backup/" - # server-dir: ./ - # dangerous-clean-slate: true diff --git a/debian/compat b/debian/compat deleted file mode 100644 index f599e28b..00000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -10