v0.4.2 #3
Workflow file for this run
This file contains 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 release binary | |
on: | |
release: | |
types: [published] | |
#push: | |
# tags: | |
# - v*.*.* | |
jobs: | |
build-win64: | |
name: Build x64 Windows binary | |
runs-on: windows-2019 | |
env: | |
BUILD_ARCH: x64 | |
BUILD_LOGLEVEL: verbose | |
steps: | |
- uses: ilammy/setup-nasm@v1 | |
- uses: MatteoH2O1999/setup-python@v1 | |
id: py | |
with: | |
python-version: '2.7' | |
- uses: actions/checkout@v3 | |
- name: Get release | |
id: get_release | |
uses: bruceadams/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- run: npm install --production --ignore-scripts | |
- run: (cd nexe && npm install --production) | |
- run: (cd nexe && node build) | |
- run: nexe\parpar.exe --version | |
- run: nexe\parpar.exe -r1 -s1M -o nexe\test.par2 nexe\parpar.exe | |
- run: move nexe\parpar.exe parpar.exe && 7z a -t7z -mx=9 parpar.7z parpar.exe | |
- uses: sekwah41/upload-release-assets@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: ./parpar.7z | |
asset_name: parpar-${{ steps.get_release.outputs.tag_name }}-win64.7z | |
asset_content_type: application/octet-stream | |
build-linux-amd64: | |
strategy: | |
fail-fast: false | |
matrix: | |
static: | |
- name: glibc2.31 | |
flag: --partly-static | |
- name: static | |
flag: --fully-static | |
name: Build amd64 Linux ${{ matrix.static.name }} binary | |
runs-on: ubuntu-20.04 | |
env: | |
BUILD_ARCH: x64 | |
BUILD_LOGLEVEL: verbose | |
BUILD_STATIC: ${{ matrix.static.flag }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
id: py | |
with: | |
python-version: '3.9' # workaround "cannot import name 'Mapping' from 'collections'" error | |
- name: Get release | |
id: get_release | |
uses: bruceadams/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- run: | | |
sudo apt-get update | |
sudo apt-get install -y gcc-10 g++-10 | |
- run: npm install --production --ignore-scripts | |
- run: (cd nexe && npm install --production) | |
- run: (cd nexe && node build) | |
env: | |
CC: gcc-10 | |
CXX: g++-10 | |
- run: nexe/parpar --version | |
- run: nexe/parpar -r1 -s1M -onexe/test.par2 nexe/parpar | |
- run: xz -9e --x86 --lzma2 nexe/parpar -c > parpar.xz | |
- uses: sekwah41/upload-release-assets@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: ./parpar.xz | |
asset_name: parpar-${{ steps.get_release.outputs.tag_name }}-linux-${{ matrix.static.name }}-amd64.xz | |
asset_content_type: application/octet-stream | |
build-linux-aarch64: | |
strategy: | |
fail-fast: false | |
matrix: | |
static: | |
- name: glibc2.35 | |
flag: --partly-static | |
- name: static | |
flag: --fully-static | |
name: Build aarch64 Linux ${{ matrix.static.name }} binary | |
runs-on: ubuntu-22.04 | |
env: | |
BUILD_ARCH: arm64 | |
BUILD_LOGLEVEL: verbose | |
BUILD_STATIC: ${{ matrix.static.flag }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
id: py | |
with: | |
python-version: '3.9' # workaround "cannot import name 'Mapping' from 'collections'" error | |
- uses: junelife/gha-ubuntu-cross@v4 | |
with: | |
arch: arm64 | |
- name: Get release | |
id: get_release | |
uses: bruceadams/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- run: npm install --production --ignore-scripts | |
- run: (cd nexe && npm install --production) | |
- run: (cd nexe && node build) | |
env: | |
CC: aarch64-linux-gnu-gcc | |
CXX: aarch64-linux-gnu-g++ | |
CC_host: cc | |
CXX_host: c++ | |
- run: xz -9e --lzma2 nexe/parpar -c > parpar.xz | |
- uses: sekwah41/upload-release-assets@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: ./parpar.xz | |
asset_name: parpar-${{ steps.get_release.outputs.tag_name }}-linux-${{ matrix.static.name }}-aarch64.xz | |
asset_content_type: application/octet-stream | |
# build-linux-armv7l: | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# static: | |
# - name: glibc2.31 | |
# flag: --partly-static | |
# - name: static | |
# flag: --fully-static | |
# name: Build armv7l Linux ${{ matrix.static.name }} binary | |
# runs-on: ubuntu-20.04 | |
# env: | |
# BUILD_ARCH: armhf | |
# BUILD_LOGLEVEL: verbose | |
# BUILD_CONFIGURE: '--with-arm-float-abi=hard --with-arm-fpu=vfpv3-d16' | |
# BUILD_STATIC: ${{ matrix.static.flag }} | |
# BUILD_NO_LTO: 1 # AArch32 compilers don't like mixing FPU modes with LTO [https://github.com/sabnzbd/#sabctools/issues/56#issuecomment-1151994494] | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - uses: actions/setup-python@v4 | |
# id: py | |
# with: | |
# python-version: '3.9' # workaround "cannot import name 'Mapping' from 'collections'" error | |
# - uses: junelife/gha-ubuntu-cross@v4 | |
# with: | |
# arch: armhf | |
# - uses: ryankurte/[email protected] | |
# with: | |
# arch: i386 # '-m32' switch doesn't work without this | |
# packages: "libstdc++-$(c++ -dumpversion)-dev:i386 libc6-dev:i386" | |
# - name: Get release | |
# id: get_release | |
# uses: bruceadams/[email protected] | |
# env: | |
# GITHUB_TOKEN: ${{ github.token }} | |
# - run: npm install --production --ignore-scripts | |
# - run: (cd nexe && npm install --production) | |
# - run: (cd nexe && node build) | |
# env: | |
# CC: arm-linux-gnueabihf-gcc | |
# CXX: arm-linux-gnueabihf-g++ | |
# CC_host: cc | |
# CXX_host: c++ | |
# - run: xz -9e --arm --lzma2 nexe/parpar -c > parpar.xz | |
# - uses: sekwah41/upload-release-assets@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ github.token }} | |
# with: | |
# upload_url: ${{ steps.get_release.outputs.upload_url }} | |
# asset_path: ./parpar.xz | |
# asset_name: parpar-${{ steps.get_release.outputs.tag_name }}-linux-${{ matrix.static.name }}-armv7l.xz | |
# asset_content_type: application/octet-stream | |
build-mac-x64: | |
name: Build x64 MacOS binary | |
runs-on: macos-latest | |
env: | |
BUILD_ARCH: x64 | |
BUILD_LOGLEVEL: verbose | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get release | |
id: get_release | |
uses: bruceadams/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- run: npm install --production --ignore-scripts | |
- run: (cd nexe && npm install --production) | |
- run: (cd nexe && node build) | |
- run: nexe/parpar --version | |
- run: nexe/parpar -r1 -s1M -onexe/test.par2 nexe/parpar | |
- run: xz -9e --x86 --lzma2 nexe/parpar -c > parpar.xz | |
- uses: sekwah41/upload-release-assets@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: ./parpar.xz | |
asset_name: parpar-${{ steps.get_release.outputs.tag_name }}-macos-x64.xz | |
asset_content_type: application/octet-stream |