forked from libgit2/libgit2sharp
-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (98 loc) · 3.08 KB
/
ci.yml
File metadata and controls
98 lines (98 loc) · 3.08 KB
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
98
name: CI
on:
push:
branches: [master, release-*]
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-*'
pull_request:
workflow_dispatch:
env:
DOTNET_NOLOGO: true
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- name: Install .NET SDK
uses: actions/setup-dotnet@v1.8.1
with:
dotnet-version: 6.0.x
- name: Build
run: dotnet build LibGit2Sharp.sln --configuration Release
- name: Upload packages
uses: actions/upload-artifact@v2.2.4
with:
name: NuGet packages
path: bin/Packages/
retention-days: 7
test:
name: Test / ${{ matrix.os }} / ${{ matrix.arch }} / ${{ matrix.tfm }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
arch: [ amd64 ]
os: [windows-2019, macos-10.15]
tfm: [ net472, netcoreapp3.1, net6.0 ]
exclude:
- os: macos-10.15
tfm: net472
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- name: Install .NET SDK
uses: actions/setup-dotnet@v1.8.1
with:
dotnet-version: 6.0.x
- name: Install .NET Core 3.1 runtime
if: matrix.tfm == 'netcoreapp3.1'
uses: actions/setup-dotnet@v1.8.1
with:
dotnet-version: 3.1.x
- name: Run ${{ matrix.tfm }} tests
run: dotnet test LibGit2Sharp.sln --configuration Release --framework ${{ matrix.tfm }} --logger "GitHubActions" /p:ExtraDefine=LEAKS_IDENTIFYING
test-linux:
name: Test / ${{ matrix.distro }} / ${{ matrix.arch }} / ${{ matrix.tfm }}
runs-on: ubuntu-20.04
strategy:
matrix:
arch: [ amd64 ]
# arch: [ amd64, arm64 ]
distro: [ alpine.3.12, alpine.3.13, alpine.3.14, centos.7, centos.8, debian.9, debian.10, debian.11, fedora.33, ubuntu.18.04, ubuntu.20.04 ]
sdk: [ '6.0', '3.1' ]
exclude:
- arch: arm64
distro: alpine.3.12
- arch: arm64
distro: alpine.3.13
sdk: '3.1'
- arch: arm64
distro: alpine.3.14
sdk: '3.1'
- arch: arm64
distro: centos.7
include:
- sdk: '6.0'
tfm: net6.0
- sdk: '3.1'
tfm: netcoreapp3.1
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- name: Setup QEMU
if: matrix.arch == 'arm64'
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
- name: Run ${{ matrix.tfm }} tests
run: |
test_command="dotnet test LibGit2Sharp.sln --configuration Release -p:TargetFrameworks=${{ matrix.tfm }} --logger "GitHubActions" -p:ExtraDefine=LEAKS_IDENTIFYING"
docker run -t --rm --platform linux/${{ matrix.arch }} -v "$PWD:/app" gittools/build-images:${{ matrix.distro }}-sdk-${{ matrix.sdk }} sh -c "$test_command"