-
Notifications
You must be signed in to change notification settings - Fork 17
97 lines (78 loc) · 2.64 KB
/
pr-build.yaml
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
name: SSH Build & Test
on:
pull_request:
branches:
- main
workflow_dispatch: # Enable manually starting a build, with optional input parameters
inputs:
debug_enabled:
type: boolean
description: 'Start an SSH debug session as the last step of the build'
required: false
default: false
jobs:
builds:
strategy:
fail-fast: false
matrix:
os: [macOS-latest, windows-latest]
name: Build SSH on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
# On the Mac build machines, libssl 1.1 is installed
# but not linked in the path expected by .NET. Fix it now.
- name: Link libssl on Mac OS
run: ln -sn /usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib /usr/local/lib/libssl.1.1.dylib
if: matrix.os == 'macOS-latest'
- name: Install dotnet versions
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
3.1.x
6.0.x
- name: Use global.json dotnet version
uses: actions/setup-dotnet@v2
with:
global-json-file: global.json
- uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: Restore npm packages
run: npm install
- name: Restore dotnet packages
run: dotnet restore
- name: Build TypeScript packages
run: npm run build-ts -- --release
- name: Build dotnet packages
run: dotnet build -c Release --no-restore
- name: Pack TypeScript packages
run: npm run pack-ts
- name: Pack dotnet packages
run: dotnet pack -c Release --no-restore
- name: Test TypeScript
run: npm run test-ts
continue-on-error: true
- name: Test .NET Core 3.1
run: npm run test-cs -- --release --serial --framework netcoreapp3.1
continue-on-error: true
- name: Test .NET 6
run: npm run test-cs -- --release --serial --framework net6.0
continue-on-error: true
- name: Test .NET Framework 4.8
if: matrix.os == 'windows-latest'
run: npm run test-cs -- --release --serial --framework net48
continue-on-error: true
- name: Start SSH debug session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
with:
limit-access-to-actor: true
- name: Publish test results
uses: dorny/test-reporter@v1
with:
name: Test SSH on ${{ matrix.os }}
path: out/TestResults/*.trx
reporter: dotnet-trx