-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.travis.yml
40 lines (38 loc) · 1.79 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
language: csharp
mono: none
dist: focal
dotnet: 5.0
addons:
apt:
packages:
- dotnet-sdk-3.1
env:
global:
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
- DOTNET_CLI_TELEMETRY_OPTOUT=1
install:
- dotnet restore
- dotnet build -c Release
script:
- dotnet test test/Lachain.UtilityTest
- dotnet test test/Lachain.CryptoTest
- dotnet test test/Lachain.ConsensusTest
- dotnet test test/Lachain.StorageTest
- dotnet test test/Lachain.CoreTest
before_deploy:
- dotnet publish -p:Configuration=Release -p:PublishTrimmed=true -p:SelfContained=true -p:PublishSingleFile=true -p:TrimUnusedDependencies=true -p:IncludeNativeLibrariesForSelfExtract=true -p:IncludeAllContentForSelfExtract=true --runtime linux-x64 src/Lachain.Console/Lachain.Console.csproj
- dotnet publish -p:Configuration=Release -p:PublishTrimmed=true -p:SelfContained=true -p:PublishSingleFile=true -p:TrimUnusedDependencies=true -p:IncludeNativeLibrariesForSelfExtract=true -p:IncludeAllContentForSelfExtract=true --runtime win-x64 src/Lachain.Console/Lachain.Console.csproj
- dotnet publish -p:Configuration=Release -p:PublishTrimmed=true -p:SelfContained=true -p:PublishSingleFile=true -p:TrimUnusedDependencies=true -p:IncludeNativeLibrariesForSelfExtract=true -p:IncludeAllContentForSelfExtract=true --runtime osx-x64 src/Lachain.Console/Lachain.Console.csproj
- mkdir build
- cp src/Lachain.Console/bin/Release/net5.0/linux-x64/publish/Lachain.Console build/lachain-linux-x64
- cp src/Lachain.Console/bin/Release/net5.0/osx-x64/publish/Lachain.Console build/lachain-osx-x64
- cp src/Lachain.Console/bin/Release/net5.0/win-x64/publish/Lachain.Console.exe build/lachain-win-x64.exe
deploy:
provider: releases
api_key: "$GITHUB_TOKEN"
file_glob: true
file: build/*
skip_cleanup: true
draft: true
on:
tags: true