-
-
Notifications
You must be signed in to change notification settings - Fork 63
75 lines (63 loc) · 2.08 KB
/
compile.yml
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
name: Compile Executables
# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
release:
types: [ created ]
jobs:
build:
strategy:
fail-fast: false # needed to keep running other os builds even if one fails
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with: # needed for tag info for nightly sdist builds
fetch-depth: 0
fetch-tags: true
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
cache: 'pip'
cache-dependency-path: |
**/requirements*.txt
# Install dependencies
- name: Install Dependencies and Build sdist
run: |
pip install -r requirements.txt
pip install -U build setuptools
python -m build # create the sdist build to populate the __version__ var
# Build python script into a standalone exe
- name: Build Executable
uses: Nuitka/Nuitka-Action@main
with:
nuitka-version: main
script-name: SideJITServer/launch.py
- name: Upload Compilation Report
if: always() # run even if the compile failed
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }} compilation report
path: compilation-report.xml
- name: Upload Executable
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }} Build
path: |
build/*.exe
build/*.bin
build/*.app/**/*
- name: Check if executable runs (.exe)
if: ${{ runner.os == 'Windows' }}
run: ./build/*.exe --version
- name: Check if executable runs (.bin)
if: ${{ runner.os == 'macOS' || runner.os == 'Linux' }}
run: ./build/*.bin --version