-
Notifications
You must be signed in to change notification settings - Fork 0
156 lines (154 loc) · 4.63 KB
/
test.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
name: Test
on:
push:
branches:
- master
jobs:
macos_x64:
name: MacOS (x64)
runs-on: macos-11
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Dotnet
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Restore Tools
run: dotnet tool restore
- name: Paket Restore
run: dotnet paket restore
- name: Build Native
run: ./buildnative.sh
- name: Build
run: dotnet build src/Assembler.sln
- name: Test
run: dotnet test -l "console;verbosity=detailed" --no-build --nologo
- name: Upload MacOS native libs
uses: actions/upload-artifact@v4
with:
name: mac_x64
path: libs/Native/Aardvark.Assembler/mac/AMD64/
macos_m1:
name: MacOS (M1)
runs-on: macos-11
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Native
run: ./buildnative.sh arm64
- name: Upload MacOS native libs
uses: actions/upload-artifact@v4
with:
name: mac_m1
path: libs/Native/Aardvark.Assembler/mac/ARM64/
linux:
name: Linux (x64)
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Dotnet
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Restore Tools
run: dotnet tool restore
- name: Paket Restore
run: dotnet paket restore
- name: Build Native
run: ./buildnative.sh
- name: Build
run: dotnet build src/Assembler.sln
- name: Test
run: dotnet test -l "console;verbosity=detailed" --no-build --nologo
- name: Upload Linux native libs
uses: actions/upload-artifact@v4
with:
name: linux_x64
path: libs/Native/Aardvark.Assembler/linux/AMD64/
windows:
name: Windows (x64)
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Dotnet
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Restore Tools
run: dotnet tool restore
- name: Paket Restore
run: dotnet paket restore
- name: Build Native
run: .\buildnative.cmd
- name: Build
run: dotnet build src\Assembler.sln
- name: Test
run: dotnet test -l "console;verbosity=detailed" --no-build --nologo
- name: Upload Windows native libs
uses: actions/upload-artifact@v4
with:
name: windows_x64
path: libs/Native/Aardvark.Assembler/windows/AMD64/
pack:
name: Pack
runs-on: windows-latest
needs:
- linux
- windows
- macos_x64
- macos_m1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download MacOS dependencies (x64)
uses: actions/download-artifact@v4
with:
name: mac_x64
path: libs/Native/Aardvark.Assembler/mac/AMD64/
- name: Download MacOS dependencies (arm64)
uses: actions/download-artifact@v4
with:
name: mac_m1
path: libs/Native/Aardvark.Assembler/mac/ARM64/
- name: Download Linux dependencies
uses: actions/download-artifact@v4
with:
name: linux_x64
path: libs/Native/Aardvark.Assembler/linux/AMD64/
- name: Download Windows dependencies
uses: actions/download-artifact@v4
with:
name: windows_x64
path: libs/Native/Aardvark.Assembler/windows/AMD64/
- name: Install Dotnet
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Restore Tools
run: dotnet tool restore
- name: Paket Restore
run: dotnet paket restore
- name: Build
run: dotnet build src\Assembler.sln
- name: Pack
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: dotnet aardpack src\Assembler.sln --notag
- name: Upload Packages
uses: actions/upload-artifact@v4
with:
name: packages
path: bin\pack
- name: GitHub Packages
env:
NUGET_KEY: ${{ secrets.GITHUB_TOKEN }}
shell: cmd
run: dotnet nuget push "bin\pack\*.nupkg" -k %NUGET_KEY% -s "https://nuget.pkg.github.com/aardvark-community/index.json" --skip-duplicate
- name: NuGet
env:
NUGET_KEY: ${{ secrets.NUGET_KEY }}
shell: cmd
run: dotnet nuget push "bin\pack\*.nupkg" -k %NUGET_KEY% -s "https://api.nuget.org/v3/index.json" --skip-duplicate