forked from JSBSim-Team/jsbsim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathappveyor.yml
107 lines (89 loc) · 4.4 KB
/
appveyor.yml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# see: https://www.appveyor.com/docs/appveyor-yml/
image: Visual Studio 2017
version: 1.0.{build}
# Need to add Python 3.8 explicitly to the path for CMake to pick it up, also
# need to hide Python 2.7 otherwise CMake picks it up in preference to 3.8.
# Cython isn't installed by default so we need to install it.
# Cython also gives a warning about not being on the path if the python38-x64
# directory name in the PATH isn't all lowercase.
# Need to call vcvarsall.bat to setup path and env variables for the the VS2017
# compiler in order for CMake to pick them up.
# Need to explicitly set the path to Ninja.exe as the make program
init:
- set ORIG_PATH=%PATH%
- set PATH=c:\python38-x64;c:\python38-x64\Scripts;%ORIG_PATH%
- ren c:\python27 python27-hide
- ren c:\python27-x64 python27-x64-hide
install:
# Upgrade setuptools to recognize the parameter long_description_content_type
- pip install -U cython numpy pandas scipy wheel pywin32 setuptools
# Install CXXTest for C++ unit tests
- git clone --depth=1 --branch=4.4 https://github.com/CxxTest/cxxtest.git
- set PATH=%CD%\cxxtest;%PATH%
- cd cxxtest\python
- python setup.py install
- cd ..\..
- cinst doxygen.install
build_script:
# Build JSBSim
- md build
- cd build
- call "c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
- cmake -G "Visual Studio 15 2017 Win64" ..
- cmake --build . --config RelWithDebInfo
- python python\setup.py sdist
- python python\setup.py bdist_wheel --config RelWithDebInfo --build-number=%APPVEYOR_BUILD_NUMBER%
test_script:
# Check that the Python module correctly installs
- pip install jsbsim --no-index -f python/dist
- python -c "import jsbsim;fdm=jsbsim.FGFDMExec('.', None);print(jsbsim.FGAircraft.__doc__)"
- pip uninstall jsbsim --yes
- ctest -j2 -E TestInputSocket --build-config RelWithDebInfo
- pip install python\dist\JSBSim-1.1.0.dev1.tar.gz
- python -c "import jsbsim;fdm=jsbsim.FGFDMExec('.', None)"
on_failure:
# Zip the test logs (see https://stackoverflow.com/a/26843122 for details)
- ps: Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::CreateFromDirectory('C:\projects\jsbsim\build\Testing\Temporary', 'C:\projects\jsbsim\build\TestLogs.zip');
# Push the zip file to AppVeyor artifacts (see https://www.appveyor.com/docs/packaging-artifacts/#pushing-artifacts-from-scripts for details)
- ps: Get-ChildItem TestLogs.zip | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
after_test:
# Build the binary wheel package for Python 3.5
- set PATH=c:\python35-x64;c:\python35-x64\Scripts;%ORIG_PATH%
- pip install -U cython numpy wheel pywin32 setuptools
- python python\setup.py bdist_wheel --config RelWithDebInfo --build-number=%APPVEYOR_BUILD_NUMBER%
- pip install jsbsim --no-index -f python/dist
- python -c "import jsbsim;fdm=jsbsim.FGFDMExec('.', None);print(jsbsim.FGAircraft.__doc__)"
# Build the binary wheel package for Python 3.6
- set PATH=c:\python36-x64;c:\python36-x64\Scripts;%ORIG_PATH%
- pip install -U cython numpy wheel pywin32 setuptools
- python python\setup.py bdist_wheel --config RelWithDebInfo --build-number=%APPVEYOR_BUILD_NUMBER%
- pip install jsbsim --no-index -f python/dist
- python -c "import jsbsim;fdm=jsbsim.FGFDMExec('.', None);print(jsbsim.FGAircraft.__doc__)"
# Build the binary wheel package for Python 3.7
- set PATH=c:\python37-x64;c:\python37-x64\Scripts;%ORIG_PATH%
- pip install -U cython numpy wheel pywin32 setuptools
- python python\setup.py bdist_wheel --config RelWithDebInfo --build-number=%APPVEYOR_BUILD_NUMBER%
- pip install jsbsim --no-index -f python/dist
- python -c "import jsbsim;fdm=jsbsim.FGFDMExec('.', None);print(jsbsim.FGAircraft.__doc__)"
artifacts:
- path: build\src\RelWithDebInfo\JSBSim.exe
name: Rolling_Release_x64_v2019
- path: build\utils\aeromatic++\RelWithDebInfo\aeromatic.exe
name: Rolling_Release_x64_v2019
- path: build\python\dist\*.whl
name: Rolling_Release_x64_v2019
- path: build\python\*-build.log
name: Rolling_Release_x64_v2019
# Do not build on tags (GitHub and BitBucket)
# to avoid infinite build loops
skip_tags: true
# Removed tag: JSBSim-win64-v$(appveyor_build_version)
deploy:
- provider: GitHub
tag: Rolling-release-v2019
description: Release - x64
auth_token:
secure: YWG8FRFWv/ylTuA1DIFNcN01uFGz7xKit8CayOMTE0orPKXhztwLmwm8MZ4IzFbr
prerelease: true
on:
branch: master