Skip to content

Commit

Permalink
attempt mac os build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
akaszynski committed Jul 16, 2024
1 parent 09fb23c commit 02972a8
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 560 deletions.
92 changes: 46 additions & 46 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
pull_request:
push:
tags:
- "*"
- '*'
branches:
- "main"
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -21,65 +21,65 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-14, macos-13]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/[email protected]
- name: Build wheels
uses: pypa/[email protected]

- uses: actions/upload-artifact@v4
with:
name: stl-reader-wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
- uses: actions/upload-artifact@v4
with:
name: stl-reader-wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Build sdist
run: pipx run build --sdist
- name: Build sdist
run: pipx run build --sdist

- name: Install from sdist
run: pip install dist/stl_reader*.tar.gz
- name: Install from sdist
run: pip install dist/stl*.tar.gz

- name: Run tests
run: |
pip install pyvista pytest
pytest -x
- name: Run tests
run: |
pip install pyvista pytest
pytest -x
- uses: actions/upload-artifact@v4
with:
name: stl-reader-sdist
path: dist/*.tar.gz
- uses: actions/upload-artifact@v4
with:
name: stl-reader-sdist
path: dist/*.tar.gz

upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') # upload to PyPI on every tag
steps:
- uses: actions/download-artifact@v4
- name: Flatten directory structure
run: |
mkdir -p dist/
find . -name '*.whl' -exec mv {} dist/ \;
find . -name '*.tar.gz' -exec mv {} dist/ \;
- name: List artifacts
run: ls -R

- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}

- name: Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
./dist/*.whl
- uses: actions/download-artifact@v4
- name: Flatten directory structure
run: |
mkdir -p dist/
find . -name '*.whl' -exec mv {} dist/ \;
find . -name '*.tar.gz' -exec mv {} dist/ \;
- name: List artifacts
run: ls -R

- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}

- name: Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
./dist/*.whl
Loading

0 comments on commit 02972a8

Please sign in to comment.