Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jobily
Libgit2sharp
提交
4daf6189
L
Libgit2sharp
项目概览
jobily
/
Libgit2sharp
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
Libgit2sharp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
4daf6189
编写于
11月 14, 2021
作者:
B
Brandon Ording
提交者:
GitHub
11月 14, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1921 from arturcic/feature/test-native
Test native libraries using docker for multiple distros
上级
abdd8fbf
b90a6a9c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
70 addition
and
25 deletion
+70
-25
.github/workflows/ci.yml
.github/workflows/ci.yml
+69
-24
LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj
LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj
+1
-1
未找到文件。
.github/workflows/ci.yml
浏览文件 @
4daf6189
...
...
@@ -11,17 +11,36 @@ env:
DOTNET_NOLOGO
:
true
jobs
:
build
:
name
:
${{ matrix.name }}
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
:
include
:
-
os
:
windows-2019
name
:
Windows
-
os
:
ubuntu-20.04
name
:
Linux
arch
:
[
amd64
]
os
:
[
windows-2019
,
macos-10.15
]
tfm
:
[
net472
,
netcoreapp3.1
,
net5.0
,
net6.0
]
exclude
:
-
os
:
macos-10.15
name
:
macOS
tfm
:
net472
fail-fast
:
false
steps
:
-
name
:
Checkout
...
...
@@ -33,28 +52,54 @@ jobs:
with
:
dotnet-version
:
6.0.x
-
name
:
Install .NET 5 runtime
if
:
matrix.tfm == 'net5.0'
uses
:
actions/setup-dotnet@v1.8.1
with
:
dotnet-version
:
5.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
:
Build
run
:
dotnet build LibGit2Sharp.sln --configuration Release
-
name
:
Upload packages
if
:
matrix.name == 'Windows'
uses
:
actions/upload-artifact@v2.2.4
-
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'
,
'
5.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
:
'
5.0'
tfm
:
net5.0
-
sdk
:
'
3.1'
tfm
:
netcoreapp3.1
fail-fast
:
false
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v2.3.4
with
:
name
:
NuGet packages
path
:
bin/Packages/
retention-days
:
7
-
name
:
Run net472 tests
if
:
matrix.name == 'Windows'
run
:
dotnet test LibGit2Sharp.sln --configuration Release --no-restore --framework net472 --logger "GitHubActions" /p:ExtraDefine=LEAKS_IDENTIFYING
-
name
:
Run netcoreapp3.1 tests
run
:
dotnet test LibGit2Sharp.sln --configuration Release --no-restore --framework netcoreapp3.1 --logger "GitHubActions" /p:ExtraDefine=LEAKS_IDENTIFYING
-
name
:
Run net5.0 tests
run
:
dotnet test LibGit2Sharp.sln --configuration Release --no-restore --framework net5.0 --logger "GitHubActions" /p:ExtraDefine=LEAKS_IDENTIFYING
-
name
:
Run net6.0 tests
run
:
dotnet test LibGit2Sharp.sln --configuration Release --no-restore --framework net6.0 --logger "GitHubActions" /p:ExtraDefine=LEAKS_IDENTIFYING
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"
LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj
浏览文件 @
4daf6189
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<TargetFrameworks
Condition="'$(TargetFrameworks)'==''"
>net472;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录