start with github actions
authorrobin
Thu, 10 Dec 2020 11:46:39 +0000
changeset 4623 ebee47f9a968
parent 4622 0d3835d23cdc
child 4624 94cf78a59933
start with github actions
.github/workflows/build.sh
.github/workflows/wheels.yml
CHANGES.md
docs/userguide/ch5_paragraphs.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.github/workflows/build.sh	Thu Dec 10 11:46:39 2020 +0000
@@ -0,0 +1,60 @@
+#!/bin/bash
+echo "######################################################"
+env
+echo "######################################################"
+ls -a1
+echo "######################################################"
+set -e
+set -x
+if [ ! -d "$REPO_DIR" ]; then
+	git clone https://github.com/"$GIT_REPO" "$REPO_DIR"
+fi
+if [ ! -d multibuild ]; then
+	git clone https://github.com/matthew-brett/multibuild multibuild
+	(
+	cd multibuild
+	git checkout "$MULTIBUILD_REV"
+	)
+fi
+if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
+	if [[ "$MB_PYTHON_VERSION" == "pypy3.6-7.3" ]]; then
+		# for https://foss.heptapod.net/pypy/pypy/-/issues/3229
+		# TODO remove when that is fixed
+		brew install tcl-tk
+	fi
+	# these cause a conflict with built webp and libtiff
+	#brew remove --ignore-dependencies webp zstd xz libtiff
+fi
+
+if [[ "$MB_PYTHON_VERSION" == "pypy3.6-7.3" ]]; then
+	if [[ "$TRAVIS_OS_NAME" != "macos-latest" ]]; then
+		MB_ML_VER="2010"
+		DOCKER_TEST_IMAGE="multibuild/xenial_$PLAT"
+	else
+		MB_PYTHON_OSX_VER="10.9"
+	fi
+fi
+
+echo "::group::Install a virtualenv"
+	source multibuild/common_utils.sh
+	source multibuild/travis_steps.sh
+	# can't use default 7.3.1 on macOS due to https://foss.heptapod.net/pypy/pypy/-/issues/3229
+	LATEST_PP_7p3=7.3.2
+	pip install virtualenv
+	before_install
+echo "::endgroup::"
+
+echo "::group::Build wheel"
+	clean_code $REPO_DIR $BUILD_COMMIT
+	build_wheel $REPO_DIR $PLAT
+	ls -l "${GITHUB_WORKSPACE}/${WHEEL_SDIR}/"
+echo "::endgroup::"
+
+echo "::group::Test wheel"
+	install_run $PLAT
+echo "::endgroup::"
+
+echo "::group::upload"
+	python -mpip install --no-cache https://hg.reportlab.com/hg-public/rl-ci-tools/archive/tip.tar.gz -U
+	python -mrl_ci_tools upload-caches --subdir="$RLCACHE" --verbosity=1 ./wheelhouse/*.whl
+echo "::endgroup::"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.github/workflows/wheels.yml	Thu Dec 10 11:46:39 2020 +0000
@@ -0,0 +1,124 @@
+name: Wheels
+
+on: [push]
+
+env:
+  GIT_REPO: "MrBitBucket/reportlab-mirror"
+  REPO_DIR: reportlab
+  MACOSX_DEPLOYMENT_TARGET: "10.10"
+  WHEEL_SDIR: wheelhouse
+  MULTIBUILD_REV: "8882150df6529658700b66bec124dfb77eefca26"
+  MULTIBUILD_DIR: multibuild
+  CONFIG_PATH: .travis-config.sh
+  BUILD_DEPENDS: ""
+  TEST_DEPENDS: "pillow pyphen"
+  RLCACHE: "manylinux/reportlab"
+
+jobs:
+  clear-cache:
+    name: clear-cache
+    runs-on: ubuntu-latest
+    steps:
+      - name: setup python for clear-cache
+        uses: actions/setup-python@v2
+        with:
+          python-version: 3.9
+      - name: clear
+        env:
+          CITOOLS_USER: "${{secrets.CITOOLS_USER}}"
+          CITOOLS_PASSWORD: "${{secrets.CITOOLS_PASSWORD}}"
+        run: |
+            python -mpip install --no-cache https://hg.reportlab.com/hg-public/rl-ci-tools/archive/tip.tar.gz -U
+            python -mrl_ci_tools clear-cache "$RLCACHE"
+            echo "cleared remote cache for $RLCACHE"
+  build:
+    needs: [clear-cache]
+    name: ${{matrix.python}} ${{matrix.os-name}} ${{matrix.platform}} ${{matrix.mb-ml-ver}} ${{matrix.unicode-width}}
+    runs-on: ${{matrix.os}}
+    strategy:
+      fail-fast: true
+      matrix:
+        os: ["ubuntu-16.04","macos-latest"]
+        python: ["2.7", "3.6", "3.7", "3.8", "3.9" ]
+        platform: ["x86_64", "i686"]
+        unicode-width: [32]
+        mb-ml-ver: ["1", "2010"]
+        exclude:
+          - os: "macos-latest"
+            platform: "i686"
+          - os: "macos-latest"
+            mb-ml-ver: "1"
+        include:
+          - os: "macos-latest"
+            os-name: "osx"
+          - os: "ubuntu-16.04"
+            os-name: "xenial"
+          - os: "ubuntu-16.04"
+            os-name: "xenial"
+            python: "2.7"
+            unicode-width: 16
+            platform: "i686"
+            mb-ml-ver: "1"
+          - os: "ubuntu-16.04"
+            os-name: "xenial"
+            python: "2.7"
+            unicode-width: 16
+            platform: "i686"
+            mb-ml-ver: "2010"
+          - os: "ubuntu-16.04"
+            os-name: "xenial"
+            python: "2.7"
+            unicode-width: 16
+            platform: "x86_64"
+            mb-ml-ver: "1"
+          - os: "ubuntu-16.04"
+            os-name: "xenial"
+            python: "2.7"
+            unicode-width: 16
+            platform: "x86_64"
+            mb-ml-ver: "2010"
+    env:
+      BUILD_COMMIT: HEAD
+      PLAT: ${{ matrix.platform }}
+      MB_PYTHON_VERSION: ${{ matrix.python }}
+      TRAVIS_OS_NAME: ${{ matrix.os-name }}
+      UNICODE_WIDTH: ${{ matrix.unicode-width }}
+      MB_ML_VER: ${{ matrix.mb-ml-ver }}
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: true
+      - uses: actions/setup-python@v2
+        with:
+          python-version: 3.9
+      - name: Build Wheel
+        env:
+          CITOOLS_USER: "${{secrets.CITOOLS_USER}}"
+          CITOOLS_PASSWORD: "${{secrets.CITOOLS_PASSWORD}}"
+        run: |
+          .github/workflows/build.sh
+      # Uncomment to get SSH access for testing
+      # - name: Setup tmate session
+      #   if: failure()
+      #   uses: mxschmitt/action-tmate@v3
+  email:
+    name: email
+    needs: [build]
+    runs-on: ubuntu-latest
+    steps:
+      - name: setup python for upload
+        uses: actions/setup-python@v2
+        with:
+          python-version: 3.9
+      - name: email confirmation
+        env:
+          CITOOLS_USER: "${{secrets.CITOOLS_USER}}"
+          CITOOLS_PASSWORD: "${{secrets.CITOOLS_PASSWORD}}"
+        run: |
+            python -mpip install --no-cache https://hg.reportlab.com/hg-public/rl-ci-tools/archive/tip.tar.gz -U
+            BODY="$(python -mrl_ci_tools cache-info --subdir="$RLCACHE" '*.whl')"
+            NUPLOADS=$(expr $(echo "$BODY" | wc -l) - 1)
+            SUBJECT="$NUPLOADS $(basename $RLCACHE) wheels uploaded to $RLCACHE by github"
+            python -mrl_ci_tools email --subject="$SUBJECT" --body="$BODY"
+            echo "$SUBJECT"
+            echo "$BODY"
--- a/CHANGES.md	Tue Dec 01 16:25:50 2020 +0000
+++ b/CHANGES.md	Thu Dec 10 11:46:39 2020 +0000
@@ -11,6 +11,11 @@
 The contributors lists are in no order and apologies to those accidentally not
 mentioned. If we missed you, please let us know!
 
+CHANGES  3.5.56	 10/12/2020
+---------------------------
+	* added .github action wheel.yml
+	* micro change to userguide doc
+
 RELEASE 3.5.56	 01/12/2020
 ---------------------------
 	* micro changes for Big Sur in C extensions
--- a/docs/userguide/ch5_paragraphs.py	Tue Dec 01 16:25:50 2020 +0000
+++ b/docs/userguide/ch5_paragraphs.py	Thu Dec 10 11:46:39 2020 +0000
@@ -345,7 +345,7 @@
 This &lt;img/&gt; <img src="../images/testimg.gif" width="10"/> has width <b>10</b>.<br/><br/>
 </para>""","Inline images")
 disc("""The $src$ attribute can refer to a remote location eg $src="https://www.reportlab.com/images/logo.gif"$. By default we set $rl_config.trustedShemes$ to $['https','http', 'file', 'data', 'ftp']$ and
-$rl_config.trustedHosts=None$ the latter meaning no-restriction. You can modify these variables using one of the override files eg $reportlab_settings.py$ or $~/.reportlab_settings$. Or as comma seprated strings in the 
+$rl_config.trustedHosts=None$ the latter meaning no-restriction. You can modify these variables using one of the override files eg $reportlab_settings.py$ or $~/.reportlab_settings$. Or as comma separated strings in the 
 environment variables $RL_trustedSchemes$ &amp; $RL_trustedHosts$. Note that the $trustedHosts$ values may contain <b>glob</b> wild cars so <i>*.reportlab.com</i> will match the obvious domains.
 <br/><span color="red"><b>*NB*</b></span> use of <i>trustedHosts</i> and or <i>trustedSchemes</i> may not control behaviour &amp; actions when $URI$ patterns
 are detected by the viewer application.""")