-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
93 lines (78 loc) · 3.43 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
platform:
- x64
configuration:
#- Debug
- Release
# branches to build
branches:
# whitelist
only:
- master
cache:
- C:\projects\deps -> .appveyor.yml
environment:
APPVEYOR_SAVE_CACHE_ON_ERROR: true
init:
- cmd: |
set DEPS_DIR=C:\projects\deps
set NINJA_VERSION=1.8.2
set NINJA_DIR=%DEPS_DIR%\ninja
set ARDUINO_VERSION=1.8.5
set ARDUINO_DIR=%DEPS_DIR%\arduino-%ARDUINO_VERSION%
set ARDUINO_SDK_PATH=%ARDUINO_DIR%
set ARDUINO_BIN_DIR=%ARDUINO_DIR%\hardware\tools\avr\bin
set PATH=%NINJA_DIR%;%PATH%
set PATH=%ARDUINO_BIN_DIR%;%PATH%
rem Use msys2 for all Unix-Like binaries
rem
set PATH=C:\msys64\usr\bin;%PATH%
install:
############################################################################
# All external dependencies are installed in C:\projects\deps
############################################################################
- cmd: |
if not exist %DEPS_DIR% mkdir %DEPS_DIR%
############################################################################
# Install ninja
############################################################################
- cmd: |
if not exist %NINJA_DIR% mkdir %NINJA_DIR%
cd %NINJA_DIR%
if not exist ninja.exe appveyor DownloadFile https://github.com/ninja-build/ninja/releases/download/v%NINJA_VERSION%/ninja-win.zip
if not exist ninja.exe 7z x ninja-win.zip
%NINJA_DIR%\ninja --version
############################################################################
# Install Arduino
############################################################################
# Under windows, Arduinos's binary directory must be in the
# PATH variable for the compiler to work. Therefore, we cannot
# rely on Leidokos-CMake to install Arduino as it is not possible
# to change the PATH variable through the CMake configuration process.
- cmd: |
cd %DEPS_DIR%
if not exist %ARDUINO_DIR% appveyor DownloadFile "http://downloads.arduino.cc/arduino-%ARDUINO_VERSION%-windows.zip"
if not exist %ARDUINO_DIR% 7z x arduino-%ARDUINO_VERSION%-windows.zip
build: Script
build_script:
- cmd: |
set BASE_DIR=C:\projects\leidokos-cmake
cd %BASE_DIR%
rmdir "hardware\keyboardio" /s /q
git clone --recursive https://github.com/keyboardio/Kaleidoscope-Bundle-Keyboardio.git "hardware\keyboardio"
cd hardware\keyboardio\avr\libraries
if [%APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH%]==[] set test_branch=%APPVEYOR_REPO_BRANCH%
if not [%APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH%]==[] set test_branch=%APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH%
git clone -b %test_branch% --recursive https://github.com/CapeLeidokos/Leidokos-CMake.git
cd %BASE_DIR%
cmake -E make_directory "lcm_build"
cd lcm_build
rem cmake -G Ninja "-DARDUINO_SDK_PATH=%ARDUINO_DIR%" %BASE_DIR%/hardware/keyboardio/avr/libraries/Leidokos-CMake
rem We must test with GNU Make as we want to compare with the original firmware
rem which is build using GNU Make
cmake -G "Unix Makefiles" "-DCMAKE_MAKE_PROGRAM=C:\msys64\usr\bin\make.exe" "-DARDUINO_SDK_PATH=%ARDUINO_DIR%" %BASE_DIR%/hardware/keyboardio/avr/libraries/Leidokos-CMake
cmake --build . --target nm_diff
#notifications:
#- provider: Email
#to:
#on_build_failure: true