Skip to content

Commit

Permalink
[windows] add experimental CI support
Browse files Browse the repository at this point in the history
Manual trigger only, for testing `try-windows` branch.

For now, just build `libtom{crypt,math}` dependencies on Windows; later, perhaps hook them up to Swift. The latter steps would fail and that's expected.
  • Loading branch information
nil4 committed Oct 21, 2024
1 parent 23474f9 commit c2621e0
Showing 1 changed file with 109 additions and 0 deletions.
109 changes: 109 additions & 0 deletions .github/workflows/x-win.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
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/[email protected]
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

0 comments on commit c2621e0

Please sign in to comment.