Skip to content

Assorted minor improvements for 1.0.0-alpha09 (#126) #252

Assorted minor improvements for 1.0.0-alpha09 (#126)

Assorted minor improvements for 1.0.0-alpha09 (#126) #252

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: MSBuild
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: .\Fahrenheit.slnx
# Configuration type to build.
# You can convert this to a build matrix if you need coverage of multiple configuration types.
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: release
# https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-packages?pivots=windows-runner
# VCPKG binary caching setup
USERNAME: fahrenheit-crew
FEED_URL: https://nuget.pkg.github.com/fahrenheit-crew/index.json
VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/fahrenheit-crew/index.json,readwrite"
# packages permission is for NuGet caching of Detours/nethost build artifacts, https://learn.microsoft.com/en-us/vcpkg/consume/binary-caching-github-packages?pivots=windows-runner
permissions:
contents: write
packages: write
jobs:
build:
env:
GH_TOKEN: ${{ github.token }}
strategy:
matrix:
architecture: [ x86 ]
os: [ windows ]
runs-on: ${{ matrix.os }}-2025-vs2026
steps:
- name: Print runner environment
run: env
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set up MSBuild
uses: microsoft/setup-msbuild@v2
- name: Bootstrap vcpkg
shell: pwsh
run: |
cd "$VCPKG_INSTALLATION_ROOT"
bootstrap-vcpkg.bat -disableMetrics
- name: Integrate vcpkg
shell: pwsh
run: |
cd "$VCPKG_INSTALLATION_ROOT"
vcpkg integrate install
- name: Add NuGet sources
shell: pwsh
run: |
cd "$VCPKG_INSTALLATION_ROOT"
.$(vcpkg fetch nuget) `
sources add `
-Source "${{ env.FEED_URL }}" `
-StorePasswordInClearText `
-Name GitHubPackages `
-UserName "${{ env.USERNAME }}" `
-Password "${{ secrets.GITHUB_TOKEN }}"
.$(vcpkg fetch nuget) `
setapikey "${{ secrets.GITHUB_TOKEN }}" `
-Source "${{ env.FEED_URL }}"
# Compensate for https://github.com/NuGet/Home/issues/14113
- name: Restore NuGet packages
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: msbuild /m /p:Configuration=${{ env.BUILD_CONFIGURATION }} /t:Restore ${{ env.SOLUTION_FILE_PATH }}
- name: Build
working-directory: ${{ env.GITHUB_WORKSPACE }}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /m /p:Configuration=${{ env.BUILD_CONFIGURATION }} ${{ env.SOLUTION_FILE_PATH }}
- name: Publish
working-directory: ${{ env.GITHUB_WORKSPACE }}
run: msbuild /m /p:Configuration=${{ env.BUILD_CONFIGURATION }} /t:Publish ${{ env.SOLUTION_FILE_PATH }}