Build #47
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", | |
"on": { | |
"workflow_dispatch": null | |
}, | |
"jobs": { | |
"build-source": { | |
"runs-on": "ubuntu-22.04", | |
"steps": [ | |
{ | |
"uses": "actions/checkout@v4", | |
"with": { | |
"submodules": "recursive" | |
} | |
}, | |
{ | |
"name": "Setup Python", | |
"uses": "actions/setup-python@v5", | |
"with": { | |
"python-version": "3.12", | |
"architecture": "x64" | |
} | |
}, | |
{ | |
"name": "Build", | |
"run": "python -m pip install --upgrade pip\npip3 install --upgrade wheel\npip3 install --upgrade setuptools\npython setup.py sdist\n" | |
}, | |
{ | |
"name": "Upload artifact", | |
"uses": "actions/upload-artifact@v3.2.1", | |
"with": { | |
"name": "wheel", | |
"path": "dist/*" | |
} | |
} | |
] | |
}, | |
"build-linux-x86-64": { | |
"runs-on": "ubuntu-22.04", | |
"steps": [ | |
{ | |
"uses": "actions/checkout@v4", | |
"with": { | |
"submodules": "recursive" | |
} | |
}, | |
{ | |
"name": "Setup Python", | |
"uses": "actions/setup-python@v5", | |
"with": { | |
"python-version": "3.12", | |
"architecture": "x64" | |
} | |
}, | |
{ | |
"name": "Build reliq", | |
"run": "make -C reliq-c clean lib -j4 CFLAGS='-O3'\nmv reliq-c/libreliq.so reliq/\n" | |
}, | |
{ | |
"name": "Build wheel", | |
"run": "python -m pip install --upgrade pip\npip3 install --upgrade wheel\npip3 install --upgrade setuptools\npython setup.py bdist_wheel --plat-name manylinux2014_x86_64\n" | |
}, | |
{ | |
"name": "Upload artifact wheel", | |
"uses": "actions/upload-artifact@v3.2.1", | |
"with": { | |
"name": "wheel", | |
"path": "dist/*" | |
} | |
} | |
] | |
}, | |
"build-linux-other": { | |
"runs-on": "ubuntu-22.04", | |
"strategy": { | |
"matrix": { | |
"arch": [ | |
"aarch64", | |
"armv7" | |
] | |
} | |
}, | |
"steps": [ | |
{ | |
"uses": "actions/checkout@v4", | |
"with": { | |
"submodules": "recursive" | |
} | |
}, | |
{ | |
"uses": "uraimo/run-on-arch-action@v2", | |
"with": { | |
"arch": "${{ matrix.arch }}", | |
"distro": "ubuntu22.04", | |
"githubToken": "${{ github.token }}", | |
"setup": "mkdir -p \"${PWD}/artifacts\"\n", | |
"dockerRunArgs": "--volume \"${PWD}/artifacts:/artifacts\"\n", | |
"shell": "/bin/bash", | |
"run": "apt-get update -q -y\napt-get install -q -y git python3 python3-pip gcc make\ncase \"${{ matrix.arch }}\" in armv7) archname=\"armv7l\";; *) archname=\"${{ matrix.arch }}\";; esac\nmake -C reliq-c clean lib -j4 CFLAGS='-O3'\nmv reliq-c/libreliq.so reliq/\npython3 -m pip install --upgrade pip\npython3 -m pip install wheel --upgrade\npython3 -m pip install setuptools --upgrade\npython3 setup.py bdist_wheel --plat-name manylinux2014_$archname\nmv dist/* artifacts/\n" | |
} | |
}, | |
{ | |
"name": "Upload artifact wheel", | |
"uses": "actions/upload-artifact@v3.2.1", | |
"with": { | |
"name": "wheel", | |
"path": "artifacts/*" | |
} | |
} | |
] | |
}, | |
"build-windows": { | |
"runs-on": "windows-2019", | |
"defaults": { | |
"run": { | |
"shell": "msys2 {0}" | |
} | |
}, | |
"steps": [ | |
{ | |
"uses": "msys2/setup-msys2@v2", | |
"with": { | |
"msystem": "ucrt64", | |
"update": true, | |
"install": "mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-libgnurx make python python-pip" | |
} | |
}, | |
{ | |
"uses": "actions/checkout@v4", | |
"with": { | |
"submodules": "recursive" | |
} | |
}, | |
{ | |
"name": "Build reliq", | |
"run": "make -C reliq-c clean lib -j4 CFLAGS='-O3' LDFLAGS='/ucrt64/lib/libgnurx.a'\nmv reliq-c/libreliq.so reliq/\n" | |
}, | |
{ | |
"name": "Build wheel", | |
"run": "python -m pip install --break-system-packages --upgrade pip\npython -m pip install --break-system-packages --upgrade wheel\npython -m pip install --break-system-packages --upgrade setuptools\npython setup.py bdist_wheel --plat-name win-amd64\n" | |
}, | |
{ | |
"name": "Upload artifact wheel", | |
"uses": "actions/upload-artifact@v3.2.1", | |
"with": { | |
"name": "wheel", | |
"path": "dist/*" | |
} | |
} | |
] | |
}, | |
"build-mac-arm64": { | |
"runs-on": "macos-${{ matrix.os }}", | |
"strategy": { | |
"matrix": { | |
"os": [ | |
"13", | |
"14" | |
] | |
} | |
}, | |
"steps": [ | |
{ | |
"uses": "actions/checkout@v4", | |
"with": { | |
"submodules": "recursive" | |
} | |
}, | |
{ | |
"name": "Setup Python", | |
"uses": "actions/setup-python@v5", | |
"with": { | |
"python-version": "3.12", | |
"architecture": "x64" | |
} | |
}, | |
{ | |
"name": "Build reliq", | |
"run": "make -C reliq-c clean lib -j4 CFLAGS='-O3'\nmv reliq-c/libreliq.so reliq/\n" | |
}, | |
{ | |
"name": "Build wheel", | |
"run": "python -m pip install --upgrade pip\npip3 install --upgrade wheel\npip3 install --upgrade setuptools\npython setup.py bdist_wheel --plat-name macosx_${{ matrix.os }}_0_arm64\n" | |
}, | |
{ | |
"name": "Upload artifact wheel", | |
"uses": "actions/upload-artifact@v3.2.1", | |
"with": { | |
"name": "wheel", | |
"path": "dist/*" | |
} | |
} | |
] | |
} | |
} | |
} |