Thanks to visit codestin.com
Credit goes to github.com

Skip to content

STUB 12

STUB 12 #11

Workflow file for this run

name: Build Wheels
on:
push:
branches:
- master
pull_request:
branches:
- master
release:
types: [created]
jobs:
# TODO: Test before wheel building
test:
name: Test

Check failure on line 16 in .github/workflows/build-wheels.yml

View workflow run for this annotation

GitHub Actions / Build Wheels

Invalid workflow file

The workflow is not valid. .github/workflows/build-wheels.yml (Line: 16, Col: 5): Required property is missing: runs-on
#runs-on: ${{ matrix.os }}
#strategy
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install admesh
# TODO: Do I need to install wget?
run: |
if [ ! -f admesh-$ADMESH/.libs/admesh ]; then
wget https://github.com/admesh/admesh/releases/download/v$ADMESH/admesh-$ADMESH.tar.gz;
tar -zxf admesh-$ADMESH.tar.gz;
cd admesh-$ADMESH;
"./configure";
make;
mkdir src/admesh;
cp src/stl.h src/admesh/stl.h;
cd ..;
fi
python -m pip install tox Cython
LD_LIBRARY_PATH=$PWD/admesh-$ADMESH/.libs LDFLAGS=-L$PWD/admesh-$ADMESH/.libs CFLAGS=-I$PWD/admesh-$ADMESH/src tox
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install system build dependencies
run: |
if [[ "$RUNNER_OS" == "Linux" ]]; then
sudo apt update
sudo apt install -y build-essential wget tar cmake
elif [[ "$RUNNER_OS" == "macOS" ]]; then
brew install wget cmake
fi
- name: Build wheels using cibuildwheel
uses: pypa/[email protected]
env:
# Build CPython and PyPy wheels for x86_64 linux
CIBW_BUILD: "*p3*-manylinux_x86_64"
CIBW_BEFORE_BUILD_LINUX: |
rpm -q admesh-devel || yum install -y --nogpgcheck /project/travis/*.x86_64.rpm; pip install Cython
CIBW_TEST_REQUIRES: "pytest"
CIBW_TEST_COMMAND: "pytest -v {project}/test"
- name: Upload built wheels as artifact
uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
#publish_pypi:
# name: Publish to PyPI
# needs: build_wheels
# runs-on: ubuntu-latest
# if: github.event_name == 'release'
# steps:
# - name: Download built wheels
# uses: actions/download-artifact@v4
# with:
# path: dist
# - name: Publish to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.PYPI_API_TOKEN }}