Skip to content

Commit

Permalink
(chocolatey#3465) Build MSI on GHA
Browse files Browse the repository at this point in the history
As with the previous commit, this adds the configuration for GitHub
Actions. Thus allowing us to ensure the MSI is able to be built in
GitHub Actions as well.

When running the builds in CI, we should generate the MSI as well. This
will allow us to get an MSI for any build to test with if needed.
  • Loading branch information
corbob committed Jun 13, 2024
1 parent ca742dc commit 8c9dbed
Showing 1 changed file with 143 additions and 143 deletions.
286 changes: 143 additions & 143 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,143 +1,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
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 --shouldBuildMsi=true
- 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

0 comments on commit 8c9dbed

Please sign in to comment.