Skip to content

Build with Nuitka

Build with Nuitka #225

Workflow file for this run

name: Build with Nuitka
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
push:
branches:
- nuitka-*
jobs:
starting-build:
runs-on: ubuntu-slim
name: Notify Nuitka Starting
steps:
- name: Notify Discord - Nuitka Build Starting
uses: sarisia/actions-status-discord@v1.13.0
with:
webhook: ${{ secrets.LOG_HOOK }}
title: rovr nuitka builds starting!
color: 0xFFFF00
description: |
Nuitka Build started on `${{ github.ref_name }}`
-# due to `${{ github.event_name }}` by ${{ github.actor }}
-# watch changes at [NSPC911/rovr/actions](https://github.com/NSPC911/rovr/actions/runs/${{ github.run_id }})
avatar_url: "https://avatars.githubusercontent.com/u/176916861?v=4"
username: "NSPBot911"
nodetail: true
notimestamp: true
noprefix: true
build-nuitka:
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
name: windows-x64
executable: rovr.exe
- os: windows-11-arm
name: windows-arm
executable: rovr.exe
- os: ubuntu-24.04
name: linux-x64
executable: rovr.bin
- os: ubuntu-24.04-arm
name: linux-arm64
executable: rovr.bin
- os: macos-15
name: macos-arm64
executable: rovr.bin
- os: macos-15-intel
name: macos-x64
executable: rovr.bin
runs-on: ${{ matrix.os }}
name: Nuitka Build (${{ matrix.name }})
steps:
- uses: actions/checkout@v6
- name: Setup uv
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57
with:
activate-environment: true
python-version: "3.13"
- name: Cache Nuitka
uses: actions/cache@v5
with:
path: |
~/.cache/Nuitka
~/AppData/Local/Nuitka/Nuitka
~/Library/Caches/Nuitka
rovr.build
key: nuitka-${{ matrix.name }}
restore-keys: |
nuitka-${{ matrix.name }}
- name: Build with Nuitka
shell: pwsh
run: |
Remove-Item -Recurse -Force rovr.dist -ErrorAction SilentlyContinue
uv sync --no-dev --group build
uv run --no-sync poe build standalone --lto yes
- name: Upload Executable
uses: actions/upload-artifact@v7
with:
path: rovr.dist
name: rovr-${{ matrix.name }}-nuitka
retention-days: 30
- name: Rename Report
shell: pwsh
run: Move-Item report.xml 'rovr-${{ matrix.name }}-report.xml'
- name: Upload Build Report
uses: actions/upload-artifact@v7
with:
path: rovr-${{ matrix.name }}-report.xml
retention-days: 30
archive: false
- name: Alert if fail
if: failure()
uses: sarisia/actions-status-discord@v1.13.0
with:
webhook: ${{ secrets.LOG_HOOK }}
title: rovr nuitka build failed on ${{ matrix.name }}!
status: failure
description: "Check the workflow [details](https://github.com/NSPC911/rovr/actions/runs/${{ github.run_id }}) for more info."
avatar_url: "https://avatars.githubusercontent.com/u/176916861?v=4"
username: "NSPBot911"
nodetail: true
notimestamp: true
noprefix: true
create-nightly-release:
needs: build-nuitka
if: github.event_name == 'schedule'
runs-on: ubuntu-slim
name: Create Nightly Release
permissions:
contents: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Download artifacts
shell: pwsh
run: |
@(
"windows-x64"
"windows-arm"
"linux-x64"
"linux-arm64"
"macos-arm64"
"macos-x64"
) | ForEach-Object {
Invoke-WebRequest -Uri "https://nightly.link/NSPC911/rovr/actions/runs/${{ github.run_id }}/rovr-$_-nuitka.zip" -OutFile "rovr-$_-nuitka.zip"
}
- name: Get Previous Day Commits
id: commits
shell: pwsh
env:
GH_TOKEN: ${{ secrets.BOT_TOKEN }}
run: |
gh release delete nightly --cleanup-tag --yes
$commits = git log --since="24 hours ago" --pretty=format:"- %h %s" --no-merges
if (!$commits) { $commits = "No commits in the last 24 hours." }
$commits | Out-File -FilePath commits.txt -Encoding utf8
- name: Create Nightly Release
uses: softprops/action-gh-release@v2
with:
tag_name: nightly
name: Nightly Build
body_path: commits.txt
files: "*.zip"
prerelease: true
make_latest: false
token: ${{ secrets.BOT_TOKEN }}
notify-nuitka-completion:
needs: build-nuitka
runs-on: ubuntu-slim
name: Notify Nuitka Completion
steps:
- name: Notify Discord - Nuitka Complete
uses: sarisia/actions-status-discord@v1.13.0
with:
webhook: ${{ secrets.LOG_HOOK }}
title: rovr nuitka builds complete!
status: ${{ job.status }}
description: |
Download artifacts:
- [windows-x64](https://nightly.link/NSPC911/rovr/actions/runs/${{ github.run_id }}/rovr-windows-x64-nuitka.zip)
- [windows-arm](https://nightly.link/NSPC911/rovr/actions/runs/${{ github.run_id }}/rovr-windows-arm-nuitka.zip)
- [linux-x64](https://nightly.link/NSPC911/rovr/actions/runs/${{ github.run_id }}/rovr-linux-x64-nuitka.zip)
- [linux-arm64](https://nightly.link/NSPC911/rovr/actions/runs/${{ github.run_id }}/rovr-linux-arm64-nuitka.zip)
- [macos-arm64](https://nightly.link/NSPC911/rovr/actions/runs/${{ github.run_id }}/rovr-macos-arm64-nuitka.zip)
- [macos-x64](https://nightly.link/NSPC911/rovr/actions/runs/${{ github.run_id }}/rovr-macos-x64-nuitka.zip)
avatar_url: "https://avatars.githubusercontent.com/u/176916861?v=4"
username: "NSPBot911"
nodetail: true
notimestamp: true
noprefix: true