-
Notifications
You must be signed in to change notification settings - Fork 904
143 lines (140 loc) · 4.46 KB
/
build.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: Chocolatey Builds
on:
# Trigger on pushes and on pull requests
push:
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# Build using mono on Ubuntu
ubuntu-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache Tools
uses: actions/[email protected]
with:
path: tools
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
- name: Build with Mono
run: |
chmod +x build.sh
$GITHUB_WORKSPACE//build.sh --verbosity=diagnostic --target=CI --testExecutionType=unit
- name: Upload Ubuntu build results
uses: actions/upload-artifact@v3
# Always upload build results
if: ${{ always() }}
with:
name: ubuntu-build-results
path: |
code_drop/TestResults/issues-report.html
code_drop/TestResults/NUnit/TestResult.xml
code_drop/Packages/NuGet/*.nupkg
code_drop/MsBuild.log
# Build on Windows
windows-build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache Tools
uses: actions/[email protected]
with:
path: tools
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
- name: Build with .Net Framework
shell: powershell
run: ./build.ps1 --verbosity=diagnostic --target=CI --testExecutionType=unit --shouldRunOpenCover=false
- name: Upload Windows build results
uses: actions/upload-artifact@v3
# Always upload build results
if: ${{ always() }}
with:
name: windows-build-results
path: |
code_drop\TestResults\issues-report.html
code_drop\TestResults\NUnit\TestResult.xml
code_drop\TestCoverage\lcov.info
code_drop\TestCoverage\OpenCover.xml
code_drop\ilmerge-chocoexe.log
code_drop\ilmerge-chocolateydll.log
code_drop\Packages\NuGet\*.nupkg
code_drop\Packages\Chocolatey\*.nupkg
code_drop\MsBuild.log
# - uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# path-to-lcov: |
# code_drop\TestCoverage\lcov.info
# flag-name: run-${{ matrix.os }}
# parallel: true
# Build using mono on MacOS
macos-build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache Tools
uses: actions/[email protected]
with:
path: tools
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
- name: Build with Mono
run: |
chmod +x build.sh
$GITHUB_WORKSPACE//build.sh --verbosity=diagnostic --target=CI --testExecutionType=unit
- name: Upload MacOS build results
uses: actions/upload-artifact@v3
# Always upload build results
if: ${{ always() }}
with:
name: macos-build-results
path: |
code_drop/TestResults/issues-report.html
code_drop/TestResults/NUnit/TestResult.xml
code_drop/Packages/NuGet/*.nupkg
code_drop/MsBuild.log
# Build using Mono in Docker on Ubuntu
docker-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache Tools
uses: actions/[email protected]
with:
path: tools
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: docker/Dockerfile.linux
push: false
tags: chocolatey/choco:latest
build-args: |
"github_actions=true"
"github_ref=${{ github.ref }}"
"github_repository=${{ github.repository }}"
"github_base_ref=${{ github.base_ref }}"
"github_head_ref=${{ github.head_ref }}"
"github_run_number=${{ github.run_number }}"
#upload-code-coverage-results:
# needs: [ubuntu-build, windows-build, macos-build]
# runs-on: ubuntu-latest
# steps:
# - name: Coveralls Finished
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# parallel-finished: true