Static Python Build #54
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: Static Python Build | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 5 * * 0' | |
| jobs: | |
| build-and-release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential git perl unzip make meson curl tar rsync flex bison | |
| - name: Build native | |
| run: make ARCH=x86_64 | |
| - name: Cross-compile | |
| run: make ARCH=arm MUSLABI=musleabihf | |
| - name: Cross-compile aarch64 | |
| run: make ARCH=aarch64 | |
| - name: Cross-compile riscv64 | |
| run: make ARCH=riscv64 | |
| - name: Package binaries | |
| run: | | |
| tar -czf python-static-x86_64-linux-musl.tar.gz python-static-x86_64-linux-musl/ | |
| tar -czf python-static-aarch64-linux-musl.tar.gz python-static-aarch64-linux-musl/ | |
| tar -czf python-static-riscv64-linux-musl.tar.gz python-static-riscv64-linux-musl/ | |
| tar -czf python-static-arm-linux-musleabihf.tar.gz python-static-arm-linux-musleabihf/ | |
| - name: Delete release | |
| run: | | |
| gh release delete binaries --yes || true | |
| git push origin :binaries || true | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: binaries | |
| name: "Latest Static Binaries" | |
| body_path: .github/workflows/notes.md | |
| files: | | |
| python-static-x86_64-linux-musl.tar.gz | |
| python-static-aarch64-linux-musl.tar.gz | |
| python-static-riscv64-linux-musl.tar.gz | |
| python-static-arm-linux-musleabihf.tar.gz | |
| draft: false | |
| prerelease: true |