feat: try some script
This commit is contained in:
parent
f639584f46
commit
ff15d5ae98
68
.github/workflows/nuitka.yml
vendored
68
.github/workflows/nuitka.yml
vendored
@ -26,6 +26,7 @@ jobs:
|
|||||||
- name: Check out
|
- name: Check out
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# 安装 Python
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
@ -39,22 +40,55 @@ jobs:
|
|||||||
run: pip install -r requirement.txt
|
run: pip install -r requirement.txt
|
||||||
|
|
||||||
|
|
||||||
# Build python script into a stand-alone exe
|
# # Build python script into a stand-alone exe
|
||||||
- name: Build
|
# - name: Build
|
||||||
uses: Nuitka/Nuitka-Action@v0.4
|
# uses: Nuitka/Nuitka-Action@v0.4
|
||||||
with:
|
# with:
|
||||||
script-name: DR.py
|
# script-name: DR.py
|
||||||
standalone: true
|
# standalone: true
|
||||||
include-package-data: './configs=./configs'
|
# onefile: false
|
||||||
assume-yes-for-download: true
|
## include-package-data: './configs=./configs'
|
||||||
|
# assume-yes-for-download: true
|
||||||
|
|
||||||
|
# 还是得我自己写脚本
|
||||||
|
- name: Build on Windows
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
$arg = "--standalone --assume-yes-for-download "
|
||||||
|
$arg += "--msvc=latest --clang --lto=no "
|
||||||
|
$arg += "--nofollow-import-to=objprint,numpy,pillow,cffi,PIL,pyglet "
|
||||||
|
$arg += "--include-data-dir=./libs/pyglet=./pyglet "
|
||||||
|
$arg += "--include-data-dir=./libs/fonts=./libs/fonts "
|
||||||
|
$arg += "--include-data-dir=./textures=./textures "
|
||||||
|
$arg += "--include-data-dir=./configs=./configs "
|
||||||
|
python -m nuitka $arg DR.py
|
||||||
|
|
||||||
|
- name: Build on MacOS / Linux
|
||||||
|
if: ${{ runner.os == 'macOS' || runner.os == 'Linux' }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
arg = "--standalone --assume-yes-for-download "
|
||||||
|
arg += "--clang --lto=no "
|
||||||
|
arg += "--nofollow-import-to=objprint,numpy,pillow,cffi,PIL,pyglet "
|
||||||
|
arg += "--include-data-dir=./libs/pyglet=./pyglet "
|
||||||
|
arg += "--include-data-dir=./libs/fonts=./libs/fonts "
|
||||||
|
arg += "--include-data-dir=./textures=./textures "
|
||||||
|
arg += "--include-data-dir=./configs=./configs "
|
||||||
|
python -m nuitka $arg DR.py
|
||||||
|
|
||||||
|
- name: after build
|
||||||
|
shell: powershell7
|
||||||
|
run: |
|
||||||
|
python after_compile.py
|
||||||
|
|
||||||
|
|
||||||
# Uploads artifact
|
# # Uploads artifact
|
||||||
- name: Upload Artifact
|
# - name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v3
|
# uses: actions/upload-artifact@v3
|
||||||
with:
|
# with:
|
||||||
name: ${{ runner.os }} Build
|
# name: ${{ runner.os }} Build
|
||||||
path: |
|
# path: |
|
||||||
build/*.exe
|
# build/*.exe
|
||||||
build/*.bin
|
# build/*.bin
|
||||||
build/*.app/**/*
|
# build/*.app/**/*
|
8
after_compile.py
Normal file
8
after_compile.py
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# -------------------------------
|
||||||
|
# Difficult Rocket
|
||||||
|
# Copyright © 2021-2022 by shenjackyuanjie 3695888@qq.com
|
||||||
|
# All rights reserved
|
||||||
|
# -------------------------------
|
||||||
|
|
||||||
|
import os
|
||||||
|
print(os.listdir('./build'))
|
@ -1,6 +1,6 @@
|
|||||||
$start_time = Get-Uptime
|
$start_time = Get-Uptime
|
||||||
Write-Output $start_time
|
Write-Output $start_time
|
||||||
python3.8.exe -m nuitka --jobs=24 --msvc=latest --clang --lto=no --show-memory --show-progress --output-dir=build/nuitka1 --include-data-dir=./configs=./configs --include-data-dir=./libs/fonts=./libs/fonts --include-data-dir=./textures=./textures --include-data-dir=./libs/pyglet=./pyglet --enable-plugin=numpy --nofollow-import-to=objprint,numpy,pillow,cffi,PIL,pyglet --standalone $args .\DR.py
|
python3.8.exe -m nuitka --jobs=24 --msvc=latest --clang --lto=no --show-memory --show-progress --output-dir=build/nuitka1 --include-data-dir=./configs=./configs --include-data-dir=./libs/fonts=./libs/fonts --include-data-dir=./textures=./textures --include-data-dir=./libs/pyglet=./pyglet --nofollow-import-to=objprint,numpy,pillow,cffi,PIL,pyglet --standalone $args .\DR.py
|
||||||
$end_time = Get-Uptime
|
$end_time = Get-Uptime
|
||||||
$out = $end_time.TotalMilliseconds - $start_time.TotalMilliseconds
|
$out = $end_time.TotalMilliseconds - $start_time.TotalMilliseconds
|
||||||
Write-Output $end_time.TotalSeconds $start_time.TotalSeconds $out s
|
Write-Output $end_time.TotalSeconds $start_time.TotalSeconds $out s
|
||||||
|
Loading…
Reference in New Issue
Block a user