-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[windows] add experimental CI support
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
Showing
1 changed file
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
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 |