From 609be3a1257714aacc1399d12e0b4e733327f3ec Mon Sep 17 00:00:00 2001 From: Marcel Stimberg Date: Thu, 15 Jun 2023 11:42:30 +0200 Subject: [PATCH 1/7] Install GSL with vcpkg and don't use conda --- .github/workflows/test_latest.yml | 41 ++++++++++++++++--------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test_latest.yml b/.github/workflows/test_latest.yml index cccbdbace..37fd69b81 100644 --- a/.github/workflows/test_latest.yml +++ b/.github/workflows/test_latest.yml @@ -22,11 +22,13 @@ jobs: testing: needs: [get_python_versions] name: "Python ${{ matrix.python-version }} on ${{ matrix.os }} (standalone: ${{ matrix.standalone }}, 32bit: ${{ matrix.float_dtype_32 }})" - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.os.image }} strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macOS-latest] + os: [{image: ubuntu-latest, triplet: x64-linux }, + {image: windows-latest, triplet: x64-windows }, + {image: macOS-latest, triplet: x64-osx }] standalone: [false, true] float_dtype_32: [false, true] python-version: ["${{ needs.get_python_versions.outputs.max-python }}"] @@ -39,24 +41,24 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - - - name: Setup Conda and Python - uses: conda-incubator/setup-miniconda@v2 + - name: Install GSL + uses: johnwason/vcpkg-action@v5 + id: vcpkg + with: + pkgs: gsl + triplet: ${{ matrix.os.triplet }} + cache-key: gsl-${{ matrix.os.triplet }} + revision: master + token: ${{ github.token }} + - name: Install Python + uses: actions/setup-python@v4 with: - auto-update-conda: true - auto-activate-base: false - channels: conda-forge,defaults - channel-priority: true - activate-environment: 'test_env' + cache: 'pip' python-version: ${{ matrix.python-version }} - - - name: Install Brian2 and dependencies - run: | - conda install -n test_env --quiet --yes -c conda-forge gsl pip - conda activate test_env - python -m pip install --pre pytest cython sympy pyparsing numpy jinja2 scipy sphinx - python -m pip install . - + - name: Install dependencies + run: python -m pip install --pre pytest cython sympy pyparsing numpy jinja2 scipy sphinx + - name: Install Brian2 + run: python -m pip install . - name: Run Tests run: | cd $GITHUB_WORKSPACE/.. # move out of the workspace to avoid direct import @@ -65,5 +67,4 @@ jobs: DEPRECATION_ERROR: true AGENT_OS: ${{runner.os}} STANDALONE: ${{ matrix.standalone }} - FLOAT_DTYPE_32: ${{ matrix.float_dtype_32 }} - + FLOAT_DTYPE_32: ${{ matrix.float_dtype_32 }} \ No newline at end of file From e0fcd51a539bb08c3c519f8792e275a09a882b1b Mon Sep 17 00:00:00 2001 From: Marcel Stimberg Date: Thu, 15 Jun 2023 15:25:58 +0200 Subject: [PATCH 2/7] Test with Python 3.12 --- .github/workflows/test_latest.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test_latest.yml b/.github/workflows/test_latest.yml index 37fd69b81..b08cb66e4 100644 --- a/.github/workflows/test_latest.yml +++ b/.github/workflows/test_latest.yml @@ -15,20 +15,22 @@ jobs: steps: - name: "calculate versions according to NEP29" id: nep29 - uses: mstimberg/github-calc-nep29@v0.5 + uses: mstimberg/github-calc-nep29@v0.6 with: + include-release-candidates: true + include-beta-releases: true token: ${{ secrets.GITHUB_TOKEN }} testing: needs: [get_python_versions] - name: "Python ${{ matrix.python-version }} on ${{ matrix.os }} (standalone: ${{ matrix.standalone }}, 32bit: ${{ matrix.float_dtype_32 }})" + name: "Python ${{ matrix.python-version }} on ${{ matrix.os.image }} (standalone: ${{ matrix.standalone }}, 32bit: ${{ matrix.float_dtype_32 }})" runs-on: ${{ matrix.os.image }} strategy: fail-fast: false matrix: - os: [{image: ubuntu-latest, triplet: x64-linux }, - {image: windows-latest, triplet: x64-windows }, - {image: macOS-latest, triplet: x64-osx }] + os: [{image: ubuntu-latest, triplet: x64-linux}, + {image: windows-latest, triplet: x64-windows}, + {image: macOS-latest, triplet: x64-osx}] standalone: [false, true] float_dtype_32: [false, true] python-version: ["${{ needs.get_python_versions.outputs.max-python }}"] @@ -51,18 +53,20 @@ jobs: revision: master token: ${{ github.token }} - name: Install Python + id: python uses: actions/setup-python@v4 with: cache: 'pip' python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Install dependencies - run: python -m pip install --pre pytest cython sympy pyparsing numpy jinja2 scipy sphinx + run: ${{ steps.python.outputs.python-path }} -m pip install --pre pytest cython sympy pyparsing numpy jinja2 scipy sphinx - name: Install Brian2 - run: python -m pip install . + run: ${{ steps.python.outputs.python-path }} -m pip install . - name: Run Tests run: | cd $GITHUB_WORKSPACE/.. # move out of the workspace to avoid direct import - python -Wd $GITHUB_WORKSPACE/dev/continuous-integration/run_test_suite.py + ${{ steps.python.outputs.python-path }} -Wd $GITHUB_WORKSPACE/dev/continuous-integration/run_test_suite.py env: DEPRECATION_ERROR: true AGENT_OS: ${{runner.os}} From af1a0cf16cee136c15a4246b9123dce494098cc0 Mon Sep 17 00:00:00 2001 From: Marcel Stimberg Date: Thu, 15 Jun 2023 15:39:23 +0200 Subject: [PATCH 3/7] Make sure pip is up-to-date --- .github/workflows/test_latest.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_latest.yml b/.github/workflows/test_latest.yml index b08cb66e4..80794cf73 100644 --- a/.github/workflows/test_latest.yml +++ b/.github/workflows/test_latest.yml @@ -60,7 +60,9 @@ jobs: python-version: ${{ matrix.python-version }} allow-prereleases: true - name: Install dependencies - run: ${{ steps.python.outputs.python-path }} -m pip install --pre pytest cython sympy pyparsing numpy jinja2 scipy sphinx + run: | + ${{ steps.python.outputs.python-path }} -m pip install --upgrade pip + ${{ steps.python.outputs.python-path }} -m pip install --pre pytest cython sympy pyparsing numpy jinja2 scipy sphinx - name: Install Brian2 run: ${{ steps.python.outputs.python-path }} -m pip install . - name: Run Tests From 09fabcc618b3681ba7ebd5c5f46579b19eae1dcc Mon Sep 17 00:00:00 2001 From: Marcel Stimberg Date: Thu, 15 Jun 2023 15:40:27 +0200 Subject: [PATCH 4/7] Remove workaround that entails using Bash on Windows --- .github/workflows/test_latest.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/test_latest.yml b/.github/workflows/test_latest.yml index 80794cf73..d45e6cc45 100644 --- a/.github/workflows/test_latest.yml +++ b/.github/workflows/test_latest.yml @@ -35,9 +35,6 @@ jobs: float_dtype_32: [false, true] python-version: ["${{ needs.get_python_versions.outputs.max-python }}"] - defaults: - run: - shell: bash -l {0} steps: - name: Checkout Repository uses: actions/checkout@v3 From 17bda4d79da9fce82951effa913e4612c86ef8b1 Mon Sep 17 00:00:00 2001 From: Marcel Stimberg Date: Mon, 19 Jun 2023 23:16:27 +0200 Subject: [PATCH 5/7] Update test_latest.yml to use latest setuptools --- .github/workflows/test_latest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_latest.yml b/.github/workflows/test_latest.yml index d45e6cc45..6314186aa 100644 --- a/.github/workflows/test_latest.yml +++ b/.github/workflows/test_latest.yml @@ -58,7 +58,7 @@ jobs: allow-prereleases: true - name: Install dependencies run: | - ${{ steps.python.outputs.python-path }} -m pip install --upgrade pip + ${{ steps.python.outputs.python-path }} -m pip install --upgrade pip setuptools ${{ steps.python.outputs.python-path }} -m pip install --pre pytest cython sympy pyparsing numpy jinja2 scipy sphinx - name: Install Brian2 run: ${{ steps.python.outputs.python-path }} -m pip install . @@ -70,4 +70,4 @@ jobs: DEPRECATION_ERROR: true AGENT_OS: ${{runner.os}} STANDALONE: ${{ matrix.standalone }} - FLOAT_DTYPE_32: ${{ matrix.float_dtype_32 }} \ No newline at end of file + FLOAT_DTYPE_32: ${{ matrix.float_dtype_32 }} From 0f7530a0c5ea85d2d3a69b4631774abb72dca8e1 Mon Sep 17 00:00:00 2001 From: Marcel Stimberg Date: Tue, 20 Jun 2023 14:50:25 +0200 Subject: [PATCH 6/7] Update test_latest.yml to install numpy/scipy from wheels This avoids issues with Python 3.12s deprecation of build tools used by numpy and scipy --- .github/workflows/test_latest.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_latest.yml b/.github/workflows/test_latest.yml index 6314186aa..52b510b2c 100644 --- a/.github/workflows/test_latest.yml +++ b/.github/workflows/test_latest.yml @@ -59,7 +59,8 @@ jobs: - name: Install dependencies run: | ${{ steps.python.outputs.python-path }} -m pip install --upgrade pip setuptools - ${{ steps.python.outputs.python-path }} -m pip install --pre pytest cython sympy pyparsing numpy jinja2 scipy sphinx + ${{ steps.python.outputs.python-path }} -m pip install --pre -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy scipy + ${{ steps.python.outputs.python-path }} -m pip install --pre pytest cython sympy pyparsing jinja2 sphinx - name: Install Brian2 run: ${{ steps.python.outputs.python-path }} -m pip install . - name: Run Tests From ff93c6d1979c43b5db80d293f7aec4f43320ed98 Mon Sep 17 00:00:00 2001 From: Marcel Stimberg Date: Wed, 2 Aug 2023 15:02:56 +0200 Subject: [PATCH 7/7] Use latest numpy for Brian 2 install as well --- .github/workflows/test_latest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_latest.yml b/.github/workflows/test_latest.yml index 52b510b2c..7b757c23a 100644 --- a/.github/workflows/test_latest.yml +++ b/.github/workflows/test_latest.yml @@ -62,7 +62,7 @@ jobs: ${{ steps.python.outputs.python-path }} -m pip install --pre -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy scipy ${{ steps.python.outputs.python-path }} -m pip install --pre pytest cython sympy pyparsing jinja2 sphinx - name: Install Brian2 - run: ${{ steps.python.outputs.python-path }} -m pip install . + run: ${{ steps.python.outputs.python-path }} -m pip install --pre -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple --extra-index-url https://pypi.org/simple . - name: Run Tests run: | cd $GITHUB_WORKSPACE/.. # move out of the workspace to avoid direct import