Skip to content

Experiment-Windows

Experiment-Windows #6

Workflow file for this run

name: Experiment-Windows
on:
workflow_dispatch: # manually-triggered runs
permissions:
# only allowed to read source code (ref. https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs)
contents: read
concurrency:
# cancel pending runs when a PR gets updated
group: "${{ github.head_ref || github.run_id }}-${{ github.actor }}"
cancel-in-progress: true
jobs:
build:
name: "X-Win - ${{ matrix.name }}"
strategy:
matrix:
include:
#TODO(later)
#- name: "Ubuntu ARM64"
# os:
# - ARM64
# - linux
# - Ubuntu
# env:
# OS: "linux"
# NUGET_RID: "linux-arm64"
#- name: "Ubuntu x64"
# os:
# - X64
# - linux
# - Ubuntu
# env:
# OS: "linux"
# NUGET_RID: "linux-x64"
# NUGET_PACK_DOTNET_LIB: "1"
#- name: "MacOS ARM64"
# os: macos-14
# env:
# OS: "apple"
# NUGET_RID: "osx"
- name: "Windows x64"
os: windows-latest
env:
OS: "windows"
NUGET_RID: "win-x64"
runs-on: "${{ matrix.os }}"
defaults:
run:
shell: "${{ matrix.env.OS == 'windows' && 'pwsh' || 'bash' }}"
env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
VCPKG_DISABLE_METRICS: 1
NUGET_BASE_VERSION: "0.0"
SCRIPT_EXT: "${{ matrix.env.OS == 'windows' && 'ps1' || 'sh' }}"
ROYALVNC_BUILD_DEBUG: 0
SWIFT_VERSION: "6.0"
steps:
- name: checkout
uses: actions/checkout@v4
# setup build environment
- name: setup environment (Apple)
if: "success() && matrix.env.OS == 'apple'"
run: |
sudo xcode-select --switch /Applications/Xcode_16.0.app
- name: setup VC++ environment (Windows)
if: "success() && matrix.env.OS == 'windows'"
uses: compnerd/gha-setup-vsdevenv@v6
- name: setup Swift (Windows)
if: "success() && matrix.env.OS == 'windows'"
uses: compnerd/gha-setup-swift@v0.2.3
with:
branch: "swift-${{ env.SWIFT_VERSION }}-release"
tag: "${{ env.SWIFT_VERSION }}-RELEASE"
# setup dependencies
- name: dependencies
if: "success() && matrix.env.OS == 'windows'"
run: |
Scripts/windows/dependencies.ps1
# build RoyalVNCKit
- name: build RoyalVNCKit
run: |
swift package clean --configuration "release"
swift build --configuration "release"
# .NET bindings and NuGet package artifacts
- name: build .NET bindings
run: |
dotnet build "Bindings/dotnet/RoyalApps.RoyalVNCKit.sln" -c Release