From 827d885915e06d44d239979c2cd5898ef6a92209 Mon Sep 17 00:00:00 2001 From: Jan Vesely Date: Tue, 24 Sep 2019 13:06:33 -0400 Subject: [PATCH 1/7] Add github actions CI --- .github/workflows/pnl-ci.yml | 49 ++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/pnl-ci.yml diff --git a/.github/workflows/pnl-ci.yml b/.github/workflows/pnl-ci.yml new file mode 100644 index 00000000000..e3c376111ff --- /dev/null +++ b/.github/workflows/pnl-ci.yml @@ -0,0 +1,49 @@ +name: PsyNeuLink CI + +on: [push, pull_request] + +jobs: + build: + + runs-on: ${{ matrix.os }} + strategy: + max-parallel: 6 + matrix: + python-version: [3.6, 3.7] + os: [ubuntu-latest, macos-latest, windows-latest] + + steps: + - uses: actions/checkout@v1 + with: + fetch-depth: 10 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + shell: bash + run: | + python -m pip install --upgrade pip + if [ "x$RUNNER_OS" == "xmacOS" ] ; then + HOMEBREW_NO_AUTO_UPDATE=1 brew install graphviz + fi + if [ "x$RUNNER_OS" == "xLinux" ] ; then + sudo apt install -y graphviz + fi + if [ "x$RUNNER_OS" == "xWindows" ] ; then + choco install --no-progress -y graphviz + # Install pytorch explicitly + pip install torch -f https://download.pytorch.org/whl/cpu/torch_stable.html + fi + pip install -e .[dev] + - name: Lint with flake8 + shell: bash + run: | + pip install flake8 + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --exit-zero --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + - name: Test with pytest + shell: bash + run: pytest From 0c6056e80e22743ddd2aad52a444fc9deacfb4e4 Mon Sep 17 00:00:00 2001 From: Jan Vesely Date: Sun, 29 Sep 2019 12:11:02 -0400 Subject: [PATCH 2/7] github-actions: Install leabra Signed-off-by: Jan Vesely --- .github/workflows/pnl-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pnl-ci.yml b/.github/workflows/pnl-ci.yml index e3c376111ff..4b43705ad94 100644 --- a/.github/workflows/pnl-ci.yml +++ b/.github/workflows/pnl-ci.yml @@ -36,6 +36,7 @@ jobs: pip install torch -f https://download.pytorch.org/whl/cpu/torch_stable.html fi pip install -e .[dev] + pip install --user git+https://github.com/benureau/leabra.git@master - name: Lint with flake8 shell: bash run: | From f21b0d83ae2f313fa138d20b8bf2c72f58ab4ee0 Mon Sep 17 00:00:00 2001 From: Jan Vesely Date: Sun, 29 Sep 2019 11:12:32 -0400 Subject: [PATCH 3/7] github-actions: Split OS dependencies into individual steps Signed-off-by: Jan Vesely --- .github/workflows/pnl-ci.yml | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pnl-ci.yml b/.github/workflows/pnl-ci.yml index 4b43705ad94..6430400466a 100644 --- a/.github/workflows/pnl-ci.yml +++ b/.github/workflows/pnl-ci.yml @@ -4,7 +4,6 @@ on: [push, pull_request] jobs: build: - runs-on: ${{ matrix.os }} strategy: max-parallel: 6 @@ -20,21 +19,22 @@ jobs: uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies + - name: MacOS dependencies + run: HOMEBREW_NO_AUTO_UPDATE=1 brew install graphviz + if: matrix.os == 'macos-latest' + - name: Linux dependencies + run: sudo apt-get install -y graphviz + if: matrix.os == 'ubuntu-latest' + - name: Windows dependencies + run: | + choco install --no-progress -y graphviz + python -m pip install --upgrade pip + pip install torch -f https://download.pytorch.org/whl/cpu/torch_stable.html + if: matrix.os == 'windows-latest' + - name: Shared dependencies shell: bash run: | python -m pip install --upgrade pip - if [ "x$RUNNER_OS" == "xmacOS" ] ; then - HOMEBREW_NO_AUTO_UPDATE=1 brew install graphviz - fi - if [ "x$RUNNER_OS" == "xLinux" ] ; then - sudo apt install -y graphviz - fi - if [ "x$RUNNER_OS" == "xWindows" ] ; then - choco install --no-progress -y graphviz - # Install pytorch explicitly - pip install torch -f https://download.pytorch.org/whl/cpu/torch_stable.html - fi pip install -e .[dev] pip install --user git+https://github.com/benureau/leabra.git@master - name: Lint with flake8 @@ -46,5 +46,4 @@ jobs: # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Test with pytest - shell: bash run: pytest From f4154d0b9a243b0d99eaa1d77f285e107418e268 Mon Sep 17 00:00:00 2001 From: Jan Vesely Date: Thu, 14 Nov 2019 08:53:20 -0500 Subject: [PATCH 4/7] github-actions: Add python 3.8 linux Signed-off-by: Jan Vesely --- .github/workflows/pnl-ci.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pnl-ci.yml b/.github/workflows/pnl-ci.yml index 6430400466a..ce4712561df 100644 --- a/.github/workflows/pnl-ci.yml +++ b/.github/workflows/pnl-ci.yml @@ -6,10 +6,15 @@ jobs: build: runs-on: ${{ matrix.os }} strategy: - max-parallel: 6 + max-parallel: 7 matrix: - python-version: [3.6, 3.7] + python-version: [3.6, 3.7, 3.8] os: [ubuntu-latest, macos-latest, windows-latest] + exclude: + - os: windows-latest + python-version: 3.8 + - os: macos-latest + python-version: 3.8 steps: - uses: actions/checkout@v1 @@ -31,6 +36,13 @@ jobs: python -m pip install --upgrade pip pip install torch -f https://download.pytorch.org/whl/cpu/torch_stable.html if: matrix.os == 'windows-latest' + - name: Python3.8 dependencies setup + run: | + sed -i.tmp "/torch/d" requirements.txt + pip install cython llvmlite==0.26 + if: matrix.python-version == '3.8' + env: + LLVM_CONFIG: llvm-config-6.0 - name: Shared dependencies shell: bash run: | From b99454370b09a9a69723e314468071671994158a Mon Sep 17 00:00:00 2001 From: Jan Vesely Date: Fri, 15 Nov 2019 14:50:42 -0500 Subject: [PATCH 5/7] appveyor: Drop win64 builds This is now handled in github-actions Signed-off-by: Jan Vesely --- .appveyor.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 31698bace26..b11909c18e1 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -20,10 +20,6 @@ environment: EXTRA_ARGS: -m llvm - PYTHON: Python37 EXTRA_ARGS: -m llvm - - PYTHON: Python36 - ARCH: -x64 - - PYTHON: Python37 - ARCH: -x64 install: - if not exist %GRAPHVIZ_INSTALLER% appveyor-retry curl https://graphviz.gitlab.io/_pages/Download/windows/%GRAPHVIZ_INSTALLER% -o %GRAPHVIZ_INSTALLER% From c0d1b6a8f94d1fa1c98d0772f461a740eaf9f98c Mon Sep 17 00:00:00 2001 From: Jan Vesely Date: Fri, 15 Nov 2019 15:07:09 -0500 Subject: [PATCH 6/7] appveyor: Run on ci-prefixed branches Signed-off-by: Jan Vesely --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index b11909c18e1..55eb4494e2f 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -8,7 +8,7 @@ branches: - appveyor - /devel.*/ - /.*-avy/ - - /.*-ci/ + - /ci-.*/ environment: PYTHONWARNINGS: ignore::DeprecationWarning From ef566802924091ecfa56559ed8701cbddf697bc9 Mon Sep 17 00:00:00 2001 From: Jan Vesely Date: Fri, 15 Nov 2019 15:08:47 -0500 Subject: [PATCH 7/7] travis: Run on ci-prefixed branches Signed-off-by: Jan Vesely --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index a40d829ce1e..e3e192d0bd0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ branches: - devel - /devel-.*/ - /travis.*/ + - /ci-.*/ language: shell