Skip to content

Commit b0c1301

Browse files
lapetsPaTara43
andcommitted
Add jobs for musl Linux to build/publish/sign/release GitHub Actions workflow.
Thanks to @PaTara43 for a related PR (nthparty/rbcl#7). Co-Authored-By: Pavel Tarasov <patara@multi-agent.io>
1 parent 5448f5d commit b0c1301

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

.github/workflows/build-lint-test-cover-docs-upload.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,66 @@ jobs:
8080
with:
8181
name: bcl-${{ env.WHEELNAME_PY }}-${{ env.WHEELNAME_OS }}
8282
path: bcl-wheelhouse/
83+
musllinux:
84+
runs-on: ${{ matrix.os-arch.os }}
85+
strategy:
86+
matrix:
87+
os-arch:
88+
- {os: 'ubuntu-24.04', arch: 'x86_64'}
89+
- {os: 'ubuntu-24.04-arm', arch: 'aarch64'}
90+
python:
91+
- {version: '3.9', abi: 'cp39'}
92+
- {version: '3.10', abi: 'cp310'}
93+
- {version: '3.11', abi: 'cp311'}
94+
- {version: '3.12', abi: 'cp312'}
95+
- {version: '3.13', abi: 'cp313'}
96+
name: >
97+
Python ${{ matrix.python.version }} with ABI ${{ matrix.python.abi }}
98+
for musllinux_1_2_${{ matrix.os-arch.arch }}
99+
env:
100+
WHEELNAME_PY: ${{ github.ref_name }}-${{ matrix.python.abi }}
101+
WHEELNAME_OS: abi3-musllinux_1_2_${{ matrix.os-arch.arch }}
102+
CIBW_BUILD_VERBOSITY: 1
103+
CIBW_ARCHS_LINUX: ${{ matrix.os-arch.arch }}
104+
CIBW_BUILD: ${{ matrix.python.abi }}-musllinux_${{ matrix.os-arch.arch }}
105+
CIBW_SKIP: '*-manylinux_*'
106+
CIBW_PROJECT_REQUIRES_PYTHON: '~=${{ matrix.python.version }}'
107+
CIBW_ENVIRONMENT: LIBSODIUM_MAKE_ARGS="-j$(nproc)"
108+
CIBW_BEFORE_ALL: >
109+
pip install .[build] -v
110+
CIBW_REPAIR_WHEEL_COMMAND: ''
111+
CIBW_TEST_EXTRAS: 'lint,test,docs'
112+
CIBW_BEFORE_TEST: >
113+
cd {project} &&
114+
cp build/lib*/bcl/_sodium.py src/bcl/_sodium.py &&
115+
pip3 install pystache~=0.6 setuptools &&
116+
apk add wget &&
117+
wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.18.tar.gz &&
118+
mv libsodium-1.0.18.tar.gz src/bcl/libsodium.tar.gz
119+
CIBW_TEST_COMMAND: >
120+
cd {project} &&
121+
python -m pylint bcl src/bcl/_sodium.tmpl src/bcl/_sodium_build.py --disable=duplicate-code &&
122+
python src/bcl/bcl.py -v &&
123+
python -m pytest &&
124+
cd docs &&
125+
sphinx-apidoc -f -E --templatedir=_templates -o _source .. ../src/bcl/_sodium_build.py ** &&
126+
make html
127+
CIBW_DEBUG_TRACEBACK: True
128+
steps:
129+
- uses: actions/checkout@v5
130+
- name: Build wheel file.
131+
uses: pypa/cibuildwheel@v3.2.0
132+
with:
133+
output-dir: wheelhouse
134+
- name: Rename wheel file.
135+
run: |
136+
mkdir bcl-wheelhouse
137+
mv wheelhouse/bcl*.whl bcl-wheelhouse/bcl-${{ env.WHEELNAME_PY }}-${{ env.WHEELNAME_OS }}.whl
138+
- name: Upload wheel file.
139+
uses: actions/upload-artifact@v4
140+
with:
141+
name: bcl-${{ env.WHEELNAME_PY }}-${{ env.WHEELNAME_OS }}
142+
path: bcl-wheelhouse/
83143
macos:
84144
runs-on: ${{ matrix.os-arch.os }}
85145
strategy:

0 commit comments

Comments
 (0)