-
Notifications
You must be signed in to change notification settings - Fork 954
124 lines (121 loc) · 4.08 KB
/
Copy pathbuild.yml
File metadata and controls
124 lines (121 loc) · 4.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
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
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/cache@v4
with:
path: tools
key: ${{ runner.os }}-tools-${{ hashFiles('recipe.cake') }}
- name: Install Mono
run: |
sudo apt install ca-certificates gnupg
sudo gpg --homedir /tmp --no-default-keyring --keyring /usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install -y mono-complete
mono --version
- 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@v4
# 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-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache Tools
uses: actions/cache@v4
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 --shouldBuildMsi=true
- name: Upload Windows build results
uses: actions/upload-artifact@v4
# 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
code_drop\MSIs\en-US\chocolatey-*.msi
# Build using mono on MacOS
macos-build:
runs-on: macos-14
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache Tools
uses: actions/cache@v4
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@v4
# 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: 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