Commit 16f305f3 authored by jlaura's avatar jlaura Committed by Trent Hare
Browse files

Conda build on win (#143)

* Conda build on win

* Trying a straight build first

* Unneeded csmapi

* Now trying to upload build

* Trying a build and upload

* Trying syntax change

* trying ps
parent dd73b1bc
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -10,6 +10,12 @@ configuration:

install:
  - git submodule update --init --recursive
  - call C:\\Miniconda36-x64\Scripts\activate.bat
  - conda config --set always_yes yes --set changeps1 no
  - conda update -q conda
  - conda install conda-build anaconda-client
  - conda config --set anaconda_upload yes
  - conda config --add channels usgs-astrogeology

before_build:
  - mkdir build
@@ -19,5 +25,11 @@ build_script:
  - cmake -G "Visual Studio 15 2017 Win64" -DBUILD_TESTS=OFF ..
  - cmake --build . --target ALL_BUILD --config Release

  - path: build\Release\usgscsm.dll
    name: usgscsm.dll

on_success:
- cd ../
- conda build -q recipe/
- ps: $builddir = conda build recipe --output
- ps: anaconda -t $CONDA_UPLOAD_TOKEN upload $builddir --label dev --force

recipe/bld.bat

0 → 100644
+6 −0
Original line number Diff line number Diff line
mkdir build
cd build
cmake -G "Visual Studio 15 2017 Win64" -DBUILD_TESTS=OFF ..
cmake --build . --target ALL_BUILD --config Release
copy Release\usgscsm.dll %LIBRARY_BIN%
copy Release\usgscsm.lib %LIBRARY_LIB%
 No newline at end of file
+8 −2
Original line number Diff line number Diff line

package:
  name: usgscam
  version: "0.1.0"

source:
  git_url: https://github.com/USGS-Astrogeology/CSM-CameraModel.git

build:
  string: dev

requirements:
  build:
    - {{ compiler('cxx') }}  # [linux]
    - vc 14  # [win]
    - cmake >=3.10
    - libcsm
    - vc 14  # [win]
  run:
    - vc  # [win]

test:
  commands:
    - test -e $PREFIX/lib/libusgscsm.so  # [linux]
    - test -e $PREFIX/lib/libusgscsm.dylib  # [osx]
    - if not exist %LIBRARY_BIN%\usgscam.dll exit 1  # [win]
    - if not exist %LIBRARY_LIB%\usgscam.lib exit 1  # [win]

about:
  home: https://github.com/USGS-Astrogeology/CSM-CameraModels