Skip to content

Commit

Permalink
feat: 添加 pyzmq
Browse files Browse the repository at this point in the history
  • Loading branch information
wojiushixiaobai committed Jan 5, 2025
1 parent 10d7cd9 commit e12465b
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
env:
CIBW_MANYLINUX_LOONGARCH64_IMAGE: manylinux_2_38
CIBW_ARCHS: loongarch64
CIBW_SKIP: pp* *-musllinux*
CIBW_TEST_SKIP: "*"
CIBW_BEFORE_ALL_LINUX: >
ln -sf /host/home/runner/data/cache/.cache /root/.cache &&
Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/pyzmq.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: pyzmq

on:
workflow_dispatch:
inputs:
app_name:
description: 'Build package'
required: true
default: 'pyzmq'
app_version:
description: 'Build version'
required: true
default: 'latest'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
run: |
if [ "${{ github.event.inputs.app_version }}" == "latest" ]; then
pip download --no-deps --no-binary :all: ${{ github.event.inputs.app_name }} -d ../
else
pip download --no-deps --no-binary :all: ${{ github.event.inputs.app_name }}==${{ github.event.inputs.app_version }} -d ../
fi
tar -xf ../*.tar.gz -C . --strip-components=1
- name: Cache build
uses: actions/cache@v4
with:
path: |
/home/runner/data/cache
key: ${{ runner.os }}-${{ github.event.inputs.app_name }}
restore-keys: |
${{ runner.os }}-${{ github.event.inputs.app_name }}
- name: Setup Cache
run: |
sudo mkdir -p /home/runner/data/cache/.cache /home/runner/data/cache/dnf
sudo chown -R root:docker /home/runner/data/cache
- name: Setup QEMU
run: docker run --rm --privileged ghcr.io/loong64/qemu-user-static --reset -p yes

- name: Build wheels
uses: loong64/cibuildwheel@main
env:
CIBW_MANYLINUX_LOONGARCH64_IMAGE: manylinux_2_38
CIBW_ARCHS: loongarch64
CIBW_SKIP: pp* *-musllinux*
CIBW_TEST_SKIP: "*"
CIBW_BEFORE_ALL_LINUX: >
ln -sf /host/home/runner/data/cache/.cache /root/.cache &&
ln -sf /host/home/runner/data/cache/dnf /var/cache/dnf
CIBW_ENVIRONMENT_LINUX: PIP_INDEX_URL=https://gitlab.com/api/v4/projects/65746188/packages/pypi/simple

- name: Upload wheels
run: |
pip install twine
twine upload --repository-url https://gitlab.com/api/v4/projects/65746188/packages/pypi wheelhouse/*.whl
env:
TWINE_USERNAME: ${{ github.repository_owner }}
TWINE_PASSWORD: ${{ secrets.GL_TOKEN }}

- name: Cache permissions
run: |
sudo chown -R runner:docker /home/runner/data/cache

0 comments on commit e12465b

Please sign in to comment.