Skip to content

Commit

Permalink
feat: 配置仓库
Browse files Browse the repository at this point in the history
  • Loading branch information
wojiushixiaobai committed Jan 1, 2025
1 parent 542dfc0 commit d664443
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/cffi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ jobs:
run: |
sudo mkdir -p /home/runner/data/cache/.cache /home/runner/data/cache/dnf
sudo chown -R root:docker /home/runner/data/cache
sudo mkdir -p /tmp/pip
sudo wget -O /tmp/pip/pip.conf https://github.com/loong64/buildwheel/raw/refs/heads/master/pip.conf
- name: Setup QEMU
run: docker run --rm --privileged ghcr.io/loong64/qemu-user-static --reset -p yes
Expand All @@ -58,10 +60,10 @@ jobs:
CIBW_BUILD: ${{ github.event.inputs.build_manylinux }}
CIBW_TEST_SKIP: "*"
CIBW_BEFORE_ALL_LINUX: >
mv /host/tmp/pip /root/.pip &&
ln -sf /host/home/runner/data/cache/.cache /root/.cache &&
ln -sf /host/home/runner/data/cache/dnf /var/cache/dnf &&
yum install -y ${{ github.event.inputs.build_requires }}
CIBW_ENVIRONMENT_LINUX: "PATH=$HOME/.cargo/bin:$PATH"
- name: Upload wheels
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ jobs:
run: |
sudo mkdir -p /home/runner/data/cache/.cache /home/runner/data/cache/dnf
sudo chown -R root:docker /home/runner/data/cache
sudo mkdir -p /tmp/pip
sudo wget -O /tmp/pip/pip.conf https://github.com/loong64/buildwheel/raw/refs/heads/master/pip.conf
- name: Setup QEMU
run: docker run --rm --privileged ghcr.io/loong64/qemu-user-static --reset -p yes
Expand All @@ -58,10 +60,10 @@ jobs:
CIBW_BUILD: ${{ github.event.inputs.build_manylinux }}
CIBW_TEST_SKIP: "*"
CIBW_BEFORE_ALL_LINUX: >
mv /host/tmp/pip /root/.pip &&
ln -sf /host/home/runner/data/cache/.cache /root/.cache &&
ln -sf /host/home/runner/data/cache/dnf /var/cache/dnf &&
yum install -y ${{ github.event.inputs.build_requires }}
CIBW_ENVIRONMENT_LINUX: "PATH=$HOME/.cargo/bin:$PATH"
- name: Upload wheels
run: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/cryptography.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ jobs:
run: |
sudo mkdir -p /home/runner/data/cache/.cache /home/runner/data/cache/dnf
sudo chown -R root:docker /home/runner/data/cache
sudo mkdir -p /tmp/pip
sudo wget -O /tmp/pip/pip.conf https://github.com/loong64/buildwheel/raw/refs/heads/master/pip.conf
- name: Setup QEMU
run: docker run --rm --privileged ghcr.io/loong64/qemu-user-static --reset -p yes
Expand All @@ -58,6 +60,7 @@ jobs:
CIBW_BUILD: ${{ github.event.inputs.build_manylinux }}
CIBW_TEST_SKIP: "*"
CIBW_BEFORE_ALL_LINUX: >
mv /host/tmp/pip /root/.pip &&
ln -sf /host/home/runner/data/cache/.cache /root/.cache &&
ln -sf /host/home/runner/data/cache/dnf /var/cache/dnf &&
curl -sSf https://sh.rustup.rs | sh -s -- -y &&
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/custom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ jobs:
run: |
sudo mkdir -p /home/runner/data/cache/.cache /home/runner/data/cache/dnf
sudo chown -R root:docker /home/runner/data/cache
sudo mkdir -p /tmp/pip
sudo wget -O /tmp/pip/pip.conf https://github.com/loong64/buildwheel/raw/refs/heads/master/pip.conf
- name: Setup QEMU
run: docker run --rm --privileged ghcr.io/loong64/qemu-user-static --reset -p yes
Expand All @@ -58,6 +60,7 @@ jobs:
CIBW_BUILD: ${{ github.event.inputs.build_manylinux }}
CIBW_TEST_SKIP: "*"
CIBW_BEFORE_ALL_LINUX: >
mv /host/tmp/pip /root/.pip &&
ln -sf /host/home/runner/data/cache/.cache /root/.cache &&
ln -sf /host/home/runner/data/cache/dnf /var/cache/dnf &&
curl -sSf https://sh.rustup.rs | sh -s -- -y &&
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/msgpack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:
run: |
sudo mkdir -p /home/runner/data/cache/.cache /home/runner/data/cache/dnf
sudo chown -R root:docker /home/runner/data/cache
sudo mkdir -p /tmp/pip
sudo wget -O /tmp/pip/pip.conf https://github.com/loong64/buildwheel/raw/refs/heads/master/pip.conf
- name: Setup QEMU
run: docker run --rm --privileged ghcr.io/loong64/qemu-user-static --reset -p yes
Expand All @@ -54,9 +56,8 @@ jobs:
CIBW_BUILD: ${{ github.event.inputs.build_manylinux }}
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: "PATH=$HOME/.cargo/bin:$PATH"
mv /host/tmp/pip /root/.pip &&
ln -sf /host/home/runner/data/cache/.cache /root/.cache
- name: Upload wheels
run: |
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/ninja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:
run: |
sudo mkdir -p /home/runner/data/cache/.cache /home/runner/data/cache/dnf
sudo chown -R root:docker /home/runner/data/cache
sudo mkdir -p /tmp/pip
sudo wget -O /tmp/pip/pip.conf https://github.com/loong64/buildwheel/raw/refs/heads/master/pip.conf
- name: Setup QEMU
run: docker run --rm --privileged ghcr.io/loong64/qemu-user-static --reset -p yes
Expand All @@ -54,9 +56,8 @@ jobs:
CIBW_BUILD: ${{ github.event.inputs.build_manylinux }}
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: "PATH=$HOME/.cargo/bin:$PATH"
mv /host/tmp/pip /root/.pip &&
ln -sf /host/home/runner/data/cache/.cache /root/.cache
- name: Upload wheels
run: |
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pillow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ jobs:
run: |
sudo mkdir -p /home/runner/data/cache/.cache /home/runner/data/cache/dnf
sudo chown -R root:docker /home/runner/data/cache
sudo mkdir -p /tmp/pip
sudo wget -O /tmp/pip/pip.conf https://github.com/loong64/buildwheel/raw/refs/heads/master/pip.conf
- name: Setup QEMU
run: docker run --rm --privileged ghcr.io/loong64/qemu-user-static --reset -p yes
Expand All @@ -58,10 +60,10 @@ jobs:
CIBW_BUILD: ${{ github.event.inputs.build_manylinux }}
CIBW_TEST_SKIP: "*"
CIBW_BEFORE_ALL_LINUX: >
mv /host/tmp/pip /root/.pip &&
ln -sf /host/home/runner/data/cache/.cache /root/.cache &&
ln -sf /host/home/runner/data/cache/dnf /var/cache/dnf &&
yum install -y ${{ github.event.inputs.build_requires }}
CIBW_ENVIRONMENT_LINUX: "PATH=$HOME/.cargo/bin:$PATH"
- name: Upload wheels
run: |
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/scipy-openblas32.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: scipy-openblas32

on:
workflow_dispatch:
inputs:
app_name:
description: 'Build package'
required: true
default: 'MacPython/openblas-libs'
app_version:
description: 'Build version'
required: true
default: 'latest'
build_manylinux:
description: 'Build manylinux'
required: true
default: 'cp39-manylinux_*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
repository: ${{ github.event.inputs.app_name }}
ref: ${{ github.event.inputs.app_version }}

- name: Cache build
uses: actions/cache@v4
with:
path: |
/home/runner/data/cache
key: ${{ runner.os }}-scipy-openblas32
restore-keys: |
${{ runner.os }}-scipy-openblas32
- 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
sudo mkdir -p /tmp/pip
sudo wget -O /tmp/pip/pip.conf https://github.com/loong64/buildwheel/raw/refs/heads/master/pip.conf
- 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_BUILD: ${{ github.event.inputs.build_manylinux }}
CIBW_TEST_SKIP: "*"
CIBW_BEFORE_ALL_LINUX: >
mv /host/tmp/pip /root/.pip &&
ln -sf /host/home/runner/data/cache/.cache /root/.cache &&
ln -sf /host/home/runner/data/cache/dnf /var/cache/dnf &&
- 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
3 changes: 3 additions & 0 deletions pip.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[global]
index-url = https://gitlab.com/api/v4/projects/65746188/packages/pypi/simple
trusted-host = gitlab.com

0 comments on commit d664443

Please sign in to comment.