Test against latest dependencies #172
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test against latest dependencies | |
on: | |
schedule: | |
- cron: '25 5 * * SUN' | |
workflow_dispatch: | |
jobs: | |
get_python_versions: | |
name: "Determine Python versions" | |
runs-on: ubuntu-latest | |
outputs: | |
min-python: ${{ steps.nep29.outputs.min-python }} | |
max-python: ${{ steps.nep29.outputs.max-python }} | |
steps: | |
- name: "calculate versions according to NEP29" | |
id: nep29 | |
uses: mstimberg/[email protected] | |
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.image }} (standalone: ${{ matrix.standalone }}, 32bit: ${{ matrix.float_dtype_32 }})" | |
runs-on: ${{ matrix.os.image }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [{image: windows-latest, triplet: x64-windows},] | |
standalone: [false, true] | |
float_dtype_32: [false] | |
python-version: ["${{ needs.get_python_versions.outputs.max-python }}"] | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install GSL | |
uses: johnwason/vcpkg-action@v6 | |
id: vcpkg | |
with: | |
pkgs: gsl | |
triplet: ${{ matrix.os.triplet }} | |
cache-key: gsl-${{ matrix.os.triplet }} | |
revision: master | |
token: ${{ github.token }} | |
- name: List vcpkg package content | |
run: ls ${{ github.workspace }}\vcpkg\installed\${{ matrix.os.triplet }}\include\gsl | |
- name: Set GSL preference for vcpkg | |
shell: bash | |
run: | | |
echo "GSL.directory=\"${VCPKG_ROOT}\\${{ matrix.os.triplet }}\\include\\gsl\"" > ~/.brian/user_preferences | |
cat ~/.brian/user_preferences | |
- name: Install Python | |
id: python | |
uses: actions/setup-python@v5 | |
with: | |
cache: 'pip' | |
python-version: ${{ matrix.python-version }} | |
allow-prereleases: true | |
- name: Install dependencies | |
run: | | |
${{ steps.python.outputs.python-path }} -m pip install --upgrade pip setuptools | |
${{ 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 mpmath # install stable version | |
${{ steps.python.outputs.python-path }} -m pip install --pre pytest cython sympy pyparsing jinja2 sphinx | |
- name: Install Brian2 | |
run: | | |
cp numpy2.pyproject.toml pyproject.toml | |
${{ 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 | |
${{ steps.python.outputs.python-path }} -Wd ${{ github.workspace }}/dev/continuous-integration/run_test_suite.py | |
env: | |
AGENT_OS: ${{runner.os}} | |
STANDALONE: ${{ matrix.standalone }} | |
FLOAT_DTYPE_32: ${{ matrix.float_dtype_32 }} | |