-
Notifications
You must be signed in to change notification settings - Fork 50
/
build_win.bat
37 lines (31 loc) · 1.08 KB
/
build_win.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@ECHO OFF
mkdir %SSCDIR%\..\build_pysam
cd %SSCDIR%\..\build_pysam
REM skip api_autogen since the files should not need to be regenerated
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_CONFIGURATION_TYPES="Release" -DCMAKE_SYSTEM_VERSION=10.0 -DSAM_SKIP_TOOLS=1 -DSAM_SKIP_TESTS=1 -DSAM_SKIP_AUTOGEN=1 -DSAMAPI_EXPORT=1 ..
devenv /build Release system_advisor_model.sln /Project SAM_api
if errorlevel 1 (
echo Error in Build
exit /b %errorlevel%
)
cd %PYSAMDIR%
echo y | rmdir build /s
echo y | del dist\*
FOR %%i IN (pysam_build_3.8 pysam_build_3.9 pysam_build_3.10 pysam_build_3.11, pysam_build_3.12) DO (
call deactivate
call activate %%i
echo y | pip install -r tests/requirements.txt
echo y | pip uninstall NREL-PySAM
python setup.py install
pytest -s tests
if errorlevel 1 (
echo Error in Tests
exit /b %errorlevel%
)
python setup.py bdist_wheel
)
REM %bash% build_conda.sh
REM anaconda upload -u nrel dist/*.tar.bz2
REM only upload to PyPi after Github Actions test of new package passes
REM twine upload dist/*.whl
REM rmdir %SSCDIR%\..\build_pysam /s