Skip to content
This repository was archived by the owner on Mar 14, 2024. It is now read-only.

Commit 35843f7

Browse files
authored
Merge pull request #55 from Kryptos-FR/CI
Add CI workflow
2 parents 205ca9b + aa277b9 commit 35843f7

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed

.github/workflows/main.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- main
8+
pull_request:
9+
types: [opened, synchronize, reopened, ready_for_review]
10+
workflow_dispatch:
11+
12+
jobs:
13+
Setup:
14+
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event.pull_request.draft == false }}
15+
runs-on: ubuntu-latest
16+
steps:
17+
- run: exit 0
18+
19+
Build-Core:
20+
needs: Setup
21+
runs-on: windows-latest
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
dotnet-version: ['3.1', '5.0']
26+
build-type: ['Debug', 'Release']
27+
include:
28+
- dotnet-version: '3.1'
29+
framework: 'netcoreapp3.1'
30+
- dotnet-version: '5.0'
31+
framework: 'net5.0-windows'
32+
steps:
33+
- uses: actions/checkout@v3
34+
with:
35+
fetch-depth: 2
36+
submodules: recursive
37+
- name: Setup .NET
38+
uses: actions/setup-dotnet@v3
39+
with:
40+
dotnet-version: ${{ matrix.dotnet-version }}
41+
- name: Build Solution
42+
run: |
43+
dotnet build src/Markdig.Wpf.sln `
44+
--configuration ${{ matrix.build-type }} `
45+
--framework ${{ matrix.framework }}
46+
47+
Build-Framework:
48+
needs: Setup
49+
runs-on: windows-2019
50+
strategy:
51+
fail-fast: false
52+
matrix:
53+
build-type: ['Debug', 'Release']
54+
include:
55+
- framework: 'net452'
56+
steps:
57+
- uses: actions/checkout@v3
58+
with:
59+
fetch-depth: 2
60+
submodules: recursive
61+
- name: Setup MSBuild
62+
uses: microsoft/setup-msbuild@v1
63+
- name: Setup NuGet
64+
uses: NuGet/setup-nuget@v1
65+
- name: Restore packages
66+
run: |
67+
nuget restore src/Markdig.Wpf.sln
68+
- name: Build Solution
69+
run: |
70+
msbuild src/Markdig.Wpf.sln `
71+
-target:Build `
72+
-property:Configuration=${{ matrix.build-type }} `
73+
-property:TargetFramework=${{ matrix.framework }}

0 commit comments

Comments
 (0)