Skip to content
This repository has been archived by the owner on Apr 16, 2021. It is now read-only.

Move to github actions #15

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 127 additions & 0 deletions .github/workflows/multibuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: build

env:
REPO_DIR: matplotlib
# Keep this in sync with the value in .travis.yml for arm64
BUILD_COMMIT: master
MACOSX_DEPLOYMENT_TARGET: 10.9
BUILD_DIR: ${{ github.workspace }}
MB_PYTHON_OSX_VER: 10.9
TEST_DEPENDS: "oldest-supported-numpy sphinx pytest pytest-timeout pytest-xdist pytest-faulthandler pytest-rerunfailures requests[security]"
BUILD_DEPENDS: "oldest-supported-numpy"
MB_ML_VER: 2010

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
# every Sunday at midnight, builds master and uploads to
# https://anaconda.org/scipy-wheels-nightly/
- cron: '0 0 * * 0'
workflow_dispatch:
# manual trigger, uploads to https://anaconda.org/multibuild-wheels-staging
env:
BUILD_COMMIT: v0.3.13


jobs:
# TODO: add windows builds as a separate job
linux_mac:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
# python-version: [3.7, 3.8, 3.9, "pypy-3.7"]
python-version: [3.7, 3.8, 3.9]
plat: ["x86_64"]
include:
- os: ubuntu-latest
plat: "i686"
python-version: 3.7
- os: ubuntu-latest
plat: "i686"
python-version: 3.8
- os: ubuntu-latest
plat: "i686"
python-version: 3.9
env:
MB_PYTHON_VERSION: ${{ matrix.python-version }}
PLAT: ${{ matrix.plat }}

steps:
- uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Set extra env
run: |
set -xe
if [ "macos-latest" == "${{ matrix.os }}" ]; then echo "TRAVIS_OS_NAME=osx" >> $GITHUB_ENV; else echo "TRAVIS_OS_NAME=${{ matrix.os }}" >> $GITHUB_ENV; fi
# Remove the '-' from pypy-
if [[ "$MB_PYTHON_VERSION" == pypy* ]]; then echo "MB_PYTHON_VERSION=pypy3.7-7.3.3" >> $GITHUB_ENV; fi
if [ "schedule" == "${{ github.event_name }}" ] || [ "master" == "$BUILD_COMMIT" ]; then
echo "TOKEN=${{ secrets.SCIPY_WHEELS_NIGHTLY_ACCESS }}" >> $GITHUB_ENV;
echo "ANACONDA_ORG=https://anaconda.org/scipy-wheels-nightly" >> $GITHUB_ENV;
else
echo "TOKEN=${{ secrets.MULTIBUILD_WHEELS_STAGING_ACCESS }}" >> $GITHUB_ENV;
echo "ANACONDA_ORG=https://anaconda.org/multibuild-wheels-staging" >> $GITHUB_ENV;
fi
echo "TRAVIS_PYTHON_VERSION=$MV_PYTHON_VERSION" >> $GITHUB_ENV;
if [ "i686" == "${{ matrix.PLAT }}" ];
then echo "MB_ML_VER=1" >> $GITHUB_ENV;
else echo "DOCKER_TEST_IMAGE=multibuild/xenial_${PLAT}" >> $GITHUB_ENV;
fi


- name: Print some Environment variable
run: |
echo "TRAVIS_OS_NAME: ${TRAVIS_OS_NAME}"
echo "ANACONDA_ORG: ${ANACONDA_ORG}"
echo "MB_PYTHON_VERSION: ${MB_PYTHON_VERSION}"
echo "TRAVIS_PYTHON_VERSION: ${TRAVIS_PYTHON_VERSION}"
echo "MB_ML_VER: ${MB_ML_VER}"
echo "DOCKER_TEST_IMAGE: ${DOCKER_TEST_IMAGE}"
- name: Install VirtualEnv
run: |
python -m pip install --upgrade pip
pip install virtualenv
- name: Build and Install Wheels
run: |
# set -ex # for debugging
source multibuild/common_utils.sh
source multibuild/travis_steps.sh
echo "------ BEFORE INSTALL ---------"
before_install
echo "------ CLEAN CODE --------"
clean_code $REPO_DIR $BUILD_COMMIT
echo "------ BUILD --------"
build_wheel "$REPO_DIR" "$PLAT"
echo "------ REMOVE TEST IMAGES --------"
pip install delocate
python rm_test_images.py wheelhouse/*.whl
echo "------ TEST --------"
# increase number of open files allowed for tests, on OSX
# https://github.com/matplotlib/matplotlib/issues/3315
ulimit -n 4096
install_run $PLAT

- name: Upload wheels
if: env.TOKEN
run: |
set -ex
pip install git+https://github.com/Anaconda-Server/anaconda-client;
# The first -t option refers to the token, the second is the "type"
# option to the "upload" command
anaconda -t ${TOKEN} upload \
--no-progress --force -u $ANACONDA_ORG \
${BUILD_DIR}/wheelhouse/*.whl;
48 changes: 13 additions & 35 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ env:
global:
- REPO_DIR=matplotlib
# Also see DAILY_COMMIT below
# Keep this in sync with the value in .github/workflows/multibuild.yml
- BUILD_COMMIT=v3.2.1
# These variables filled in further below
- BUILD_DEPENDS=
Expand All @@ -10,8 +11,6 @@ env:
- UNICODE_WIDTH=32
- NP_BUILD_DEP=1.16
- NP_TEST_DEP=1.16
- MANYLINUX_URL=https://5cf40426d9f06eb7461d-6fe47d9331aba7cd62fc36c7196769e4.ssl.cf2.rackcdn.com
- WHEELHOUSE_UPLOADER_USERNAME=travis-worker
# Following generated with
# travis encrypt -r MacPython/matplotlib-wheels \
# WHEELHOUSE_UPLOADER_SECRET=<the api key>
Expand All @@ -28,27 +27,12 @@ services: docker

jobs:
include:
- os: linux
env:
- MB_PYTHON_VERSION=3.7
- NP_BUILD_DEP=1.16
- NP_TEST_DEP=1.16
- os: linux
env:
- MB_PYTHON_VERSION=3.7
- NP_BUILD_DEP=1.16
- NP_TEST_DEP=1.16
- PLAT=i686
- os: linux
env:
- MB_PYTHON_VERSION=3.8
- NP_BUILD_DEP=1.16
- NP_TEST_DEP=1.16
- os: linux
env:
- MB_PYTHON_VERSION=3.9
- NP_BUILD_DEP=1.16
- NP_TEST_DEP=1.16
- os: linux
arch: arm64
env:
Expand All @@ -67,22 +51,16 @@ jobs:
- PLAT=aarch64
- MB_ML_VER=2014
- DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT}
- os: osx
language: generic
env:
- MB_PYTHON_VERSION=3.7
- MB_PYTHON_OSX_VER=10.9
- NP_BUILD_DEP=1.16
- NP_TEST_DEP=1.16
- os: osx
language: generic
- os: linux
arch: arm64
env:
- MB_PYTHON_VERSION=3.8
- MB_PYTHON_OSX_VER=10.9
- NP_BUILD_DEP=1.16
- NP_TEST_DEP=1.16
- MB_PYTHON_OSX_VER=10.9
- MB_ML_VER=2010
- MB_PYTHON_VERSION=3.9
- NP_BUILD_DEP=1.19
- NP_TEST_DEP=1.19
- PLAT=aarch64
- MB_ML_VER=2014
- DOCKER_TEST_IMAGE=multibuild/xenial_{PLAT}


before_install:
# See:
Expand Down Expand Up @@ -124,9 +102,9 @@ after_success:
# used in Travis CI config, originally
# generated at anaconda.org for scipy-wheels-nightly
- if [ "$TRAVIS_EVENT_TYPE" == "cron" ]; then
source extra_functions.sh
source extra_functions.sh;
for f in wheelhouse/*.whl; do rename_wheel $f; done;
ANACONDA_ORG="scipy-wheels-nightly"
ANACONDA_ORG="scipy-wheels-nightly";
pip install git+https://github.com/Anaconda-Server/anaconda-client;
anaconda -t ${SCIPY_WHEELS_NIGHTLY_ACCESS} upload --force -u ${ANACONDA_ORG} ${TRAVIS_BUILD_DIR}/wheelhouse/*.whl;
fi
Expand All @@ -135,7 +113,7 @@ after_success:
# CI config, originally generated at anaconda.org for
# multibuild-wheels-staging
- if [ "$TRAVIS_EVENT_TYPE" == "push" ]; then
ANACONDA_ORG="multibuild-wheels-staging"
ANACONDA_ORG="multibuild-wheels-staging";
pip install git+https://github.com/Anaconda-Server/anaconda-client;
anaconda -t ${MULTIBUILD_WHEELS_STAGING_ACCESS} upload --force -u ${ANACONDA_ORG} ${TRAVIS_BUILD_DIR}/wheelhouse/*.whl;
fi
2 changes: 1 addition & 1 deletion matplotlib
Submodule matplotlib updated 2947 files