Use the extra index when building the armv7l wheels #303
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: socketsocketcan CI | |
on: [push, pull_request] | |
jobs: | |
armv7l: | |
name: Build armv7l wheels | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 15 | |
strategy: | |
matrix: | |
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build ${{ matrix.docker_images }} wheel | |
id: build | |
run: | | |
docker build -f Dockerfile.armv7l -t lauszus/socketsocketcan --build-arg PYTHON_VERSION="${{ matrix.python-version }}" . | |
docker cp "$(docker create lauszus/socketsocketcan)":/socketsocketcan-wheel . | |
# Copy over the wheel. | |
mkdir dist | |
cp socketsocketcan-wheel/socketsocketcan*.whl dist/ | |
- name: Upload wheel as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: socketsocketcan-armv7l-${{ matrix.python-version }}-${{ github.sha }} | |
path: dist | |
retention-days: 1 | |
if-no-files-found: error | |
amd64: | |
name: Build amd64 wheels | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 5 | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Build amd64 ${{ matrix.python-version }} wheel | |
run: pip3 -v wheel --wheel-dir=socketsocketcan-wheel . | |
- name: Run amd64 ${{ matrix.python-version }} wheel | |
run: | | |
# Make sure the wheel is working. | |
pip3 install --no-index --find-links=socketsocketcan-wheel socketsocketcan | |
python3 -c "import socketsocketcan; print(dir(socketsocketcan))" | |
# Copy over the wheel. | |
mkdir dist | |
cp socketsocketcan-wheel/socketsocketcan*.whl dist/ | |
- name: Upload wheel as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: socketsocketcan-x86-${{ matrix.python-version }}-${{ github.sha }} | |
path: dist | |
retention-days: 1 | |
if-no-files-found: error | |
sdist: | |
name: Build sdist | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: pip3 install -U pip setuptools wheel pybind11 | |
- name: Build sdist | |
run: python3 setup.py sdist --formats=gztar,zip | |
- name: Upload sdist as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: socketsocketcan-sdist-3.10-${{ github.sha }} | |
path: dist | |
retention-days: 1 | |
if-no-files-found: error | |
release: | |
needs: [armv7l, amd64, sdist] | |
name: Release | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 5 | |
steps: | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- uses: actions/download-artifact@v4 | |
with: | |
pattern: socketsocketcan-*-*-${{ github.sha }} | |
path: socketsocketcan | |
merge-multiple: true | |
- name: Publish to private PyPI server | |
if: startsWith(github.ref, 'refs/tags/') | |
run: | | |
pip3 install -U pip setuptools wheel | |
pip3 install -U twine | |
twine upload --repository-url ${{ secrets.PYPI_URL }} -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} socketsocketcan/* | |
- name: Calculate checksums | |
run: | | |
pushd socketsocketcan | |
sha256sum * > SHA256SUMS | |
popd | |
- name: Publish to Github Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: socketsocketcan/* | |
draft: true | |
fail_on_unmatched_files: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |