Skip to content

Commit 2602f05

Browse files
refaimclaude
andcommitted
Add Linux build, run checks on both OSes
- Add build-linux job using Nuitka --onefile for a single binary - Rename build to build-windows, update artifact names with OS and CPU - Add version to release filenames (snapjaw-VERSION-os-arch) - Run check job on both Windows and Ubuntu via matrix Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 025ab0e commit 2602f05

2 files changed

Lines changed: 75 additions & 12 deletions

File tree

.github/workflows/ci.yml

Lines changed: 61 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ permissions:
1111

1212
jobs:
1313
check:
14-
runs-on: windows-latest
14+
strategy:
15+
matrix:
16+
os: [windows-latest, ubuntu-latest]
17+
runs-on: ${{ matrix.os }}
1518
steps:
1619
- name: Checkout
1720
uses: actions/checkout@v4
@@ -54,7 +57,7 @@ jobs:
5457
report_type: test_results
5558
files: junit.xml
5659

57-
build:
60+
build-windows:
5861
needs: check
5962
runs-on: windows-latest
6063
steps:
@@ -78,7 +81,7 @@ jobs:
7881
with:
7982
path: |
8083
~\AppData\Local\Nuitka
81-
key: nuitka-py3.12-${{ hashFiles('uv.lock') }}
84+
key: nuitka-windows-py3.12-${{ hashFiles('uv.lock') }}
8285

8386
- name: Build
8487
run: |
@@ -87,31 +90,78 @@ jobs:
8790
Get-Item -Path build\snapjaw.dist\* | Move-Item -Destination build\snapjaw\snapjaw
8891
8992
- name: Package
90-
run: Compress-Archive -Path build\snapjaw\* -DestinationPath snapjaw.zip
93+
run: Compress-Archive -Path build\snapjaw\* -DestinationPath snapjaw-windows-x86_64.zip
94+
95+
- name: Upload artifact
96+
uses: actions/upload-artifact@v4
97+
with:
98+
name: snapjaw-windows-x86_64
99+
path: snapjaw-windows-x86_64.zip
100+
101+
build-linux:
102+
needs: check
103+
runs-on: ubuntu-latest
104+
steps:
105+
- name: Checkout
106+
uses: actions/checkout@v4
107+
108+
- name: Install uv
109+
uses: astral-sh/setup-uv@v5
110+
111+
- name: Setup Python
112+
uses: actions/setup-python@v5
113+
with:
114+
python-version: '3.12'
115+
architecture: x64
116+
117+
- name: Install dependencies
118+
run: uv sync
119+
120+
- name: Cache Nuitka
121+
uses: actions/cache@v4
122+
with:
123+
path: |
124+
~/.cache/Nuitka
125+
key: nuitka-linux-py3.12-${{ hashFiles('uv.lock') }}
126+
127+
- name: Build
128+
run: uv run nuitka --onefile --prefer-source-code --assume-yes-for-downloads --show-scons --output-dir=build --include-module=_cffi_backend src/snapjaw.py
129+
130+
- name: Package
131+
run: |
132+
mv build/snapjaw.bin snapjaw
133+
tar czf snapjaw-linux-x86_64.tar.gz snapjaw
91134
92135
- name: Upload artifact
93136
uses: actions/upload-artifact@v4
94137
with:
95-
name: snapjaw
96-
path: snapjaw.zip
138+
name: snapjaw-linux-x86_64
139+
path: snapjaw-linux-x86_64.tar.gz
97140

98141
release:
99-
needs: build
142+
needs: [build-windows, build-linux]
100143
if: github.event_name == 'push'
101144
runs-on: ubuntu-latest
102145
steps:
103-
- name: Download artifact
146+
- name: Download artifacts
104147
uses: actions/download-artifact@v4
105-
with:
106-
name: snapjaw
107148

108149
- name: Get date
109150
id: date
110151
run: echo "date=$(date +%Y.%m.%d)" >> "$GITHUB_OUTPUT"
111152

153+
- name: Rename artifacts
154+
env:
155+
VERSION: ${{ steps.date.outputs.date }}.${{ github.run_number }}
156+
run: |
157+
mv snapjaw-windows-x86_64/snapjaw-windows-x86_64.zip snapjaw-${VERSION}-windows-x86_64.zip
158+
mv snapjaw-linux-x86_64/snapjaw-linux-x86_64.tar.gz snapjaw-${VERSION}-linux-x86_64.tar.gz
159+
112160
- name: Release
113161
uses: softprops/action-gh-release@v2
114162
with:
115163
tag_name: ${{ steps.date.outputs.date }}.${{ github.run_number }}
116164
name: ${{ steps.date.outputs.date }}.${{ github.run_number }}
117-
files: snapjaw.zip
165+
files: |
166+
snapjaw-${{ steps.date.outputs.date }}.${{ github.run_number }}-windows-x86_64.zip
167+
snapjaw-${{ steps.date.outputs.date }}.${{ github.run_number }}-linux-x86_64.tar.gz

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,23 @@
1313
- Simple command line interface
1414

1515
## How to install
16-
- [Download snapjaw](https://github.com/refaim/snapjaw/releases/latest)
16+
17+
### Windows
18+
- [Download snapjaw](https://github.com/refaim/snapjaw/releases/latest) (the `.zip` file)
1719
- Extract the archive into the WoW folder. This will create a structure similar to `C:\Games\WoW\snapjaw\snapjaw.exe`. Alternatively, if you choose a different destination, you'll need to specify the path to the addons directory using the `--addons-dir` argument.
1820
- See usage examples or run `snapjaw.exe --help`
1921

22+
### Linux
23+
- [Download snapjaw](https://github.com/refaim/snapjaw/releases/latest) (the `.tar.gz` file)
24+
- Extract and install:
25+
```
26+
tar xzf snapjaw-*-linux-x86_64.tar.gz
27+
chmod +x snapjaw
28+
mv snapjaw ~/.local/bin/
29+
```
30+
- Run from your WoW directory: `cd /path/to/wow && snapjaw --help`
31+
- Or use `--addons-dir` to specify the path to `Interface/Addons` from anywhere
32+
2033
#### Note
2134
If you are new to snapjaw, you will need to reinstall each of your addons manually using the `snapjaw install` command. This process is essential as it creates an index file to effectively track the status of your addons folder.
2235

0 commit comments

Comments
 (0)