mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-25 19:49:43 +08:00
71 lines
2.3 KiB
YAML
71 lines
2.3 KiB
YAML
name: .NET
|
|
|
|
on:
|
|
push:
|
|
branches: [ master, develop ]
|
|
pull_request:
|
|
branches: [ master, develop ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
# os: [ windows-latest, macOS-latest, ubuntu-latest ]
|
|
os: [ windows-latest ]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Setup .NET 5
|
|
uses: actions/setup-dotnet@v1
|
|
with:
|
|
dotnet-version: 5.0.x
|
|
- name: Setup .NET 6
|
|
uses: actions/setup-dotnet@v1
|
|
with:
|
|
dotnet-version: 6.0.100-preview.6.21355.2
|
|
|
|
- name: Install macOS SDK(macOS)
|
|
if: matrix.os == 'macOS-latest'
|
|
run: sudo dotnet workload install microsoft-macos-sdk-full
|
|
|
|
- name: Install macOS SDK(Windows)
|
|
if: matrix.os == 'windows-latest'
|
|
run: dotnet workload install microsoft-macos-sdk-full
|
|
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
- name: Checkout submodules
|
|
run: git submodule update --init --recursive
|
|
|
|
- name: dotnet info
|
|
run: dotnet --info
|
|
|
|
- name: dotnet restore SteamToolsV2+.sln
|
|
if: matrix.os == 'windows-latest'
|
|
run: dotnet restore ./SteamToolsV2+.sln
|
|
|
|
- name: dotnet restore SteamToolsV2+.Linux.sln
|
|
if: matrix.os == 'ubuntu-latest'
|
|
run: dotnet restore ./SteamToolsV2+.Linux.slnf
|
|
|
|
- name: dotnet restore SteamToolsV2+.Mac.sln
|
|
if: matrix.os == 'macOS-latest'
|
|
run: dotnet restore ./SteamToolsV2+.Mac.slnf
|
|
|
|
- name: dotnet AvaloniaApp build
|
|
run: dotnet build ./src/ST.Client.Desktop.Avalonia.App/ST.Client.Desktop.Avalonia.App.csproj
|
|
- name: dotnet CommonUnit build
|
|
run: dotnet build ./tests/Common.UnitTest/Common.UnitTest.csproj
|
|
- name: dotnet ST.Client.UnitTest build
|
|
run: dotnet build ./tests/ST.Client.UnitTest/ST.Client.UnitTest.csproj
|
|
- name: dotnet ST.Client.Desktop.UnitTest build
|
|
run: dotnet build ./tests/ST.Client.Desktop.UnitTest/ST.Client.Desktop.UnitTest.csproj
|
|
|
|
- name: dotnet CommonUnit test
|
|
run: dotnet test ./tests/Common.UnitTest/Common.UnitTest.csproj
|
|
- name: dotnet ST.Client.UnitTest test
|
|
run: dotnet test ./tests/ST.Client.UnitTest/ST.Client.UnitTest.csproj
|
|
- name: dotnet ST.Client.Desktop.UnitTest test
|
|
if: matrix.os != 'windows-latest'
|
|
run: dotnet test ./tests/ST.Client.Desktop.UnitTest/ST.Client.Desktop.UnitTest.csproj
|