Merge pull request #3796 from alexaveldanez/image-urls-support #3333
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
- 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 | |
# 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 |