diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml new file mode 100755 index 0000000..8a96a72 --- /dev/null +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -0,0 +1,86 @@ +# This file was generated automatically from conda-smithy. To update this configuration, +# update the conda-forge.yml and/or the recipe/meta.yaml. +# -*- mode: yaml -*- + +jobs: +- job: win + pool: + vmImage: windows-2022 + strategy: + matrix: + win_64_: + CONFIG: win_64_ + UPLOAD_PACKAGES: 'True' + timeoutInMinutes: 360 + variables: + CONDA_BLD_PATH: D:\\bld\\ + UPLOAD_TEMP: D:\\tmp + + steps: + - task: PythonScript@0 + displayName: 'Download Miniforge' + inputs: + scriptSource: inline + script: | + import urllib.request + url = 'https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Windows-x86_64.exe' + path = r"$(Build.ArtifactStagingDirectory)/Miniforge.exe" + urllib.request.urlretrieve(url, path) + + - script: | + start /wait "" %BUILD_ARTIFACTSTAGINGDIRECTORY%\Miniforge.exe /InstallationType=JustMe /RegisterPython=0 /S /D=C:\Miniforge + displayName: Install Miniforge + + - powershell: Write-Host "##vso[task.prependpath]C:\Miniforge\Scripts" + displayName: Add conda to PATH + + - script: | + call activate base + mamba.exe install "python=3.10" conda-build conda pip boa conda-forge-ci-setup=3 -c conda-forge --strict-channel-priority --yes + displayName: Install conda-build + + - script: set PYTHONUNBUFFERED=1 + displayName: Set PYTHONUNBUFFERED + + # Configure the VM + - script: | + call activate base + setup_conda_rc .\ ".\recipe" .\.ci_support\%CONFIG%.yaml + displayName: conda-forge CI setup + + # Configure the VM. + - script: | + set "CI=azure" + call activate base + run_conda_forge_build_setup + displayName: conda-forge build setup + + - script: | + call activate base + if EXIST LICENSE.txt ( + copy LICENSE.txt "recipe\\recipe-scripts-license.txt" + ) + conda.exe mambabuild "recipe" -m .ci_support\%CONFIG%.yaml --suppress-variables + displayName: Build recipe + env: + PYTHONUNBUFFERED: 1 + - script: | + set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" + call activate base + validate_recipe_outputs "%FEEDSTOCK_NAME%" + displayName: Validate Recipe Outputs + + - script: | + set "GIT_BRANCH=%BUILD_SOURCEBRANCHNAME%" + set "FEEDSTOCK_NAME=%BUILD_REPOSITORY_NAME:*/=%" + set "TEMP=$(UPLOAD_TEMP)" + if not exist "%TEMP%\" md "%TEMP%" + set "TMP=%TEMP%" + call activate base + upload_package --validate --feedstock-name="%FEEDSTOCK_NAME%" .\ ".\recipe" .ci_support\%CONFIG%.yaml + displayName: Upload package + env: + BINSTAR_TOKEN: $(BINSTAR_TOKEN) + FEEDSTOCK_TOKEN: $(FEEDSTOCK_TOKEN) + STAGING_BINSTAR_TOKEN: $(STAGING_BINSTAR_TOKEN) + condition: and(succeeded(), not(eq(variables['UPLOAD_PACKAGES'], 'False')), not(eq(variables['Build.Reason'], 'PullRequest'))) \ No newline at end of file diff --git a/.ci_support/win_64_.yaml b/.ci_support/win_64_.yaml new file mode 100644 index 0000000..acc383a --- /dev/null +++ b/.ci_support/win_64_.yaml @@ -0,0 +1,13 @@ +boost_cpp: +- 1.78.0 +channel_sources: +- conda-forge +channel_targets: +- conda-forge main +cxx_compiler: +- vs2019 +pin_run_as_build: + boost-cpp: + max_pin: x.x.x +target_platform: +- win-64 diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index da1368a..0535f6a 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -9,8 +9,6 @@ jobs: runs-on: ubuntu-latest name: automerge steps: - - name: checkout - uses: actions/checkout@v3 - name: automerge-action id: automerge-action uses: conda-forge/automerge-action@main diff --git a/README.md b/README.md index b82ce25..8256a17 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Package license: Apache-2.0 Summary: ANTs computes high-dimensional mappings to capture the statistics of brain structure and function + Development: https://github.com/ANTsX/ANTs/wiki Documentation: http://stnava.github.io/ANTsDoc @@ -44,6 +45,13 @@ Current build status variant + + win_64 + + + variant + + diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 33a441c..6b346f5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,4 +4,5 @@ jobs: - template: ./.azure-pipelines/azure-pipelines-linux.yml + - template: ./.azure-pipelines/azure-pipelines-win.yml - template: ./.azure-pipelines/azure-pipelines-osx.yml \ No newline at end of file diff --git a/recipe/bld.bat b/recipe/bld.bat index 47b89c1..8878b67 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -1,18 +1,30 @@ +:: Build out-of-tree. mkdir build -if errorlevel 1 exit 1 cd build -if errorlevel 1 exit 1 +:: Config cmake -G Ninja ^ %CMAKE_ARGS% ^ + -DANTS_SUPERBUILD:BOOL=OFF ^ + -DBUILD_SHARED_LIBS:BOOL=ON ^ + -DCMAKE_BUILD_TYPE:STRING=Release ^ -DCMAKE_INSTALL_LIBDIR:STRING=%LIBRARY_LIB% ^ -DCMAKE_INSTALL_PREFIX:STRING=%LIBRARY_PREFIX% ^ -DCMAKE_PREFIX_PATH:STRING=%LIBRARY_PREFIX% ^ - -DBUILD_SHARED_LIBS:BOOL=ON ^ - -DANTS_SUPERBUILD:BOOL=OFF ^ + -DRUN_SHORT_TESTS:BOOL=ON ^ + -DRUN_LONG_TESTS:BOOL=OFF ^ -DUSE_SYSTEM_ITK:BOOL=ON ^ %SRC_DIR% if errorlevel 1 exit 1 -cmake --build . --config RelWithDebInfo --parallel %CPU_COUNT% --target install +:: Build +cmake --build . --config Release --parallel %CPU_COUNT% +if errorlevel 1 exit 1 + +:: Test +ctest -C Release --output-on-failure +if errorlevel 1 exit 1 + +:: Install +cmake --build . --config Release --target install if errorlevel 1 exit 1 diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 9b1cd42..4997754 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -10,8 +10,7 @@ source: sha256: 3a872ae60f00665c7b77b5d3727b1f9e5edaf33fe96024abb3289cee917e11d6 build: - number: 1 - skip: true # [win] + number: 2 requirements: build: