-
Notifications
You must be signed in to change notification settings - Fork 397
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Automatically publish docs for new releases
On each new release, automatically build our docs and publish them to GitHub Pages. The docs are also built by our linting workflow, but we don't attempt to reuse that build here, because the linting build runs `towncrier` with a phony version number in order to exercise the news fragments in the news/ directory, and we don't want that fake version in the changelog we publish. Signed-off-by: Matt Wozniski <[email protected]>
- Loading branch information
Showing
1 changed file
with
43 additions
and
44 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,54 +95,52 @@ 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_sdist] | ||
#needs: [build_wheels, build_wheels_macos, build_sdist] | ||
needs: [build_wheels, build_wheels_macos, build_sdist] | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
steps: | ||
|
@@ -162,6 +160,7 @@ jobs: | |
publish_docs: | ||
name: Publish docs | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
permissions: | ||
contents: write | ||
steps: | ||
|