From 55f33072fb00a7451c9bb9e6ad8369716b9e006a Mon Sep 17 00:00:00 2001 From: Marcel Stimberg Date: Wed, 2 Aug 2023 14:53:10 +0200 Subject: [PATCH] Remove other test workflows --- .github/workflows/publish_to_pypi.yml | 102 ------------------ .github/workflows/testsuite.yml | 149 -------------------------- 2 files changed, 251 deletions(-) delete mode 100644 .github/workflows/publish_to_pypi.yml delete mode 100644 .github/workflows/testsuite.yml diff --git a/.github/workflows/publish_to_pypi.yml b/.github/workflows/publish_to_pypi.yml deleted file mode 100644 index 4e7a56ae7..000000000 --- a/.github/workflows/publish_to_pypi.yml +++ /dev/null @@ -1,102 +0,0 @@ -name: Build and publish to TestPyPI or PyPI -on: [push, pull_request] - -jobs: - build: - name: Build 🎡 on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ windows-latest, macOS-latest ] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Set up Python 3.x - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - name: Build wheels - uses: pypa/cibuildwheel@v2.12.1 - with: - output-dir: dist - env: - CIBW_PROJECT_REQUIRES_PYTHON: ">=3.7" - CIBW_ARCHS_WINDOWS: auto64 - CIBW_ARCHS_MACOS: x86_64 universal2 - CIBW_TEST_SKIP: '*_arm64 *_universal2:arm64' - CIBW_SKIP: 'pp* *-musllinux_*' - CIBW_TEST_COMMAND: python {project}/dev/continuous-integration/run_simple_test.py - CIBW_TEST_REQUIRES: pytest - - name: store distribution 📦 - uses: actions/upload-artifact@v3 - with: - name: packages - path: dist - - build-linux: - name: Build ${{ matrix.arch }} 🎡 and source 📦 on Linux - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - arch: [ auto64, aarch64 ] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Set up Python 3.x - uses: actions/setup-python@v4 - with: - python-version: '3.x' - - name: Build source tarball - run: | - python -m pip install --upgrade pip - python -m pip install "cython>=0.29" oldest-supported-numpy setuptools versioneer - python setup.py sdist --formats=gztar --with-cython --fail-on-error - if: ${{ matrix.arch == 'auto64' }} - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - with: - platforms: all - - name: Build wheels - uses: pypa/cibuildwheel@v2.12.1 - with: - output-dir: dist - env: - CIBW_PROJECT_REQUIRES_PYTHON: ">=3.7" - CIBW_ARCHS_LINUX: ${{ matrix.arch }} - CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 - CIBW_SKIP: 'pp* *-musllinux_*' - CIBW_TEST_COMMAND: python {project}/dev/continuous-integration/run_simple_test.py - CIBW_TEST_REQUIRES: pytest - - name: store distribution 📦 - uses: actions/upload-artifact@v3 - with: - name: packages - path: dist - - deploy: - name: Publish to (Test)PyPI - runs-on: ubuntu-latest - if: github.ref == 'refs/heads/master' && github.repository == 'brian-team/brian2' - environment: release - permissions: - id-token: write # IMPORTANT: mandatory for trusted publishing - needs: - - build - - build-linux - steps: - - name: load distribution 📦 - uses: actions/download-artifact@v3 - with: - name: packages - path: dist/ - - name: Publish distribution 📦 to Test PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ - - name: Publish distribution release 📦 to PyPI - if: ${{ startsWith(github.ref, 'refs/tags') && github.repository == 'brian-team/brian2' }} - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml deleted file mode 100644 index 5090e14e6..000000000 --- a/.github/workflows/testsuite.yml +++ /dev/null @@ -1,149 +0,0 @@ -name: TestSuite - -on: [push, pull_request] - -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/github-calc-nep29@v0.5 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - pre-commit: - name: Run linters with pre-commit - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - cache: 'pip' - cache-dependency-path: .devcontainer/dev-requirements.txt - - name: Install deps - run: pip3 install -r .devcontainer/dev-requirements.txt - - name: Run pre-commit hooks - run: pre-commit run --all-files --show-diff-on-failure - - testing: - needs: [get_python_versions, pre-commit] - name: "Python ${{ matrix.python-version }} on ${{ matrix.os }} (standalone: ${{ matrix.standalone }}, 32bit: ${{ matrix.float_dtype_32 }})" - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-20.04, windows-2019, macOS-11] - standalone: [false, true] - float_dtype_32: [false, true] - python-version: ["${{ needs.get_python_versions.outputs.max-python }}"] - include: - - os: ubuntu-20.04 - standalone: false - python-version: "${{ needs.get_python_versions.outputs.min-python }}" - float_dtype_32: false - - os: ubuntu-20.04 - standalone: true - python-version: "${{ needs.get_python_versions.outputs.min-python }}" - float_dtype_32: false - - defaults: - run: - shell: bash -l {0} - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup Conda and Python - uses: conda-incubator/setup-miniconda@v2 - with: - auto-update-conda: true - auto-activate-base: false - channels: conda-forge,defaults - channel-priority: true - activate-environment: 'test_env' - python-version: ${{ matrix.python-version }} - - - name: Install Brian2 and dependencies - run: | - conda install -n test_env --quiet --yes -c conda-forge pip pytest cython sympy future pyparsing numpy jinja2 six scipy sphinx gsl coverage - pip install . - - - name: Run Tests - run: | - cd $GITHUB_WORKSPACE/.. # move out of the workspace to avoid direct import - coverage run --rcfile=$GITHUB_WORKSPACE/.coveragerc $GITHUB_WORKSPACE/$SCRIPT_NAME - env: - SCRIPT_NAME: dev/continuous-integration/run_test_suite.py - SPHINX_DIR: ${{ github.workspace }}/docs_sphinx - AGENT_OS: ${{runner.os}} - STANDALONE: ${{ matrix.standalone }} - FLOAT_DTYPE_32: ${{ matrix.float_dtype_32 }} - - - name: Upload coverage data to coveralls - if: ${{ startsWith(matrix.os, 'ubuntu-') && matrix.python-version == needs.get_python_versions.outputs.max-python }} - run: | - cp $GITHUB_WORKSPACE/../.coverage . - python -m pip install --upgrade coveralls - coveralls --service=github --rcfile=$GITHUB_WORKSPACE/.coveragerc - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COVERALLS_FLAG_NAME: ${{ github.job }} - COVERALLS_PARALLEL: true - - coveralls: - name: Indicate completion to coveralls.io - needs: testing - runs-on: ubuntu-latest - container: python:3-slim - steps: - - name: Finished - run: | - python -m pip install --upgrade coveralls - coveralls --service=github --finish --rcfile=$GITHUB_WORKSPACE/.coveragerc - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - test_doc_build: - needs: get_python_versions - name: Test building the documentation - runs-on: ubuntu-latest - defaults: - run: - shell: bash -l {0} - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 - submodules: true - - - name: Setup Conda and Python - uses: conda-incubator/setup-miniconda@v2 - with: - auto-update-conda: true - auto-activate-base: false - channels: conda-forge,defaults - channel-priority: true - activate-environment: 'test_env' - python-version: "${{ needs.get_python_versions.outputs.max-python }}" - - - name: Install dependencies - run: pip install -r rtd-requirements.txt - - - name: Install brian2 - run: pip install . - - - name: Build HTML documentation - run: | - cd docs_sphinx - sphinx-build -b html . ../docs - env: - READTHEDOCS: True