feat: use pwsh if possible
This commit is contained in:
parent
0c17029dfe
commit
00890b6e31
48
.github/workflows/nuitka.yml
vendored
48
.github/workflows/nuitka.yml
vendored
@ -29,15 +29,8 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
# 获取短 sha
|
# 获取短 sha
|
||||||
- name: Get short commit sha (bash)
|
- name: Get short commit sha
|
||||||
if: ${{ runner.os == 'macOS' || runner.os == 'Linux' }}
|
id: get_short_sha
|
||||||
id: get_short_sha_bash
|
|
||||||
run: |
|
|
||||||
short_sha=$(echo ${GITHUB_SHA} | cut -c1-7)
|
|
||||||
echo "short_sha=$short_sha" >> $GITHUB_OUTPUT
|
|
||||||
- name: Get short commit sha (powershell)
|
|
||||||
if: runner.os == 'Windows'
|
|
||||||
id: get_short_sha_powershell
|
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
$short_sha = echo $`{GITHUB_SHA`}
|
$short_sha = echo $`{GITHUB_SHA`}
|
||||||
@ -67,19 +60,23 @@ jobs:
|
|||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
./action_build.ps1
|
$arg = @()
|
||||||
# $arg = "--standalone --assume-yes-for-download "
|
$arg += @("--standalone")
|
||||||
# $arg += "--msvc=latest --clang --lto=no --output-dir=build "
|
$arg += @("--assume-yes-for-download")
|
||||||
# $arg += "--nofollow-import-to=objprint,numpy,pillow,cffi,PIL,pyglet "
|
$arg += @("--msvc=latest")
|
||||||
# $arg += "--include-data-dir=./libs/pyglet=./pyglet "
|
$arg += @("--clang")
|
||||||
# $arg += "--include-data-dir=./libs/fonts=./libs/fonts "
|
$arg += @("--lto=no")
|
||||||
# $arg += "--include-data-dir=./textures=./textures "
|
$arg += @("--output-dir=build")
|
||||||
# $arg += "--include-data-dir=./configs=./configs "
|
$arg += @("--nofollow-import-to=objprint,numpy,pillow,cffi,PIL,pyglet")
|
||||||
# python -m nuitka $arg DR.py
|
$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
|
- name: Build on MacOS / Linux
|
||||||
if: ${{ runner.os == 'macOS' || runner.os == 'Linux' }}
|
if: ${{ runner.os == 'macOS' || runner.os == 'Linux' }}
|
||||||
shell: pwsh
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
arg="--standalone --assume-yes-for-download --output-dir=build "
|
arg="--standalone --assume-yes-for-download --output-dir=build "
|
||||||
arg+="--clang --lto=no "
|
arg+="--clang --lto=no "
|
||||||
@ -93,21 +90,10 @@ jobs:
|
|||||||
- name: after build
|
- name: after build
|
||||||
run: python after_compile.py
|
run: python after_compile.py
|
||||||
|
|
||||||
|
|
||||||
# Uploads artifact
|
|
||||||
- name: Upload Artifact (bash)
|
|
||||||
if: ${{ runner.os == 'macOS' || runner.os == 'Linux' }}
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ runner.os }} Build.${{ github.run_number}}+${{ steps.get_short_sha_bash.outputs.short_sha }}
|
|
||||||
path: |
|
|
||||||
build/*.zip
|
|
||||||
|
|
||||||
# Uploads artifact
|
# Uploads artifact
|
||||||
- name: Upload Artifact (powershell)
|
- name: Upload Artifact (powershell)
|
||||||
if: runner.os == 'Windows'
|
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ runner.os }} Build.${{ github.run_number}}+${{ steps.get_short_sha_powershell.outputs.short_sha }}
|
name: ${{ runner.os }} Build.${{ github.run_number}}+${{ steps.get_short_sha.outputs.short_sha }}
|
||||||
path: |
|
path: |
|
||||||
build/*.zip
|
build/*.zip
|
@ -1 +0,0 @@
|
|||||||
python -m nuitka --standalone --assume-yes-for-download --msvc=latest --clang --lto=no --output-dir=build --nofollow-import-to=objprint,numpy,pillow,cffi,PIL,pyglet --include-data-dir=./libs/pyglet=./pyglet --include-data-dir=./libs/fonts=./libs/fonts --include-data-dir=./textures=./textures --include-data-dir=./configs=./configs DR.py
|
|
Loading…
Reference in New Issue
Block a user