forked from sanosdole/nodeclrhost
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
166 lines (163 loc) · 5.61 KB
/
.travis.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
language: node_js
node_js: 12.16.3
jobs:
include:
- name: node packages linux
os: linux
services:
- xvfb
addons:
chrome: stable
before_install:
- export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
- export DOTNET_CLI_TELEMETRY_OPTOUT=1
- wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
- sudo dpkg -i packages-microsoft-prod.deb
- sudo apt-get update
- sudo apt-get install apt-transport-https
- sudo apt-get update
- sudo apt-get install dotnet-sdk-3.1
install:
- npm install -g npm@'>=6.14.5'
- "cd coreclr-hosting"
- rm -rf node_modules
- rm -f package-lock.json
- npm i -g prebuild
- npm i --build-from-source
- if [ "$TRAVIS_TAG" != "" ]; then
npm version "${TRAVIS_TAG:1}" --allow-same-version;
prebuild -t 12.13.0 --include-regex "\.(node|a|dll|so|dylib)$";
prebuild -t 14.4.0 --include-regex "\.(node|a|dll|so|dylib)$";
prebuild -t 8.0.0 -r electron --include-regex "\.(node|a|dll|so|dylib)$";
prebuild -t 9.0.0 -r electron --include-regex "\.(node|a|dll|so|dylib)$";
fi
# TODO: Why is process.env.DEBUG set when building production?
- "cd ../electron-blazor-glue"
- rm -rf node_modules
- rm -f package-lock.json
- npm i
script:
- cd ../coreclr-hosting
- npm run prepare
- npm run build-testapp
- npm run mocha
- cd ../electron-blazor-glue
- npm run prepare
- cd ../examples/electron-blazor
- rm -rf node_modules
- rm -f package-lock.json
- npm i
- export DISPLAY=:99.0
- sleep 3
- npm run test
after_success:
- echo $TRAVIS_TAG
- cd ..
- cd ..
- ./ci_npm_publish.sh
deploy:
- provider: releases
skip_cleanup: true
token: $GITHUB_TOKEN
file_glob: true
file: coreclr-hosting/prebuilds/*
overwrite: true
on:
tags: true
- name: prebuild coreclr-hosting osx
os: osx
addons:
homebrew:
update: true
casks:
- dotnet-sdk
install:
- "cd coreclr-hosting"
- npm install -g npm@'>=6.14.5'
- dotnet --version
- npm i -g prebuild
- npm i --build-from-source
- if [ "$TRAVIS_TAG" != "" ]; then
npm version "${TRAVIS_TAG:1}" --allow-same-version;
prebuild -t 12.13.0 --include-regex "\.(node|a|dll|so|dylib)$";
prebuild -t 14.4.0 --include-regex "\.(node|a|dll|so|dylib)$";
prebuild -t 8.0.0 -r electron --include-regex "\.(node|a|dll|so|dylib)$";
prebuild -t 9.0.0 -r electron --include-regex "\.(node|a|dll|so|dylib)$";
fi
script:
- npm run build-testapp
- npm run mocha
- cd ..
deploy:
skip_cleanup: true
provider: releases
token: $GITHUB_TOKEN
file_glob: true
file: coreclr-hosting/prebuilds/*
overwrite: true
on:
tags: true
- name: prebuild coreclr-hosting windows
os: windows
install:
- choco install dotnetcore-sdk
- "cd coreclr-hosting"
# - npm install -g npm@'>=6.14.5'
- dotnet --version
- npm i -g prebuild
- npm i --build-from-source
- if [ "$TRAVIS_TAG" != "" ]; then
npm version "${TRAVIS_TAG:1}" --allow-same-version;
prebuild -t 12.13.0 --include-regex "\.(node|a|dll|so|dylib)$";
prebuild -t 14.4.0 --include-regex "\.(node|a|dll|so|dylib)$";
prebuild -t 8.0.0 -r electron --include-regex "\.(node|a|dll|so|dylib)$";
prebuild -t 9.0.0 -r electron --include-regex "\.(node|a|dll|so|dylib)$";
fi
script:
- npm run build-testapp
- npm run mocha
- cd ..
deploy:
skip_cleanup: true
provider: releases
token: $GITHUB_TOKEN
file_glob: true
file: coreclr-hosting/prebuilds/*
overwrite: true
on:
tags: true
-
name: C# nuget packages
language: csharp
mono: none
dotnet: 3.1.100
script:
- echo "Creating package version ""${TRAVIS_TAG:1}"
- cd NodeHostEnvironment
- dotnet pack -c Release
- cd ../ElectronHostedBlazor
- dotnet pack -c Release
after_success:
- cd ..
- if [ "$TRAVIS_TAG" != "" ]; then
cd NodeHostEnvironment/bin/Release;
dotnet nuget push NodeHostEnvironment."${TRAVIS_TAG:1}".nupkg -k "$NUGET_TOKEN" -s https://api.nuget.org/v3/index.json;
dotnet nuget push NodeHostEnvironment."${TRAVIS_TAG:1}".snupkg -k "$NUGET_TOKEN" -s https://api.nuget.org/v3/index.json;
cd ../../../ElectronHostedBlazor/bin/Release;
dotnet nuget push ElectronHostedBlazor."${TRAVIS_TAG:1}".nupkg -k "$NUGET_TOKEN" -s https://api.nuget.org/v3/index.json;
dotnet nuget push ElectronHostedBlazor."${TRAVIS_TAG:1}".snupkg -k "$NUGET_TOKEN" -s https://api.nuget.org/v3/index.json;
cd ../../..;
fi
deploy:
skip_cleanup: true
provider: releases
token: $GITHUB_TOKEN
file_glob: true
file:
- NodeHostEnvironment/bin/Release/*.snupkg
- NodeHostEnvironment/bin/Release/*.nupkg
- ElectronHostedBlazor/bin/Release/*.snupkg
- ElectronHostedBlazor/bin/Release/*.nupkg
overwrite: true
on:
tags: true