-
Notifications
You must be signed in to change notification settings - Fork 16
/
.appveyor.yml
112 lines (86 loc) · 2.79 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
108
109
110
111
112
environment:
matrix:
- job_name: win
appveyor_build_worker_image: Visual Studio 2022
- job_name: linux
appveyor_build_worker_image: Ubuntu2004
- job_name: mac
appveyor_build_worker_image: macos-monterey
- job_name: test
appveyor_build_worker_image: Ubuntu2004
matrix:
fast_finish: true
version: build-{build}
configuration: Release
platform: x64
clone_depth: 1
init:
- ps: >-
$env:DATE = $(Get-Date -Format d-MMM-yyyy)
$githash = $env:APPVEYOR_REPO_COMMIT.Substring(0, 7)
$gittag = if ($env:APPVEYOR_REPO_TAG -eq $True) {"_$($env:APPVEYOR_REPO_TAG_NAME)"} else {""}
Update-AppveyorBuild -Version "$($env:DATE)_g${githash}${gittag}"
$env:RELEASE_VERSION = $(Get-Date -Format d-MMMM-yyyy)
for:
-
matrix:
only:
- job_name: win
build_script:
- cmake -Wno-dev -B build
- cmake --build build --config %configuration%
after_build:
- 7z a niimath_win.zip .\build\bin\* >$null
- appveyor PushArtifact niimath_win.zip
-
matrix:
only:
- job_name: linux
build_script:
- export CC=gcc-9 CXX=g++-9
- cmake -Wno-dev -B build
- cmake --build build
after_build:
- 7z a niimath_lnx.zip ./build/bin/* &>/dev/null
- appveyor PushArtifact niimath_lnx.zip
-
matrix:
only:
- job_name: mac
build_script:
- brew install libomp
- cmake -Wno-dev -DCMAKE_OSX_ARCHITECTURES=x86_64 -DOPENMP_XCODE=ON -B build/x86_64
- cmake --build build/x86_64
- brew fetch --force --bottle-tag=arm64_monterey libomp
- brew reinstall $(brew --cache --bottle-tag=arm64_monterey libomp)
- cmake -Wno-dev -DCMAKE_OSX_ARCHITECTURES=arm64 -DOPENMP_XCODE=ON -B build/arm64
- cmake --build build/arm64
after_build:
- lipo -create -output build/niimath build/x86_64/bin/niimath build/arm64/bin/niimath
- zip -j niimath_macos.zip ./build/niimath &>/dev/null
- appveyor PushArtifact niimath_macos.zip
-
matrix:
only:
- job_name: test
build_script:
- export CC=gcc-9 CXX=g++-9
- cmake -Wno-dev -B build
- cmake --build build
after_build:
- export builddir=$APPVEYOR_BUILD_FOLDER/build
- export exe=$builddir/bin/niimath tstexe=$builddir/bin/niimath basedir=$builddir/niimath_tests
- git clone https://github.com/rordenlab/niimath_tests.git $basedir
- cd $basedir; ./canonical_test.sh
deploy:
- provider: GitHub
tag: $(APPVEYOR_REPO_TAG_NAME)
release: version $(RELEASE_VERSION) ($(APPVEYOR_REPO_TAG_NAME))
description: ""
auth_token:
secure: 90KUxJbQyRfqQ6N6EOMy4ZVqSt8/bdEpenZBIFSRCyagmvQlGfyN0yKKkeknmtPg
artifact: /niimath_.*\.zip/
draft: false
prerelease: false
on:
APPVEYOR_REPO_TAG: true