Skip to content

Add wokrflow to test on ubuntu-22.04, rename swift-linux.yml -> ubuntu-24.04 #284

Add wokrflow to test on ubuntu-22.04, rename swift-linux.yml -> ubuntu-24.04

Add wokrflow to test on ubuntu-22.04, rename swift-linux.yml -> ubuntu-24.04 #284

Workflow file for this run

name: Build Windows
on:
push:
branches-ignore:
- 'gh-pages'
pull_request:
branches-ignore:
- 'gh-pages'
workflow_dispatch:
defaults:
run: # Use powershell because bash is not supported: https://github.com/compnerd/gha-setup-swift/issues/18#issuecomment-1705524890
shell: pwsh
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Setup VS Dev Environment
uses: seanmiddleditch/gha-setup-vsdevenv@v5
- name: Setup
uses: compnerd/[email protected]
with:
branch: swift-6.1-release
tag: 6.1-RELEASE
- name: Compute vcpkg Triplet
id: triplet
uses: ASzc/change-string-case-action@v5
with:
string: ${{ runner.arch }}-${{ runner.os }}
- uses: actions/checkout@v3
- name: Restore Dependency Cache
id: cache
uses: actions/cache/restore@v3
with:
path: vcpkg_installed
key: vcpkg-${{ steps.triplet.outputs.lowercase }}-${{ hashFiles('vcpkg.json') }}
- name: Build and Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
env:
VCPKG_DEFAULT_TRIPLET: ${{ steps.triplet.outputs.lowercase }}
run: vcpkg install
- name: Save Dependency Cache
if: steps.cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
path: vcpkg_installed
key: vcpkg-${{ steps.triplet.outputs.lowercase }}-${{ hashFiles('vcpkg.json') }}
- name: Build SwiftCrossUI
env:
PKG_CONFIG_PATH: ${{ github.workspace }}/vcpkg_installed/${{ steps.triplet.outputs.lowercase }}/lib/pkgconfig
run: swift build --target SwiftCrossUI -v
- name: Build WinUIBackend
run: swift build --target WinUIBackend