-
Notifications
You must be signed in to change notification settings - Fork 63
97 lines (97 loc) · 2.81 KB
/
ci.yml
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
name: CI
on:
push:
branches: [master, release-*]
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-*'
pull_request:
workflow_dispatch:
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
env:
RID: ${{ matrix.name }}
strategy:
matrix:
include:
- os: windows-2019
name: win-x86
param: -x86
- os: windows-2019
name: win-x64
param: -x64
- os: windows-2019
name: win-arm64
param: -arm64
- os: ubuntu-20.04
name: linux-x64
- os: ubuntu-20.04
name: linux-musl-x64
- os: ubuntu-20.04
name: linux-arm64
- os: ubuntu-20.04
name: linux-musl-arm
- os: ubuntu-20.04
name: linux-musl-arm64
- os: ubuntu-20.04
name: linux-arm
- os: macos-10.15
name: osx-x64
- os: macos-11
name: osx-arm64
fail-fast: false
steps:
- name: Checkout
uses: actions/[email protected]
with:
submodules: true
- name: Build Windows
if: runner.os == 'Windows'
run: ./build.libgit2.ps1 ${{ matrix.param }}
- name: Build macOS
if: runner.os == 'macOS'
run: ./build.libgit2.sh
- name: Setup QEMU
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
if: matrix.name == 'linux-arm' || matrix.name == 'linux-arm64' || matrix.name == 'linux-musl-arm' || matrix.name == 'linux-musl-arm64'
- name: Build Linux
if: runner.os == 'Linux'
run: ./dockerbuild.sh
- name: Upload artifacts
uses: actions/[email protected]
with:
name: ${{ matrix.name }}
path: nuget.package/runtimes/${{ matrix.name }}
package:
name: Create package
needs: build
runs-on: windows-2019
env:
DOTNET_NOLOGO: true
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup .NET SDK
uses: actions/[email protected]
with:
dotnet-version: 7.0.x
- name: Install MinVer
run: dotnet tool install --global minver-cli
- name: Run MinVer
id: minver
run: echo "version=$(minver)" >> $env:GITHUB_OUTPUT
- name: Download artifacts
uses: actions/[email protected]
with:
path: nuget.package/runtimes/
- name: Create package
run: ./nuget.exe Pack nuget.package/NativeBinaries.nuspec -Version ${{ steps.minver.outputs.version }} -NoPackageAnalysis
- name: Upload NuGet package
uses: actions/[email protected]
with:
name: NuGet package
path: ./*.nupkg