-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
75 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,52 +95,54 @@ jobs: | |
name: dist | ||
path: ./wheelhouse/*.whl | ||
|
||
build_wheels_macos: | ||
needs: [build_sdist] | ||
name: Wheel for MacOS-${{ matrix.cibw_python }}-${{ matrix.cibw_arch }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-11] | ||
cibw_python: ["cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*"] | ||
cibw_arch: ["x86_64", "arm64"] | ||
#build_wheels_macos: | ||
# needs: [build_sdist] | ||
# name: Wheel for MacOS-${{ matrix.cibw_python }}-${{ matrix.cibw_arch }} | ||
# runs-on: ${{ matrix.os }} | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# os: [macos-11] | ||
# cibw_python: ["cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*"] | ||
# cibw_arch: ["x86_64", "arm64"] | ||
|
||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: tests | ||
path: tests | ||
- name: Extract sdist | ||
run: | | ||
tar zxvf dist/*.tar.gz --strip-components=1 | ||
- name: Sets env vars for compilation | ||
if: matrix.cibw_arch == 'arm64' | ||
run: | | ||
echo "CFLAGS=-target arm64-apple-macos11" >> $GITHUB_ENV | ||
echo "MEMRAY_LIBBACKTRACE_TARGET=arm64-apple-macos11" >> $GITHUB_ENV | ||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_BUILD: ${{ matrix.cibw_python }} | ||
CIBW_ARCHS_MACOS: ${{ matrix.cibw_arch }} | ||
CIBW_PRERELEASE_PYTHONS: True | ||
CIBW_TEST_EXTRAS: test | ||
CIBW_TEST_COMMAND: pytest {package}/tests | ||
CIBW_BUILD_VERBOSITY: 1 | ||
MACOSX_DEPLOYMENT_TARGET: "10.14" | ||
# steps: | ||
# - uses: actions/download-artifact@v3 | ||
# with: | ||
# name: dist | ||
# path: dist | ||
# - uses: actions/download-artifact@v3 | ||
# with: | ||
# name: tests | ||
# path: tests | ||
# - name: Extract sdist | ||
# run: | | ||
# tar zxvf dist/*.tar.gz --strip-components=1 | ||
# - name: Sets env vars for compilation | ||
# if: matrix.cibw_arch == 'arm64' | ||
# run: | | ||
# echo "CFLAGS=-target arm64-apple-macos11" >> $GITHUB_ENV | ||
# echo "MEMRAY_LIBBACKTRACE_TARGET=arm64-apple-macos11" >> $GITHUB_ENV | ||
# - name: Build wheels | ||
# uses: pypa/[email protected] | ||
# env: | ||
# CIBW_BUILD: ${{ matrix.cibw_python }} | ||
# CIBW_ARCHS_MACOS: ${{ matrix.cibw_arch }} | ||
# CIBW_PRERELEASE_PYTHONS: True | ||
# CIBW_TEST_EXTRAS: test | ||
# CIBW_TEST_COMMAND: pytest {package}/tests | ||
# CIBW_BUILD_VERBOSITY: 1 | ||
# MACOSX_DEPLOYMENT_TARGET: "10.14" | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist | ||
path: ./wheelhouse/*.whl | ||
# - uses: actions/upload-artifact@v3 | ||
# with: | ||
# name: dist | ||
# path: ./wheelhouse/*.whl | ||
|
||
upload_pypi: | ||
needs: [build_wheels, build_wheels_macos, build_sdist] | ||
needs: | ||
[build_wheels, build_sdist] | ||
#needs: [build_wheels, build_wheels_macos, build_sdist] | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
steps: | ||
|
@@ -156,3 +158,34 @@ jobs: | |
with: | ||
skip_existing: true | ||
password: ${{ secrets.PYPI_PASSWORD }} | ||
|
||
publish_docs: | ||
name: Publish docs | ||
needs: [build_wheels] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist | ||
- name: Install Python dependencies | ||
run: | | ||
python3 -m pip install -r requirements-extra.txt | ||
- name: Install Package | ||
run: | | ||
python3 -m pip install --no-index --find-links=dist/ --only-binary=memray memray | ||
- name: Build docs | ||
run: | | ||
make docs | ||
- name: Publish docs to GitHub Pages | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: docs/_build/html | ||
single-commit: true |