From e342eb2a6649e34b9951b3be22fa48a33d538b25 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Apr 2026 21:08:14 +0000 Subject: [PATCH 1/2] Initial plan From a2385313b7a4276ae7c7486dccd8adfa98d326fc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Apr 2026 21:10:32 +0000 Subject: [PATCH 2/2] Move from Azure DevOps to GitHub Actions: remove azure-pipelines.yml and update badges Agent-Logs-Url: https://github.com/sdpython/teachcompute/sessions/008e26c2-303a-4420-91de-62b002e93788 Co-authored-by: xadupre <22452781+xadupre@users.noreply.github.com> --- README.rst | 9 +- _doc/index.rst | 9 +- azure-pipelines.yml | 290 -------------------------------------------- 3 files changed, 10 insertions(+), 298 deletions(-) delete mode 100644 azure-pipelines.yml diff --git a/README.rst b/README.rst index 98d5a21..fb11c8a 100644 --- a/README.rst +++ b/README.rst @@ -1,9 +1,10 @@ -.. image:: https://dev.azure.com/xavierdupre3/teachcompute/_apis/build/status%2Fsdpython.teachcompute?branchName=main - :target: https://dev.azure.com/xavierdupre3/teachcompute/_build/latest?definitionId=29&branchName=main +.. image:: https://github.com/sdpython/teachcompute/actions/workflows/documentation.yml/badge.svg + :target: https://github.com/sdpython/teachcompute/actions/workflows/documentation.yml + :alt: Build Status -.. image:: https://ci.appveyor.com/api/projects/status/fl1sge2kumhg8v51?svg=true - :target: https://ci.appveyor.com/project/sdpython/teachcompute +.. image:: https://github.com/sdpython/teachcompute/actions/workflows/wheels-windows.yml/badge.svg + :target: https://github.com/sdpython/teachcompute/actions/workflows/wheels-windows.yml :alt: Build Status Windows .. image:: https://badge.fury.io/py/teachcompute.svg diff --git a/_doc/index.rst b/_doc/index.rst index 5858841..02df748 100644 --- a/_doc/index.rst +++ b/_doc/index.rst @@ -54,11 +54,12 @@ Le site `Xavier Dupré `_ contient beaucoup d'exemples sur beaucoup de sujets, souvent reliés au machine learning. -.. image:: https://dev.azure.com/xavierdupre3/teachcompute/_apis/build/status%2Fsdpython.teachcompute?branchName=main - :target: https://dev.azure.com/xavierdupre3/teachcompute/_build/latest?definitionId=29&branchName=main +.. image:: https://github.com/sdpython/teachcompute/actions/workflows/documentation.yml/badge.svg + :target: https://github.com/sdpython/teachcompute/actions/workflows/documentation.yml + :alt: Build Status -.. image:: https://ci.appveyor.com/api/projects/status/fl1sge2kumhg8v51?svg=true - :target: https://ci.appveyor.com/project/sdpython/teachcompute +.. image:: https://github.com/sdpython/teachcompute/actions/workflows/wheels-windows.yml/badge.svg + :target: https://github.com/sdpython/teachcompute/actions/workflows/wheels-windows.yml :alt: Build Status Windows .. image:: https://badge.fury.io/py/teachcompute.svg diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 944b58e..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,290 +0,0 @@ -jobs: - -- job: 'TestLinuxWheelNoCuda' - pool: - vmImage: 'ubuntu-latest' - strategy: - matrix: - Python312-Linux: - python.version: '3.12' - maxParallel: 3 - - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - architecture: 'x64' - - script: sudo apt-get update - displayName: 'AptGet Update' - - script: sudo apt-get install -y graphviz - displayName: 'Install Graphviz' - - script: python -m pip install --upgrade pip wheel - displayName: 'Install tools' - - script: pip install -r requirements.txt - displayName: 'Install Requirements' - - script: pip install -r requirements-dev.txt - displayName: 'Install Requirements dev' - - script: | - ruff check . - displayName: 'Ruff' - - script: | - black --diff . - displayName: 'Black' - - script: | - cmake-lint _cmake/Find* --disabled-codes C0103 C0113 --line-width=88 - cmake-lint _cmake/CMake* --disabled-codes C0103 C0113 --line-width=88 - displayName: 'cmake-lint' - - script: | - cython-lint . - displayName: 'cython-lint' - - script: | - export USE_CUDA=0 - python -m pip install -e . -v --no-build-isolation - displayName: 'pip install -e . -v --no-build-isolation' - - script: | - python -m pip freeze - displayName: 'pip freeze' - - script: | - python -m pytest _unittests --durations=10 - displayName: 'Runs Unit Tests' - - script: | - # --config-settings does not work yet. - # python -m pip wheel . --config-settings="--use_cuda=0" -v - # python -m pip wheel . --global-option "--use_cuda=0" -v - export USE_CUDA=0 - python -m pip wheel . -v --no-build-isolation - displayName: 'build wheel' - - script: | - mkdir dist - cp teachcompute*.whl dist - displayName: 'copy wheel' - - script: | - pip install auditwheel-symbols - auditwheel-symbols --manylinux 2014 dist/*.whl || exit 0 - displayName: 'Audit wheel' - - script: | - pip install abi3audit - abi3audit dist/*.whl || exit 0 - displayName: 'abi3audit wheel' - - task: PublishPipelineArtifact@0 - inputs: - artifactName: 'wheel-linux-pip-$(python.version)' - targetPath: 'dist' - -- job: 'TestLinux' - pool: - vmImage: 'ubuntu-latest' - strategy: - matrix: - Python312-Linux: - python.version: '3.12' - maxParallel: 3 - - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - architecture: 'x64' - - script: sudo apt-get update - displayName: 'AptGet Update' - - script: sudo apt-get install -y pandoc - displayName: 'Install Pandoc' - - script: sudo apt-get install -y inkscape - displayName: 'Install Inkscape' - - script: sudo apt-get install -y graphviz - displayName: 'Install Graphviz' - - script: python -m pip install --upgrade pip wheel - displayName: 'Install tools' - - script: pip install -r requirements.txt - displayName: 'Install Requirements' - - script: pip install -r requirements-dev.txt - displayName: 'Install Requirements dev' - - script: | - ruff check . - displayName: 'Ruff' - - script: | - black --diff . - displayName: 'Black' - - script: | - cmake-lint _cmake/Find* --disabled-codes C0103 C0113 --line-width=88 - cmake-lint _cmake/CMake* --disabled-codes C0103 C0113 --line-width=88 - displayName: 'cmake-lint' - - script: | - cython-lint . - displayName: 'cython-lint' - - script: | - # python -m pip install -e . - python setup.py build_ext --inplace - displayName: 'build inplace' - - bash: | - contents=$(cat .build_path.txt) - export BUILD_PATH="$contents" - cd $BUILD_PATH - ctest --rerun-failed --output-on-failure - displayName: 'Run C++ Unit Tests' - - script: | - python -m pip freeze - displayName: 'pip freeze' - - script: | - python -m pytest _unittests --durations=10 - displayName: 'Runs Unit Tests' - - script: | - python -u setup.py bdist_wheel - displayName: 'Build Package' - - script: | - pip install auditwheel-symbols - auditwheel-symbols --manylinux 2014 dist/*.whl || exit 0 - displayName: 'Audit wheel' - - script: | - pip install abi3audit - abi3audit dist/*.whl || exit 0 - displayName: 'abi3audit wheel' - - script: | - ls dist/* - find dist -type f \( -name "teachcompute*.whl" \) | while read f; do - echo "pip install $f"; - python -m pip install $f; - done - displayName: 'install built wheel' - - script: | - python -m pip freeze - displayName: 'pip freeze' - - script: | - cd dist - python -m pytest ../_unittests - displayName: 'check unit test with the whl' - - script: | - ls -l - displayName: 'current folder' - - script: | - python -c "import teachcompute;print('has_cuda:',teachcompute.has_cuda())" - displayName: 'has_cuda?' - - script: | - cp LICENSE* ./_doc - cp CHANGELOGS* ./_doc - displayName: 'Copy license, changelogs' - - script: | - UNITTEST_GOING=1 python -m sphinx _doc dist/html -v - displayName: 'Builds Documentation' - - task: PublishPipelineArtifact@0 - inputs: - artifactName: 'wheel-linux-$(python.version)' - targetPath: 'dist' - -- job: 'TestWindows' - pool: - vmImage: 'windows-latest' - strategy: - matrix: - Python311-Windows: - python.version: '3.12' - maxParallel: 3 - - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - architecture: 'x64' - - script: python -m pip install --upgrade pip wheel - displayName: 'Install tools' - - script: | - pip install -r requirements.txt - displayName: 'Install Requirements' - - script: | - pip install -r requirements-dev.txt - displayName: 'Install Requirements dev' - - script: set - displayName: 'set' - - script: | - python setup.py build_ext --inplace - displayName: 'build' - - script: | - python setup.py install - displayName: 'build wheel' - - powershell: | - $contents = Get-Content -Path ".build_path.txt" - cd $contents - ctest -C Release --rerun-failed --output-on-failure - displayName: 'Runs C++ Unit Tests' - - script: | - python -m pip freeze - displayName: 'pip freeze' - - script: | - python -m pytest _unittests --durations=10 -v - displayName: 'Runs Unit Tests' - - script: | - python -u setup.py bdist_wheel - displayName: 'Build Package' - - task: PublishPipelineArtifact@0 - inputs: - artifactName: 'wheel-windows-$(python.version)' - targetPath: 'dist' - -- job: 'TestMac' - pool: - vmImage: 'macOS-latest' - strategy: - matrix: - Python312-Mac: - python.version: '3.12' - maxParallel: 3 - - steps: - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - architecture: 'arm64' - - # use anaconda - # - bash: echo "##vso[task.prependpath]$CONDA/bin" - # displayName: Add conda to PATH - # - bash: sudo chown -R $USER $CONDA - # displayName: Take ownership of conda installation - # - bash: conda create --yes --quiet --name myEnvironment - # displayName: Create Anaconda environment - - - script: | - python -c "import sys;print(sys.executable)" - python -c "import sys;print(sys.version_info)" - python -c "import sys;print(sys.version)" - python -c "import sys;print(sys.implementation)" - python -c "import platform;print(platform.processor())" - displayName: 'Print' - - script: brew install libomp - displayName: 'Install omp' - # macOS already provides this software and installing another version in parallel can cause all kinds of trouble. - # - script: brew install llvm - # displayName: 'Install llvm' - - script: | - pip install -r requirements.txt - displayName: 'Install Requirements' - - script: | - pip install -r requirements-dev.txt - displayName: 'Install Requirements dev' - - script: | - gcc --version - python -c "import sys;print('PYTHON', sys.executable)" - python -c "import sys;print('PYTHON', sys.version_info)" - python -c "import numpy;print('numpy', numpy.__version__)" - python -c "import cython;print('cython', cython.__version__)" - displayName: 'Print' - - script: | - python setup.py build_ext --inplace - displayName: 'build' - - script: | - python setup.py bdist_wheel - displayName: 'build wheel' - - script: | - python -m pip freeze - displayName: 'pip freeze' - - script: | - source activate myEnvironment - python -m pytest _unittests --durations=10 -v - displayName: 'Runs Unit Tests' - - script: | - python -u setup.py build - displayName: 'Build Package' - - task: PublishPipelineArtifact@0 - inputs: - artifactName: 'wheel-mac-$(python.version)' - targetPath: 'dist'