Skip to content

Commit

Permalink
ci/docs: Use default python-architecture to build docs
Browse files Browse the repository at this point in the history
Restrict python3.7 macos jobs to macos-13.
x64 builds are broken on macos-14 images[0],
but python3.7 does not provide arm64 image[1]

[0] actions/setup-python#855
[1] actions/setup-python#856

Signed-off-by: Jan Vesely <[email protected]>
  • Loading branch information
jvesely committed Apr 26, 2024
1 parent 63cefb1 commit fa66f21
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/pnl-ci-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,19 @@ concurrency:

jobs:
docs-build:
runs-on: ${{ matrix.os }}
# Python 3.7 x64 on macos-14 (arm64) images is broken [0]
# and arm64 version is not available [1].
# Restrict python 3.7 macos runs to macos-13
# [0] https://github.com/actions/setup-python/issues/855
# [1] https://github.com/actions/setup-python/issues/856
runs-on: ${{ (matrix.os == 'macos-latest' && matrix.python-version == '3.7') && 'macos-13' || matrix.os }}
strategy:
fail-fast: false
# Matrix setup is a hacky way to include 'base' build in pull requests
# The entire matrix is set up and 'base' builds are pruned based
# on event name and final configuration (ubuntu, python3.11).
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-architecture: ['x64']
os: [ubuntu-latest, macos-latest, windows-latest]
event:
- ${{ github.event_name }}
Expand Down Expand Up @@ -81,7 +85,6 @@ jobs:
# Block python3.7.17 on macos. see:
# https://github.com/actions/setup-python/issues/682
python-version: ${{ (matrix.os == 'macos-latest' && matrix.python-version == '3.7') && '3.7.16' || matrix.python-version }}
architecture: ${{ matrix.python-architecture }}

- name: Get pip cache location
shell: bash
Expand All @@ -95,8 +98,8 @@ jobs:
uses: actions/cache@v4
with:
path: ${{ steps.pip_cache.outputs.pip_cache_dir }}/wheels
key: ${{ runner.os }}-python-${{ matrix.python-version }}-${{ matrix.python-architecture }}-pip-wheels-${{ hashFiles('requirements.txt', 'doc_requirements.txt') }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-python-${{ matrix.python-version }}-${{ matrix.python-architecture }}-pip-wheels-${{ hashFiles('requirements.txt', 'doc_requirements.txt') }}
key: ${{ runner.os }}-python-${{ matrix.python-version }}-pip-wheels-${{ hashFiles('requirements.txt', 'doc_requirements.txt') }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-python-${{ matrix.python-version }}-pip-wheels-${{ hashFiles('requirements.txt', 'doc_requirements.txt') }}

# We need to install all PNL deps since docs config imports psyneulink module
- name: Install local, editable PNL package
Expand Down Expand Up @@ -126,7 +129,7 @@ jobs:
- name: Upload Documentation
uses: actions/upload-artifact@v4
with:
name: Documentation-${{matrix.pnl-version}}-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.python-architecture }}
name: Documentation-${{matrix.pnl-version}}-${{ matrix.os }}-${{ matrix.python-version }}
retention-days: 1
path: docs/build/html

Expand Down

0 comments on commit fa66f21

Please sign in to comment.