Skip to content

Commit

Permalink
恢复Linux单文件版构建
Browse files Browse the repository at this point in the history
  • Loading branch information
wszqkzqk committed Dec 13, 2022
1 parent 17de44a commit fd9253d
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 114 deletions.
106 changes: 53 additions & 53 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,56 +90,56 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}


#linux:
# runs-on: ubuntu-latest
# 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 zstandard appdirs ordered-set tqdm Jinja2
# 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: |
# yes | python -m nuitka \
# --show-progress \
# --follow-imports \
# --show-memory \
# --output-dir=out \
# --linux-onefile-icon=pypvz.ico \
# -o ./out/pypvz \
# --remove-output \
# main.py
# cp -r ./resources ./out/resources
# cd out
# tar -cvpaf ../pypvz-with-python${{ matrix.python_version }}-nuitka-linux-x64.tar.zst .

# - name: "Upload binaries"
# uses: actions/upload-artifact@v2
# with:
# name: artifact-windows-python-${{ matrix.python_version }}
# path: ./pypvz-with-python${{ matrix.python_version }}-nuitka-linux-x64.tar.zst
linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python_version:
- "3.10"
- "3.11"
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 zstd tar
python -m pip install --no-python-version-warning --disable-pip-version-check zstandard appdirs ordered-set tqdm Jinja2
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: |
yes | python -m nuitka \
--onefile \
--standalone \
--include-data-dir=resources=resources \
--linux-onefile-icon=pypvz.png \
--static-libpython=no \
--remove-output \
-o pypvz-with-python${{ matrix.python_version }}-linux-x86_64.bin \
pypvz.py
- name: Release the version built by nuitka
uses: ncipollo/release-action@v1
with:
allowUpdates: true
tag: Dev
artifacts: ./pypvz*-x86_64.*
token: ${{ secrets.GITHUB_TOKEN }}
114 changes: 53 additions & 61 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,6 @@ jobs:
-o ./out/pypvz-with-python${{ matrix.python_version }}-nuitka-windows-x64.exe `
pypvz.py
# artifact压缩包处上传包含exe和运行环境的文件夹
- name: "Upload binaries"
uses: actions/upload-artifact@v2
with:
name: artifact-windows-python-${{ matrix.python_version }}
path: ./out/*.dist
- name: Release the version built by nuitka
uses: ncipollo/release-action@v1
Expand All @@ -95,58 +89,56 @@ jobs:
artifacts: ./out/*nuitka*.exe
token: ${{ secrets.GITHUB_TOKEN }}

#linux:
# runs-on: ubuntu-latest
# 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 zstd tar
# python -m pip install --no-python-version-warning --disable-pip-version-check zstandard appdirs ordered-set tqdm Jinja2
# 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: |
# yes | python -m nuitka \
# --show-progress \
# --follow-imports \
# --show-memory \
# --output-dir=out \
# --linux-onefile-icon=pypvz.ico \
# -o ./out/pypvz \
# --remove-output \
# main.py
# cp -r ./resources ./out/resources
# cd out
# tar -cvpaf ../pypvz-with-python${{ matrix.python_version }}-nuitka-linux-x64.tar.zst .

# - name: Release the version built by nuitka
# uses: ncipollo/release-action@v1
# with:
# allowUpdates: true
# tag: Latest
# artifacts: ./*.tar.zst
# token: ${{ secrets.GITHUB_TOKEN }}
linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python_version:
- "3.10"
- "3.11"
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 zstd tar
python -m pip install --no-python-version-warning --disable-pip-version-check zstandard appdirs ordered-set tqdm Jinja2
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: |
yes | python -m nuitka \
--onefile \
--standalone \
--include-data-dir=resources=resources \
--linux-onefile-icon=pypvz.png \
--static-libpython=no \
--remove-output \
-o pypvz-with-python${{ matrix.python_version }}-linux-x86_64.bin \
pypvz.py
- name: Release the version built by nuitka
uses: ncipollo/release-action@v1
with:
allowUpdates: true
tag: Latest
artifacts: ./pypvz*-x86_64.*
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit fd9253d

Please sign in to comment.