Skip to content

chore: bump openrgb_git #1280

chore: bump openrgb_git

chore: bump openrgb_git #1280

name: Build x86-64 Linux (Garuda-hosted)
on:
merge_group:
branches: [main]
workflow_call:
inputs:
is_workflow_call:
type: boolean
required: false
default: true
commit-failures:
description: Commit failures.nix
required: false
default: true
type: boolean
pin:
description: Pin strategy
required: false
default: "none"
type: string
outputs:
built:
description: "Returns true if the build step succeeded"
value: ${{ jobs.garuda-build-all-x86_64-linux.outputs.built }}
workflow_dispatch:
inputs:
commit-failures:
description: Commit failures.nix
required: false
default: true
type: boolean
pin:
description: Pin strategy
required: false
default: "none"
type: choice
options:
- new
- full
- missing
- none
# actually skipping `pull_request_target` below, but needed for PR status
pull_request_target:
permissions:
contents: write
pull-requests: write
jobs:
garuda-build-all-x86_64-linux:
name: Build-all x86-64 Linux (Garuda-hosted)
if: github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch' || inputs.is_workflow_call == true
runs-on: nyxbuilder
timeout-minutes: 1440
outputs:
built: ${{ steps.build.outcome == 'success' }}
steps:
- name: Checkout base for local actions
uses: actions/checkout@v7
- name: Check PR Trust
id: trust
uses: ./.github/actions/check-pr-trust
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.sha }}
allow-unsafe-pr-checkout: ${{ steps.trust.outputs.is_safe == 'true' }}
# identical to build.yml
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
extra_nix_config: |
accept-flake-config = true
sandbox-fallback = false
system-features = big-parallel gccarch-x86-64-v3
install_options: --daemon
- name: Configure sandboxing
run: |
sed -i -e '/^build-users-group =/d' -e 's/max-jobs =.*/max-jobs = 8/g' /etc/nix/nix.conf
nix eval ./maintenance#_dev.nixConfig --json | jq -r 'to_entries[] | "\(.key) = \(.value | join(" "))"' >> /etc/nix/nix.conf
# config to commit
- name: Bat-signal
run: |
set -e
git config --global user.name 'Chaotic Github Actions'
git config --global user.email 'actions@chaotic.cx'
# similar to build.yml
- name: Create niks3 auth-token
run: |
export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config}
mkdir -p "$XDG_CONFIG_HOME"/niks3/
printf "%s" "$NIKS3_TOKEN" > "$XDG_CONFIG_HOME"/niks3/auth-token
wc "$XDG_CONFIG_HOME"/niks3/auth-token
env:
NIKS3_TOKEN: ${{ secrets.NIKS3_TOKEN }}
# the building
- name: Build
if: (success())
id: build
run: |
nix run ./maintenance#chaotic-nyx.builder || [ $? -eq 42 ]
failed_builds="$(cat ${{ runner.temp }}/failures.txt | sed 's/^/ <li>/; s/$/<\/li>/')"
failed_builds_count="$(cat ${{ runner.temp }}/failures.txt | wc -l)"
unbuildable_count="$(cat ${{ runner.temp }}/eval-failures.txt | wc -l)"
echo "FAILED_BUILDS_COUNT=$failed_builds_count
UNBUILDABLE_COUNT=$unbuildable_count
FAILED_BUILDS<<EOF
$failed_builds
EOF" >> "$GITHUB_OUTPUT"
if [ "$SAVE_FAILURES" = "true" ] && [ -n "$TARGET_BRANCH" ]; then
cp ${{ runner.temp }}/new-failures.nix ./maintenance/failures.x86_64-linux.nix
git add ./maintenance/failures.x86_64-linux.nix
git commit -m "failures: update x86_64-linux" && git push origin HEAD:"$TARGET_BRANCH" || true
fi
env:
NYX_WD: ${{ runner.temp }}
NYX_PUSH_ALL: "1"
NYX_PIN: ${{ inputs.pin || 'none' }}
SAVE_FAILURES: ${{ inputs.commit-failures || false }}
TARGET_BRANCH: ${{ github.event.pull_request.head.ref || github.ref_name }}
- name: Comment on commit
if: (success())
uses: actions/github-script@v9
with:
script: |
if (process.env.FAILED_BUILDS_COUNT > 0) {
var extratext = "";
if (process.env.SAVE_FAILURES !== "true")
core.setFailed("Build failures found!");
// Check if github actions triggered the event
if (process.env.ACTOR == "github-actions[bot]")
extratext = `\nNew build failures found!`
else
extratext = `\nNew build failures found! @${process.env.ACTOR}`
github.rest.repos.createCommitComment({
owner: context.repo.owner,
repo: context.repo.repo,
commit_sha: context.sha,
body: `Failed to build ${process.env.FAILED_BUILDS_COUNT} packages:
<details>
<summary>${process.env.FAILED_BUILDS_COUNT} packages failed</summary>
<ul>
${process.env.FAILED_BUILDS}
</ul>
</details>${extratext}`
})
} else
github.rest.repos.createCommitComment({
owner: context.repo.owner,
repo: context.repo.repo,
commit_sha: context.sha,
body: `All packages were built and cached successfully! (${process.env.UNBUILDABLE_COUNT} not suitable for building)`
})
env:
SAVE_FAILURES: ${{ inputs.commit-failures || false }}
FAILED_BUILDS_COUNT: ${{ steps.build.outputs.FAILED_BUILDS_COUNT }}
UNBUILDABLE_COUNT: ${{ steps.build.outputs.UNBUILDABLE_COUNT }}
FAILED_BUILDS: ${{ steps.build.outputs.FAILED_BUILDS }}
ACTOR: ${{ github.actor }}
- name: Upload logs
if: ((success() || failure()) && steps.build.outcome != 'skipped')
uses: actions/upload-artifact@v7
with:
name: logs
path: |
${{ runner.temp }}/*.txt
${{ runner.temp }}/*.nix