-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
86 lines (86 loc) · 2.3 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
sudo: required
jobs:
include:
- stage: Build
os: linux
language: go
go: 1.17.3
script:
- go get -d -v ./...
- go build -o lib/linux-x64/libhub.so -buildmode=c-shared embedded_hub.go
workspaces:
create:
name: bin_linux
paths:
- lib/linux-x64
- stage: Build
os: osx
language: go
go: 1.17.3
script:
- go get -d -v ./...
- go build -o lib/osx-x64/libhub.dylib -buildmode=c-shared embedded_hub.go
workspaces:
create:
name: bin_osx
paths:
- lib/osx-x64
- stage: Build
os: windows
language: go
go: 1.17.3
script:
- go get -d -v ./...
- go build -o lib/win-x64/libhub.dll -buildmode=c-shared embedded_hub.go
workspaces:
create:
name: bin_win
paths:
- lib/win-x64
- stage: Nuget_build
language: csharp
dotnet: 5.0
mono: none
dist: focal
addons:
apt:
packages:
- dotnet-sdk-3.1
- nuget
workspaces:
use:
- bin_linux
- bin_osx
- bin_win
env:
global:
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
- DOTNET_CLI_TELEMETRY_OPTOUT=1
install:
- dotnet restore Lachain.CommunicationHub.Net
- dotnet build -c Release Lachain.CommunicationHub.Net
script:
- tar -xvf ${TRAVIS_HOME}/.casher/bin_osx-fetch.tgz
- mv Users/travis/gopath/src/github.com/LATOKEN/lachain-communication-hub/lib
.
- mv C:/Users/travis/gopath/src/github.com/LATOKEN/lachain-communication-hub/lib/win-x64
lib
- mv lib/win-x64/libhub.dll lib/win-x64/hub.dll
- mv /home/travis/gopath/src/github.com/LATOKEN/lachain-communication-hub/lib/linux-x64
lib
- nuget pack Lachain.CommunicationHub.Native.nuspec
- dotnet nuget push Lachain.CommunicationHub.Native.*.nupkg -k $NUGETKEY -s https://api.nuget.org/v3/index.json --timeout 600 --skip-duplicate
- cd Lachain.CommunicationHub.Net/
- dotnet build Lachain.CommunicationHub.Net.sln
- dotnet pack Lachain.CommunicationHub.Net.csproj
deploy:
provider: releases
api_key: "$GITHUB_TOKEN1"
file_glob: true
file:
- ../Lachain.CommunicationHub.Native.*nupkg
- bin/Debug/Lachain.CommunicationHub.Net*.nupkg
skip_cleanup: true
draft: true
on:
tags: true