Skip to content

Update to .NET 8 SDK #195

Update to .NET 8 SDK

Update to .NET 8 SDK #195

Workflow file for this run

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
permissions:
contents: read
actions: read
checks: write # Required by test-reporter
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@v4
with:
fetch-depth: 0
# On the Mac build machines, libssl 1.1 is not installed
# but is required for some .NET crypto algorithms.
- name: Install libssl on Mac OS
run: |
brew install openssl@1.1
brew info openssl
ln -sfn $(brew --prefix)/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@v4
with:
dotnet-version: |
8.0.x
- name: Use global.json dotnet version
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- uses: actions/setup-node@v4
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 8
run: npm run test-cs -- --release --serial --framework net8.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