1+ name : Build master
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ build :
7+ strategy :
8+ matrix :
9+ os : [ubuntu-latest, windows-latest, macOS-latest]
10+ runs-on : ${{ matrix.os }}
11+
12+ steps :
13+ # Side by side workaround: https://github.com/actions/setup-dotnet/issues/25#issuecomment-646925506
14+ - uses : actions/checkout@v2
15+ - name : Use .NET Core 2.1 SDK
16+ uses : actions/setup-dotnet@v1
17+ with :
18+ dotnet-version : ' 2.1.x'
19+ - name : Use .NET Core 3.1 SDK
20+ uses : actions/setup-dotnet@v1
21+ with :
22+ dotnet-version : ' 3.1.x'
23+ - name : Use .NET Core 5.0 SDK
24+ uses : actions/setup-dotnet@v1
25+ with :
26+ dotnet-version : ' 5.0.100-preview.7.20366.6'
27+ - name : .NET Side-by-side
28+ shell : pwsh
29+ run : |
30+ $version = Split-Path (Split-Path $ENV:DOTNET_ROOT -Parent) -Leaf;
31+ $root = Split-Path (Split-Path $ENV:DOTNET_ROOT -Parent) -Parent;
32+ $directories = Get-ChildItem $root | Where-Object { $_.Name -ne $version };
33+ foreach ($dir in $directories) {
34+ $from = $dir.FullName;
35+ $to = "$root/$version";
36+ Write-Host Copying from $from to $to;
37+ Copy-Item "$from\*" $to -Recurse -Force;
38+ }
39+
40+ - name : Build
41+ if : runner.os != 'Windows'
42+ run : |
43+ chmod +x ./build.sh
44+ ./build.sh RunFableTests
45+ env :
46+ # Work around https://github.com/actions/setup-dotnet/issues/29
47+ DOTNET_ROOT : ${{ runner.tool_cache }}/dncs/${{ matrix.dotnet }}/x64
48+ CI : true
49+ - name : Build
50+ if : runner.os == 'Windows'
51+ run : ./build.cmd RunFableTests
52+ env :
53+ # Work around https://github.com/actions/setup-dotnet/issues/29
54+ DOTNET_ROOT : ${{ runner.tool_cache }}/dncs/${{ matrix.dotnet }}/x64
55+ CI : true
0 commit comments