Skip to content

Commit

Permalink
ci/ga: Simplify documentaitons ci jobs (#2957)
Browse files Browse the repository at this point in the history
Print the used OS image in the job name.
Generate the base vs. head job matrix dimension dynamically.
  • Loading branch information
jvesely authored Apr 27, 2024
2 parents 7b7f3ef + 3dfe792 commit eecc551
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/pnl-ci-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,14 @@ concurrency:

jobs:
docs-build:
# 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 }}
runs-on: ${{ 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']
os: [ubuntu-latest, macos-latest, windows-latest]
event:
- ${{ github.event_name }}
pnl-version: ['head', 'base']
pnl-version: ${{ (github.event_name == 'push') && fromJSON('["head"]') || fromJSON('["head", "base"]') }}
exclude:
- event: 'push'
pnl-version: 'base'
- os: macos-latest
pnl-version: 'base'
- os: windows-latest
Expand All @@ -50,6 +38,19 @@ jobs:
- python-version: '3.10'
pnl-version: 'base'

# 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
- python-version: '3.7'
os: macos-latest

include:
- python-version: '3.7'
os: macos-13
pnl-version: 'head'

outputs:
on_master: ${{ steps.on_master.outputs.on-branch }}

Expand Down

0 comments on commit eecc551

Please sign in to comment.