Skip to content

Commit

Permalink
github-actions: Add pypy3.7, pypy3.8, pypy3.9, pypy3.10, and pypy3.11…
Browse files Browse the repository at this point in the history
… jobs

Restrict max pypy heap size to 3GB.
Bump test timeout to 360 min.

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
  • Loading branch information
jvesely committed Oct 29, 2024
1 parent d782e4b commit 6dfa893
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 5 deletions.
15 changes: 11 additions & 4 deletions .github/actions/install-pnl/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ runs:
run: |
case "$RUNNER_OS" in
macOS*) brew install graphviz ;;
Linux*) sudo apt-get update && sudo apt-get install -y --no-install-recommends graphviz ;;
Linux*) sudo apt-get update && sudo apt-get install -y --no-install-recommends graphviz build-essential pkg-config gfortran llvm${LLVM_SUFFIX}-dev libfreetype6-dev libjpeg-dev libopenblas-dev zlib1g-dev ;;
Windows*) choco install --no-progress -y graphviz --version=2.38.0.20190211 ;;
*) echo "Unsupported OS"; exit 1 ;;
esac
Expand All @@ -37,14 +37,15 @@ runs:
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV
echo "$PYTHON_LOC" >> $GITHUB_PATH
- name: Update pip and wheel
- name: Update pip, wheel, and cython
shell: bash
run: python -m pip install --upgrade pip wheel
run: python -m pip install --upgrade pip wheel 'cython<3'

- name: Drop pytorch on x86
shell: bash
run: |
echo > env_constraints.txt
# grpcio fails to build with cython >= 3
echo 'cython<3' > env_constraints.txt
if [ $(python -c 'import struct; print(struct.calcsize("P") * 8)') == 32 ]; then
sed -i /torch/d requirements.txt
sed -i /modeci_mdf/d requirements.txt
Expand All @@ -60,6 +61,9 @@ runs:
echo "contourpy<1.1.0" >> env_constraints.txt
# pillow >= 10.0.0 doesn't provide win32 wheel
echo "pillow < 10.0.0" >> env_constraints.txt
# pywinpty needs extra libraries if built with cython available
pip uninstall cython -y
fi
- name: Install updated package
Expand Down Expand Up @@ -87,6 +91,9 @@ runs:
shell: bash
run: |
pip install -e .[${{ inputs.features }}] -c env_constraints.txt -c broken_trans_deps.txt
env:
LLVM_CONFIG: llvm-config${{ env.LLVM_SUFFIX }}
GRPC_PYTHON_BUILD_WITH_CYTHON: 1

- name: "Cleanup old wheels"
shell: bash
Expand Down
43 changes: 42 additions & 1 deletion .github/workflows/pnl-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
- 'v**'
pull_request:

env:
# github linux/windows runners have 7GB RAM
PYPY_GC_MAX: 3GB

# run only the latest instance of this workflow job for the current branch/PR
# cancel older runs
# fall back to run id if not available (run id is unique -> no cancellations)
Expand Down Expand Up @@ -82,6 +86,41 @@ jobs:
- python-version: '3.8'
os: macos

# add pypy-3.7
- python-version: 'pypy-3.7'
python-architecture: 'x64'
os: ubuntu
extra-args: '--forked'
llvm-suffix: '-11'

# add pypy-3.8
- python-version: 'pypy-3.8'
python-architecture: 'x64'
os: ubuntu
extra-args: '--forked'
llvm-suffix: '-15'

# add pypy-3.9
- python-version: 'pypy-3.9'
python-architecture: 'x64'
os: ubuntu
extra-args: '--forked'
llvm-suffix: '-15'

# add pypy-3.10
- python-version: 'pypy-3.10'
python-architecture: 'x64'
os: ubuntu
extra-args: '--forked'
llvm-suffix: '-15'

# add pypy-3.11
- python-version: 'pypy-3.11'
python-architecture: 'x64'
os: ubuntu
extra-args: '--forked'
llvm-suffix: '-15'

exclude:
# 3.7 is broken on macos-11,
# https://github.com/actions/virtual-environments/issues/4230
Expand Down Expand Up @@ -136,6 +175,8 @@ jobs:
uses: ./.github/actions/install-pnl
with:
features: 'dev'
env:
LLVM_SUFFIX: ${{ matrix.llvm-suffix }}

- name: Lint with flake8
shell: bash
Expand All @@ -161,7 +202,7 @@ jobs:
esac
- name: Test with pytest
timeout-minutes: 180
timeout-minutes: 360
run: pytest --junit-xml=tests_out.xml --verbosity=0 -n logical ${{ matrix.extra-args }}

- name: Upload test results
Expand Down

0 comments on commit 6dfa893

Please sign in to comment.