-
Notifications
You must be signed in to change notification settings - Fork 28
188 lines (173 loc) · 6.17 KB
/
Copy pathnuitka-build.yml
File metadata and controls
188 lines (173 loc) · 6.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
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