-
Notifications
You must be signed in to change notification settings - Fork 6
169 lines (164 loc) · 5.1 KB
/
build.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
167
168
169
name: Build
on:
push:
paths-ignore:
- 'samples/**'
- '**.js'
- '**.md'
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build_all:
strategy:
matrix:
include:
- os: macos-latest
target: osx-x64
install_deps: false
- os: ubuntu-latest
target: linux-x64
install_deps: true
- os: windows-latest
target: win-x64
install_deps: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
- run: git fetch --prune --unshallow --tags
- uses: actions/cache@v1
id: cache
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-build-aot
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.100
- name: install pre-req
if: ${{ matrix.install_deps }}
run: sudo apt-get install clang zlib1g-dev libkrb5-dev libssl-dev libgc-dev
- name: Install GitVersion
run: dotnet tool install --global --version 5.6.7 GitVersion.Tool
- name: Restore dependencies
run: dotnet restore
- name: AOT build (VM)
run: dotnet publish -r ${{ matrix.target }} -c Release --self-contained --output ./../../out
working-directory: ./runtime/ishtar.vm
- name: Build (Compiler)
run: dotnet publish -r ${{ matrix.target }} -c Release --self-contained --output ./../out
working-directory: ./compiler/
- name: Build (Installer)
run: dotnet publish -r ${{ matrix.target }} -c Release --self-contained --output ./../out
working-directory: ./installer/
- name: Upload artifacts
uses: actions/[email protected]
with:
name: ${{ matrix.target }}-build
path: ./out
if-no-files-found: error
build_linux_arm64:
runs-on: ubuntu-20.04
needs: [coverage]
container: { image: 'ghcr.io/vein-lang/ubuntu18.04-with-crossroot-arm64:latest' }
steps:
- uses: actions/checkout@v2
with:
submodules: true
- run: git fetch --prune --unshallow --tags
- uses: actions/cache@v1
id: cache
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-linux-arm64
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.100
- name: Install GitVersion
run: dotnet tool install --global --version 5.6.7 GitVersion.Tool
- name: Restore dependencies
run: dotnet restore
- name: AOT build
run: dotnet publish -r linux-arm64 -c Release -p:CppCompilerAndLinker=clang-9 -p:SysRoot=/.tools/rootfs/arm64
working-directory: ./runtime/ishtar.vm
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: linux-arm64-build
path: ./runtime/ishtar.vm/bin/Release/net6.0/linux-arm64/native
if-no-files-found: error
build_win_arm64:
runs-on: windows-latest
needs: [coverage]
steps:
- uses: actions/checkout@v2
with:
submodules: true
- run: git fetch --prune --unshallow --tags
- uses: actions/cache@v1
id: cache
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-win-arm64
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.100
- name: Restore dependencies
run: dotnet restore
- name: AOT build
run: dotnet publish -r win-arm64 -c Release
working-directory: ./runtime/ishtar.vm
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: win-arm64-build
path: ./runtime/ishtar.vm/bin/Release/net6.0/win-arm64/native
if-no-files-found: error
coverage:
runs-on: windows-latest
needs: [build_all]
env:
COMPlus_StressLog: 1
COMPlus_LogLevel: 6
COMPlus_LogFacility: 0x00080001
COMPlus_StressLogSize: 2000000
COMPlus_TotalStressLogSize: 40000000
steps:
- name: Export Env
run: $env:CODACY_PROJECT_TOKEN="${{ secrets.CODACY_API_KEY }}"
- uses: actions/checkout@v2
with:
submodules: true
- run: git fetch --prune --unshallow --tags
- uses: actions/cache@v1
id: cache
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-common
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.100
- name: Install DotCover
run: dotnet tool install --global JetBrains.dotCover.GlobalTool --version 2021.2.0-eap03
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet dotcover test --no-build --dcReportType=DetailedXml
- name: Codacy Coverage Reporter
uses: codacy/[email protected]
with:
project-token: ${{ secrets.CODACY_API_KEY }}
coverage-reports: dotCover.Output.xml
- name: Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: dotCover.Output.xml