From 1acb9c6782fa457b65e62a767c17b4ae62a0fdce Mon Sep 17 00:00:00 2001 From: Jan Vesely Date: Sun, 17 Jan 2021 23:06:37 -0500 Subject: [PATCH] github-actions: Add pypy3.7, pypy3.8, pypy3.9, pypy3.10, and pypy3.11 jobs Restrict max pypy heap size to 3GB. Bump test timeout to 360 min. Signed-off-by: Jan Vesely --- .github/actions/install-pnl/action.yml | 15 ++++++--- .github/workflows/pnl-ci.yml | 43 +++++++++++++++++++++++++- 2 files changed, 53 insertions(+), 5 deletions(-) diff --git a/.github/actions/install-pnl/action.yml b/.github/actions/install-pnl/action.yml index 77be434ce5..b49f60554f 100644 --- a/.github/actions/install-pnl/action.yml +++ b/.github/actions/install-pnl/action.yml @@ -25,7 +25,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 @@ -44,14 +44,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 @@ -67,6 +68,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 @@ -103,6 +107,9 @@ runs: shell: bash run: | pip install ${{ steps.dist.outputs.wheel }}[${{ 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 diff --git a/.github/workflows/pnl-ci.yml b/.github/workflows/pnl-ci.yml index cdb91a970b..f65409db3c 100644 --- a/.github/workflows/pnl-ci.yml +++ b/.github/workflows/pnl-ci.yml @@ -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) @@ -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 @@ -137,6 +176,8 @@ jobs: id: install with: features: 'dev' + env: + LLVM_SUFFIX: ${{ matrix.llvm-suffix }} - name: Lint with flake8 shell: bash @@ -162,7 +203,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