v0.1.6 #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build (Nuitka) | |
| on: | |
| push: | |
| tags: ["v*"] | |
| workflow_dispatch: {} | |
| jobs: | |
| build: | |
| permissions: | |
| contents: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-22.04 | |
| artifact: PartsPack-linux | |
| lowmem: "0" | |
| - os: windows-latest | |
| artifact: PartsPack-windows | |
| lowmem: "1" | |
| - os: macos-latest | |
| artifact: PartsPack-macos | |
| lowmem: "0" | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| PARTSPACK_JOBS: "2" | |
| PARTSPACK_LOWMEM: ${{ matrix.lowmem }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Linux system deps | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| patchelf binutils clang ccache \ | |
| libgl1 libglu1-mesa libxrender1 libxcb-cursor0 libegl1 \ | |
| libxkbcommon0 libdbus-1-3 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Cache Nuitka + ccache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/Nuitka | |
| ~/AppData/Local/Nuitka/Nuitka | |
| ~/Library/Caches/Nuitka | |
| ~/.cache/ccache | |
| ~/AppData/Local/ccache | |
| ~/Library/Caches/ccache | |
| key: nuitka-${{ runner.os }}-${{ hashFiles('requirements-build-*.txt') }} | |
| - name: Create build venv | |
| run: python packaging/make_build_venv.py | |
| - name: Fix lib3mf install id (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| PKG=$(.build-venv/bin/python -c "import lib3mf, os; print(os.path.dirname(lib3mf.__file__))") | |
| DYLIB="$PKG/lib3mf.dylib" | |
| echo "--- id before ---" | |
| otool -D "$DYLIB" | |
| install_name_tool -id "@loader_path/lib3mf.dylib" "$DYLIB" | |
| codesign --force --sign - "$DYLIB" 2>/dev/null || true | |
| echo "-- id after ---" | |
| otool -D "$DYLIB" | |
| - name: Build (Linux/macOS) | |
| if: runner.os != 'Windows' | |
| run: .build-venv/bin/python packaging/build.py | |
| - name: Build (Windows) | |
| if: runner.os == 'Windows' | |
| run: .build-venv\Scripts\python packaging\build.py | |
| - name: Package AppImage (Linux) | |
| if: runner.os == 'Linux' | |
| run: .build-venv/bin/python packaging/make_appimage.py | |
| - name: Package macOS .dmg | |
| if: runner.os == 'macOS' | |
| run: | | |
| hdiutil create -volname PartsPack -srcfolder bin/PartsPack.app \ | |
| -ov -format UDZO bin/PartsPack-macos.dmg | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: | | |
| bin/PartsPack.exe | |
| bin/PartsPack-x86_64.AppImage | |
| bin/PartsPack-macos.dmg | |
| if-no-files-found: ignore | |
| retention-days: 14 | |
| - name: Attach to release | |
| if: success() && startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| bin/PartsPack.exe | |
| bin/PartsPack-x86_64.AppImage | |
| bin/PartsPack-macos.dmg | |
| fail_on_unmatched_files: false |