-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathappveyor.yml
70 lines (55 loc) · 2.38 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
image: Visual Studio 2019
clone_depth: 50
clone_folder: c:\projects\flax
environment:
global:
MPIR_ROOT_DIR: c:\projects\lib\mpir
MPFR_ROOT_DIR: c:\projects\lib\mpfr
LLVM_ROOT_DIR: c:\projects\lib\llvm
LIBFFI_ROOT_DIR: c:\projects\lib\libffi
cache:
- c:\projects\lib -> appveyor.yml
install:
# Set up the build environment
- cmd: call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
# download our deps.
- ps: "[Net.ServicePointManager]::SecurityProtocol = 'Ssl3, Tls, Tls11, Tls12'"
- ps: >-
If (!(Test-Path c:\projects\lib -PathType Container)) {
Invoke-WebRequest 'https://github.com/flax-lang/flax/releases/download/win-build-deps/libraries.zip' -OutFile 'c:\projects\libs.zip'
7z x -y -oc:\projects\lib c:\projects\libs.zip
}
# Download ninja
- cmd: mkdir C:\ninja-build
- ps: (new-object net.webclient).DownloadFile('https://github.com/mesonbuild/cidata/raw/master/ninja.exe', 'C:\ninja-build\ninja.exe')
- cmd: set PYTHON_ROOT=C:\python37-x64
# Add neccessary paths to PATH variable
- cmd: set PATH=%cd%;C:\ninja-build;%PYTHON_ROOT%;%PYTHON_ROOT%\Scripts;%PATH%
# Install meson
- cmd: pip install meson
build_script:
- ps: meson --buildtype=release build/meson-rel
- ps: ninja -C build/meson-rel
test_script:
- ps: cd c:\projects\flax
- ps: New-Item -Force -Path build\sysroot\usr\local\lib\flaxlibs -ItemType Directory
- ps: Copy-Item -Recurse -Force libs\* build\sysroot\usr\local\lib\flaxlibs\
- ps: build\meson-rel\flaxc.exe -sysroot build\sysroot --ffi-escape -run -backend llvm build\tester.flx
- ps: build\meson-rel\flaxc.exe -sysroot build\sysroot --ffi-escape -run -backend interp build\tester.flx
- ps: build\meson-rel\flaxc.exe -sysroot build\sysroot --ffi-escape build\tester.flx
- ps: .\tester.exe
after_test:
- cmd: 7z a windows-x64.zip %APPVEYOR_BUILD_FOLDER%\build\meson-rel\flaxc.exe
- cmd: 7z a windows-x64.zip %APPVEYOR_BUILD_FOLDER%\build\sysroot\usr\local\lib
- cmd: 7z rn windows-x64.zip flaxc.exe sysroot\usr\local\bin\flaxc.exe
- cmd: 7z rn windows-x64.zip lib sysroot\usr\local\lib
artifacts:
- path: windows-x64.zip
deploy:
- provider: GitHub
description: ''
artifact: windows-x64.zip
auth_token:
secure: Sk3O32lE4SgtirIRqI2PWP2tkfCg2Iurz+eFrLN7C9s/nIUCDbxV0T5hjjZqMIw5
on:
APPVEYOR_REPO_TAG: true