Skip to content

Commit

Permalink
ci(workflows): minor fixes and updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Feb 2, 2025
1 parent 6efc687 commit c77667d
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 20 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/release-notifier-moonlight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: discord
uses: sarisia/actions-status-discord@v1 # https://github.com/sarisia/actions-status-discord
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.DISCORD_RELEASE_WEBHOOK_MOONLIGHT }}
avatar_url: ${{ vars.ORG_LOGO_URL }}256
color: 0x${{ vars.COLOR_HEX_GREEN }}
description: ${{ github.event.release.body }}
nodetail: true
nofail: false
username: ${{ secrets.DISCORD_USERNAME }}
avatar_url: ${{ secrets.ORG_LOGO_URL }}
title: ${{ github.event.repository.name }} ${{ github.ref_name }} Released
description: ${{ github.event.release.body }}
color: 0xFF4500
username: ${{ secrets.DISCORD_USERNAME }}
webhook: ${{ secrets.DISCORD_RELEASE_WEBHOOK_MOONLIGHT }}
23 changes: 21 additions & 2 deletions .github/workflows/update-flathub-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ name: Update flathub repo

on:
release:
types: [released]
types:
- released

concurrency:
group: "${{ github.workflow }}-${{ github.event.release.tag_name }}"
Expand Down Expand Up @@ -114,7 +115,7 @@ jobs:
out-file-path: "flathub/${{ env.FLATHUB_PKG }}"
extract: true

- name: Delete arhive
- name: Delete archive
if: >-
steps.check-label.outputs.hasTopic == 'true' &&
steps.check-release.outputs.isLatestRelease == 'true'
Expand Down Expand Up @@ -172,6 +173,7 @@ jobs:
git checkout $main_commit
- name: Create/Update Pull Request
id: create-pr
if: >-
steps.check-label.outputs.hasTopic == 'true' &&
steps.check-release.outputs.isLatestRelease == 'true' &&
Expand All @@ -185,3 +187,20 @@ jobs:
delete-branch: true
title: "chore: Update ${{ env.FLATHUB_PKG }} to ${{ github.event.release.tag_name }}"
body: ${{ github.event.release.body }}

- name: Automerge PR
env:
GH_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
if: >-
steps.check-label.outputs.hasTopic == 'true' &&
steps.check-release.outputs.isLatestRelease == 'true' &&
fromJson(steps.download.outputs.downloaded_files)[0]
run: |
gh \
pr \
merge \
--auto \
--delete-branch \
--repo "flathub/${{ env.FLATHUB_PKG }}" \
--squash \
"${{ steps.create-pr.outputs.pull-request-number }}"
25 changes: 25 additions & 0 deletions .github/workflows/update-pacman-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,16 @@ jobs:
out-file-path: "pkgbuilds/${{ steps.prep.outputs.pkg_name }}"
extract: true

- name: Remove pkg.tar.gz
if: >-
steps.check-label.outputs.hasTopic == 'true' &&
steps.check-release.outputs.isLatestRelease == 'true' &&
fromJson(steps.download.outputs.downloaded_files)[0]
run: |
rm -f "pkgbuilds/${{ steps.prep.outputs.pkg_name }}"
- name: Create/Update Pull Request
id: create-pr
if: >-
steps.check-label.outputs.hasTopic == 'true' &&
steps.check-release.outputs.isLatestRelease == 'true' &&
Expand All @@ -105,3 +114,19 @@ jobs:
labels: |
auto-approve
auto-merge
- name: Automerge PR
env:
GH_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
if: >-
steps.check-label.outputs.hasTopic == 'true' &&
steps.check-release.outputs.isLatestRelease == 'true' &&
fromJson(steps.download.outputs.downloaded_files)[0]
run: |
gh \
pr \
merge \
--auto \
--delete-branch \
--squash \
"${{ steps.create-pr.outputs.pull-request-number }}"
26 changes: 14 additions & 12 deletions scripts/linux_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ shift $((OPTIND -1))
# dependencies array to build out
dependencies=()

function add_debain_based_deps() {
function add_debian_based_deps() {
dependencies+=(
"bison" # required if we need to compile doxygen
"build-essential"
Expand Down Expand Up @@ -128,8 +128,8 @@ function add_debain_based_deps() {
fi
}

function add_debain_deps() {
add_debain_based_deps
function add_debian_deps() {
add_debian_based_deps
dependencies+=(
"libayatana-appindicator3-dev"
)
Expand All @@ -141,7 +141,7 @@ function add_ubuntu_deps() {
${sudo_cmd} add-apt-repository ppa:ubuntu-toolchain-r/test -y
fi

add_debain_based_deps
add_debian_based_deps
dependencies+=(
"libappindicator3-dev"
)
Expand Down Expand Up @@ -297,12 +297,12 @@ function run_install() {
$package_update_command

if [ "$distro" == "debian" ]; then
add_debain_deps
add_debian_deps
elif [ "$distro" == "ubuntu" ]; then
add_ubuntu_deps
elif [ "$distro" == "fedora" ]; then
add_fedora_deps
${sudo_cmd} dnf group install "Development Tools" -y
${sudo_cmd} dnf group install "$dev_tools_group" -y
fi

# Install the dependencies
Expand Down Expand Up @@ -438,24 +438,26 @@ if grep -q "Debian GNU/Linux 12 (bookworm)" /etc/os-release; then
cuda_build="525.60.13"
gcc_version="12"
nvm_node=0
elif grep -q "PLATFORM_ID=\"platform:f39\"" /etc/os-release; then
elif grep -q "PLATFORM_ID=\"platform:f40\"" /etc/os-release; then
distro="fedora"
version="39"
version="40"
package_update_command="${sudo_cmd} dnf update -y"
package_install_command="${sudo_cmd} dnf install -y"
cuda_version="12.4.0"
cuda_build="550.54.14"
cuda_version=
cuda_build=
gcc_version="13"
nvm_node=0
elif grep -q "PLATFORM_ID=\"platform:f40\"" /etc/os-release; then
dev_tools_group="Development Tools"
elif grep -q "PLATFORM_ID=\"platform:f41\"" /etc/os-release; then
distro="fedora"
version="40"
version="41"
package_update_command="${sudo_cmd} dnf update -y"
package_install_command="${sudo_cmd} dnf install -y"
cuda_version=
cuda_build=
gcc_version="13"
nvm_node=0
dev_tools_group="development-tools"
elif grep -q "Ubuntu 22.04" /etc/os-release; then
distro="ubuntu"
version="22.04"
Expand Down

0 comments on commit c77667d

Please sign in to comment.