Skip to content

Commit

Permalink
no qemu (to test)
Browse files Browse the repository at this point in the history
  • Loading branch information
alik-git committed Dec 21, 2024
1 parent b5deeaa commit 5d71ee9
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ jobs:
build-wheels:
strategy:
matrix:
os: [ubuntu-latest]
os: [ubuntu-latest, macos-latest]
name: Build and publish Python package (${{ matrix.os }})
timeout-minutes: 10
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -35,26 +36,12 @@ jobs:
with:
toolchain: stable

- name: Install Docker on macOS
if: runner.os == 'macOS'
run: |
brew install colima docker
colima start
eval $(colima docker-env)
docker version
docker info
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install cibuildwheel
shell: bash

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: all

- name: Build package
env:
CIBW_SKIP: "pp* *-musllinux*" # Skip PyPy and musllinux builds
Expand All @@ -65,8 +52,6 @@ jobs:
mv protoc/include/google /usr/local/include/google
CIBW_BEFORE_ALL_MACOS: |
brew install protobuf
CIBW_ARCHS_LINUX: auto aarch64 ppc64le s390x
CIBW_QEMU: "true"
CIBW_BEFORE_BUILD: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
Expand All @@ -76,14 +61,12 @@ jobs:
CARGO_NET_GIT_FETCH_WITH_CLI=true
run: |
cibuildwheel --output-dir dist
- name: Upload wheel artifacts
uses: actions/upload-artifact@v3
with:
name: wheels-${{ matrix.os }}
path: |
dist/*.whl
build-source-dist:
name: Build and publish Python package (source distribution)
timeout-minutes: 10
Expand Down Expand Up @@ -112,14 +95,12 @@ jobs:
- name: Build source distribution
run: |
python -m build --sdist --outdir dist
- name: Upload source distribution
uses: actions/upload-artifact@v3
with:
name: source-dist
path: |
dist/*.tar.gz
publish-wheels:
needs: [build-wheels, build-source-dist]
name: Publish Python wheels
Expand All @@ -137,7 +118,6 @@ jobs:
mkdir -p final_dist
find dist -name "*.whl" -exec mv {} final_dist/ \;
find dist -name "*.tar.gz" -exec mv {} final_dist/ \;
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand All @@ -161,7 +141,6 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y libudev-dev pkg-config
- name: Install protoc
uses: arduino/setup-protoc@v3

Expand All @@ -172,15 +151,13 @@ jobs:
key: ${{ runner.os }}-cargo-registry
restore-keys: |
${{ runner.os }}-cargo-registry
- name: Cache Cargo index
uses: actions/cache@v2
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index
restore-keys: |
${{ runner.os }}-cargo-index
- name: Publish K-Rec package to crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
Expand Down

0 comments on commit 5d71ee9

Please sign in to comment.