增加Linux云编译
This commit is contained in:
parent
e985c8660b
commit
169e7d8419
84
.github/workflows/build-pr.yml
vendored
84
.github/workflows/build-pr.yml
vendored
@ -45,6 +45,14 @@ jobs:
|
|||||||
--add-data="pypvz-exec-logo.png;./pypvz-exec-logo.png" `
|
--add-data="pypvz-exec-logo.png;./pypvz-exec-logo.png" `
|
||||||
-i ./pypvz.ico
|
-i ./pypvz.ico
|
||||||
|
|
||||||
|
- name: Release the version built by pyinstaller
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
allowUpdates: true
|
||||||
|
tag: Current.Version.Built.with.Pyinstaller
|
||||||
|
artifacts: ./out/*pyinstaller*.exe
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
# 使用Nuitka构建
|
# 使用Nuitka构建
|
||||||
- name: Show nuitka version
|
- name: Show nuitka version
|
||||||
run: |
|
run: |
|
||||||
@ -66,24 +74,80 @@ jobs:
|
|||||||
--include-data-file=c:\hostedtoolcache\windows\python\${{ matrix.python_version }}*\x64\lib\site-packages\pygame\libvorbisfile-3.dll=libvorbisfile-3.dll `
|
--include-data-file=c:\hostedtoolcache\windows\python\${{ matrix.python_version }}*\x64\lib\site-packages\pygame\libvorbisfile-3.dll=libvorbisfile-3.dll `
|
||||||
--include-data-file=c:\hostedtoolcache\windows\python\${{ matrix.python_version }}*\x64\lib\site-packages\pygame\libvorbis-0.dll=libvorbis-0.dll `
|
--include-data-file=c:\hostedtoolcache\windows\python\${{ matrix.python_version }}*\x64\lib\site-packages\pygame\libvorbis-0.dll=libvorbis-0.dll `
|
||||||
--windows-disable-console `
|
--windows-disable-console `
|
||||||
-o ./out/pypvz-with-python${{ matrix.python_version }}-nuitka-msvc-x64.exe `
|
-o ./out/pypvz-with-python${{ matrix.python_version }}-nuitka-windows-x64.exe `
|
||||||
main.py
|
main.py
|
||||||
|
|
||||||
# artifact压缩包处上传包含exe和运行环境的文件夹
|
# artifact压缩包处上传包含exe和运行环境的文件夹
|
||||||
- name: "Upload binarie directory"
|
- name: "Upload binaries"
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: DIR-python-${{ matrix.python_version }}
|
name: artifact-windows-python-${{ matrix.python_version }}
|
||||||
path: ./out/*.dist
|
path: ./out/*.dist
|
||||||
|
|
||||||
- name: "Upload binaries of pyinstaller"
|
- name: Release the version built by nuitka
|
||||||
uses: actions/upload-artifact@v2
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
name: pyinstaller-python-${{ matrix.python_version }}
|
allowUpdates: true
|
||||||
path: ./out/*pyinstaller*.exe
|
tag: Latest
|
||||||
|
artifacts: ./out/*nuitka*.exe
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: "Upload binaries of pyinstaller"
|
linux:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
python_version:
|
||||||
|
- '3.10'
|
||||||
|
name: Ubuntu Python ${{ matrix.python_version }}
|
||||||
|
steps:
|
||||||
|
- name: 🛎️ Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: 🐍 Use Python ${{ matrix.python_version }}
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python_version }}
|
||||||
|
|
||||||
|
- name: 🧳 Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install patchelf gdb ccache libfuse2
|
||||||
|
python -m pip install --no-python-version-warning --disable-pip-version-check -r requirements-devel.txt
|
||||||
|
python -m pip install --no-python-version-warning --disable-pip-version-check nuitka
|
||||||
|
python -m pip install --no-python-version-warning --disable-pip-version-check pygame
|
||||||
|
|
||||||
|
# 使用Nuitka构建
|
||||||
|
- name: Show nuitka version
|
||||||
|
run: |
|
||||||
|
env
|
||||||
|
python -m nuitka --version
|
||||||
|
|
||||||
|
- name: Build pypvz with Nuitka
|
||||||
|
run: |
|
||||||
|
echo y | python -m nuitka --standalone `
|
||||||
|
--onefile `
|
||||||
|
--show-progress `
|
||||||
|
--show-memory `
|
||||||
|
--output-dir=out `
|
||||||
|
--linux-onefile-icon==pypvz.ico `
|
||||||
|
--include-data-dir=resources=resources `
|
||||||
|
-o ./out/pypvz-with-python${{ matrix.python_version }}-nuitka-linux-x64.appimage `
|
||||||
|
main.py
|
||||||
|
|
||||||
|
# artifact压缩包处上传包含运行环境的文件夹
|
||||||
|
- name: "Upload binaries"
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: nuitka-python-${{ matrix.python_version }}
|
name: artifact-linux-python-${{ matrix.python_version }}
|
||||||
path: ./out/*nuitka*.exe
|
path: ./out/*.dist
|
||||||
|
|
||||||
|
- name: Release the version built by nuitka
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
allowUpdates: true
|
||||||
|
tag: Latest
|
||||||
|
artifacts: ./out/*nuitka*.appimage
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
64
.github/workflows/build.yml
vendored
64
.github/workflows/build.yml
vendored
@ -76,14 +76,14 @@ jobs:
|
|||||||
--include-data-file=c:\hostedtoolcache\windows\python\${{ matrix.python_version }}*\x64\lib\site-packages\pygame\libvorbisfile-3.dll=libvorbisfile-3.dll `
|
--include-data-file=c:\hostedtoolcache\windows\python\${{ matrix.python_version }}*\x64\lib\site-packages\pygame\libvorbisfile-3.dll=libvorbisfile-3.dll `
|
||||||
--include-data-file=c:\hostedtoolcache\windows\python\${{ matrix.python_version }}*\x64\lib\site-packages\pygame\libvorbis-0.dll=libvorbis-0.dll `
|
--include-data-file=c:\hostedtoolcache\windows\python\${{ matrix.python_version }}*\x64\lib\site-packages\pygame\libvorbis-0.dll=libvorbis-0.dll `
|
||||||
--windows-disable-console `
|
--windows-disable-console `
|
||||||
-o ./out/pypvz-with-python${{ matrix.python_version }}-nuitka-msvc-x64.exe `
|
-o ./out/pypvz-with-python${{ matrix.python_version }}-nuitka-windows-x64.exe `
|
||||||
main.py
|
main.py
|
||||||
|
|
||||||
# artifact压缩包处上传包含exe和运行环境的文件夹
|
# artifact压缩包处上传包含exe和运行环境的文件夹
|
||||||
- name: "Upload binaries"
|
- name: "Upload binaries"
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: artifact-python-${{ matrix.python_version }}
|
name: artifact-windows-python-${{ matrix.python_version }}
|
||||||
path: ./out/*.dist
|
path: ./out/*.dist
|
||||||
|
|
||||||
- name: Release the version built by nuitka
|
- name: Release the version built by nuitka
|
||||||
@ -93,3 +93,63 @@ jobs:
|
|||||||
tag: Latest
|
tag: Latest
|
||||||
artifacts: ./out/*nuitka*.exe
|
artifacts: ./out/*nuitka*.exe
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
linux:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
python_version:
|
||||||
|
- '3.10'
|
||||||
|
name: Ubuntu Python ${{ matrix.python_version }}
|
||||||
|
steps:
|
||||||
|
- name: 🛎️ Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: 🐍 Use Python ${{ matrix.python_version }}
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python_version }}
|
||||||
|
|
||||||
|
- name: 🧳 Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install patchelf gdb ccache libfuse2
|
||||||
|
python -m pip install --no-python-version-warning --disable-pip-version-check -r requirements-devel.txt
|
||||||
|
python -m pip install --no-python-version-warning --disable-pip-version-check nuitka
|
||||||
|
python -m pip install --no-python-version-warning --disable-pip-version-check pygame
|
||||||
|
|
||||||
|
# 使用Nuitka构建
|
||||||
|
- name: Show nuitka version
|
||||||
|
run: |
|
||||||
|
env
|
||||||
|
python -m nuitka --version
|
||||||
|
|
||||||
|
- name: Build pypvz with Nuitka
|
||||||
|
run: |
|
||||||
|
echo y | python -m nuitka --standalone `
|
||||||
|
--onefile `
|
||||||
|
--show-progress `
|
||||||
|
--show-memory `
|
||||||
|
--output-dir=out `
|
||||||
|
--linux-onefile-icon==pypvz.ico `
|
||||||
|
--include-data-dir=resources=resources `
|
||||||
|
-o ./out/pypvz-with-python${{ matrix.python_version }}-nuitka-linux-x64.appimage `
|
||||||
|
main.py
|
||||||
|
|
||||||
|
# artifact压缩包处上传包含运行环境的文件夹
|
||||||
|
- name: "Upload binaries"
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: artifact-linux-python-${{ matrix.python_version }}
|
||||||
|
path: ./out/*.dist
|
||||||
|
|
||||||
|
- name: Release the version built by nuitka
|
||||||
|
uses: ncipollo/release-action@v1
|
||||||
|
with:
|
||||||
|
allowUpdates: true
|
||||||
|
tag: Latest
|
||||||
|
artifacts: ./out/*nuitka*.appimage
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user