Skip to content

Commit

Permalink
Reconstruct necessary action workflows & Dependabot rules (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
regginator authored Oct 3, 2024
1 parent a1bd611 commit 94091e1
Show file tree
Hide file tree
Showing 5 changed files with 137 additions and 35 deletions.
40 changes: 40 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: weekly
labels:
- "infra"
reviewers:
- regginator
commit-message:
prefix: "ci"

- package-ecosystem: nuget
directory: /
open-pull-requests-limit: 10
schedule:
interval: daily
labels:
- "infra"
reviewers:
- regginator
commit-message:
prefix: nuget
groups:
Avalonia:
patterns:
- "*Avalonia*"
Silk.NET:
patterns:
- "Silk.NET*"
OpenTK:
patterns:
- "OpenTK*"
SixLabors:
patterns:
- "SixLabors*"
NUnit:
patterns:
- "NUnit*"
35 changes: 35 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
audio:
- changed-files:
- any-glob-to-any-file: 'src/Ryujinx.Audio*/**'

cpu:
- changed-files:
- any-glob-to-any-file: ['src/ARMeilleure/**', 'src/Ryujinx.Cpu/**', 'src/Ryujinx.Memory/**']

gpu:
- changed-files:
- any-glob-to-any-file: ['src/Ryujinx.Graphics.*/**', 'src/Spv.Generator/**', 'src/Ryujinx.ShaderTools/**']

'graphics-backend:opengl':
- changed-files:
- any-glob-to-any-file: 'src/Ryujinx.Graphics.OpenGL/**'

'graphics-backend:vulkan':
- changed-files:
- any-glob-to-any-file: ['src/Ryujinx.Graphics.Vulkan/**', 'src/Spv.Generator/**']

gui:
- changed-files:
- any-glob-to-any-file: ['src/Ryujinx/**', 'src/Ryujinx.UI.Common/**', 'src/Ryujinx.UI.LocaleGenerator/**', 'src/Ryujinx.Gtk3/**']

horizon:
- changed-files:
- any-glob-to-any-file: ['src/Ryujinx.HLE/**', 'src/Ryujinx.Horizon/**']

kernel:
- changed-files:
- any-glob-to-any-file: 'src/Ryujinx.HLE/HOS/Kernel/**'

infra:
- changed-files:
- any-glob-to-any-file: ['.github/**', 'distribution/**', 'Directory.Packages.props']
6 changes: 2 additions & 4 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,14 @@ jobs:
# For some unknown reason this step sometimes fails with exit code 139 (segfault?),
# so in that case we'll try again (3 tries max).
- name: Run dotnet format style
uses: TSRBerry/unstable-commands@v1
uses: ryujinx-mirror/unstable-commands@releases/v1.0.6
with:
commands: dotnet format style --severity info --verify-no-changes --report ./style-report.json -v d
timeout-minutes: 5
retry-codes: 139

# For some unknown reason this step sometimes fails with exit code 139 (segfault?),
# so in that case we'll try again (3 tries max).
- name: Run dotnet format analyzers
uses: TSRBerry/unstable-commands@v1
uses: ryujinx-mirror/unstable-commands@releases/v1.0.6
with:
commands: dotnet format analyzers --severity info --verify-no-changes --report ./analyzers-report.json -v d
timeout-minutes: 5
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/pr_triage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Pull Request Triage"
on:
pull_request_target:
types: [opened, ready_for_review]

jobs:
triage:
runs-on: ubuntu-latest

permissions:
contents: read
pull-requests: write

steps:
- name: Fetch labeler.yml
uses: actions/checkout@v4
with:
# Ensure we pin the source origin as pull_request_target run under forks.
fetch-depth: 0
repository: ryujinx-mirror/ryujinx
ref: mirror/master

- name: Update labels based on changes in PR
uses: actions/labeler@v5
with:
sync-labels: true
dot: true
64 changes: 33 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ concurrency: release
env:
POWERSHELL_TELEMETRY_OPTOUT: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
RYUJINX_BASE_VERSION: "1.1"
RYUJINX_TARGET_RELEASE_CHANNEL_NAME: "mirror/master"
RYUJINX_TARGET_RELEASE_CHANNEL_OWNER: "ryujinx-mirror"
RYUJINX_TARGET_RELEASE_CHANNEL_REPO: "ryujinx"
#RYUJINX_BASE_VERSION: "1.1" # NOTE: For now, releases for the fork will be named after Git revision hashes, this is ignored

# Should be unnecessary for us, we're releasing in-repo
#RYUJINX_TARGET_RELEASE_CHANNEL_OWNER: "ryujinx-mirror"
#RYUJINX_TARGET_RELEASE_CHANNEL_REPO: "ryujinx"
#RYUJINX_TARGET_RELEASE_CHANNEL_NAME: "mirror/master"

jobs:
tag:
Expand All @@ -30,7 +32,7 @@ jobs:
- name: Get version info
id: version_info
run: |
echo "build_version=`echo r${{ github.sha }} | cut -c1-9`" >> $GITHUB_OUTPUT
echo "build_version=r`echo ${{ github.sha }} | cut -c1-8`" >> $GITHUB_OUTPUT
shell: bash

- name: Create tag
Expand All @@ -52,8 +54,8 @@ jobs:
makeLatest: "true"
omitBody: true
omitBodyDuringUpdate: true
owner: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}
repo: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}
#owner: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}
#repo: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}
token: ${{ secrets.GITHUB_TOKEN }}

release:
Expand All @@ -79,19 +81,19 @@ jobs:
- name: Get version info
id: version_info
run: |
echo "build_version=`echo r${{ github.sha }} | cut -c1-9`" >> $GITHUB_OUTPUT
echo "build_version=r`echo ${{ github.sha }} | cut -c1-8`" >> $GITHUB_OUTPUT
echo "git_short_hash=$(git rev-parse --short "${{ github.sha }}")" >> $GITHUB_OUTPUT
shell: bash

#- name: Configure for release
# run: |
# sed -r --in-place 's/\%\%RYUJINX_BUILD_VERSION\%\%/${{ steps.version_info.outputs.build_version }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
# sed -r --in-place 's/\%\%RYUJINX_BUILD_GIT_HASH\%\%/${{ steps.version_info.outputs.git_short_hash }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
# sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_NAME\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_NAME }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
# sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_OWNER\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
# sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_REPO\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
# sed -r --in-place 's/\%\%RYUJINX_CONFIG_FILE_NAME\%\%/Config\.json/g;' src/Ryujinx.Common/ReleaseInformation.cs
# shell: bash
- name: Configure for release
run: |
#sed -r --in-place 's/\%\%RYUJINX_BUILD_VERSION\%\%/${{ steps.version_info.outputs.build_version }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
sed -r --in-place 's/\%\%RYUJINX_BUILD_GIT_HASH\%\%/${{ steps.version_info.outputs.git_short_hash }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_OWNER\%\%/${{ github.repository_owner }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_REPO\%\%/${{ github.event.repository.name }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_NAME\%\%/${{ github.ref_name }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
sed -r --in-place 's/\%\%RYUJINX_CONFIG_FILE_NAME\%\%/Config\.json/g;' src/Ryujinx.Common/ReleaseInformation.cs
shell: bash

- name: Create output dir
run: "mkdir release_output"
Expand Down Expand Up @@ -142,8 +144,8 @@ jobs:
omitBodyDuringUpdate: true
allowUpdates: true
replacesArtifacts: true
owner: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}
repo: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}
#owner: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}
#repo: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}
token: ${{ secrets.GITHUB_TOKEN }}

macos_release:
Expand Down Expand Up @@ -177,18 +179,18 @@ jobs:
- name: Get version info
id: version_info
run: |
echo "build_version=`echo r${{ github.sha }} | cut -c1-9`" >> $GITHUB_OUTPUT
echo "build_version=r`echo ${{ github.sha }} | cut -c1-8`" >> $GITHUB_OUTPUT
echo "git_short_hash=$(git rev-parse --short "${{ github.sha }}")" >> $GITHUB_OUTPUT
#- name: Configure for release
# run: |
# sed -r --in-place 's/\%\%RYUJINX_BUILD_VERSION\%\%/${{ steps.version_info.outputs.build_version }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
# sed -r --in-place 's/\%\%RYUJINX_BUILD_GIT_HASH\%\%/${{ steps.version_info.outputs.git_short_hash }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
# sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_NAME\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_NAME }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
# sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_OWNER\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
# sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_REPO\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
# sed -r --in-place 's/\%\%RYUJINX_CONFIG_FILE_NAME\%\%/Config\.json/g;' src/Ryujinx.Common/ReleaseInformation.cs
# shell: bash
- name: Configure for release
run: |
#sed -r --in-place 's/\%\%RYUJINX_BUILD_VERSION\%\%/${{ steps.version_info.outputs.build_version }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
sed -r --in-place 's/\%\%RYUJINX_BUILD_GIT_HASH\%\%/${{ steps.version_info.outputs.git_short_hash }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_OWNER\%\%/${{ github.repository_owner }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_REPO\%\%/${{ github.event.repository.name }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_NAME\%\%/${{ github.ref_name }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
sed -r --in-place 's/\%\%RYUJINX_CONFIG_FILE_NAME\%\%/Config\.json/g;' src/Ryujinx.Common/ReleaseInformation.cs
shell: bash

- name: Publish macOS Ryujinx
run: |
Expand All @@ -209,6 +211,6 @@ jobs:
omitBodyDuringUpdate: true
allowUpdates: true
replacesArtifacts: true
owner: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}
repo: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}
#owner: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}
#repo: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 94091e1

Please sign in to comment.