-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
80 lines (62 loc) · 2.9 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
pr:
- master
jobs:
- job: macOS
pool:
vmImage: 'macOS-latest'
steps:
- bash: 'brew install pkg-config'
- bash: 'brew install libpng'
- bash: 'sudo xcode-select -s /Applications/Xcode_14.0.app/Contents/Developer'
- bash: 'swift --version'
- bash: 'swift test'
- job: Linux
container:
image: swift:5.5.0
options: "--name ci-container -v /usr/bin/docker:/tmp/docker:ro"
pool:
vmImage: ubuntu-latest
steps:
- bash: 'swift --version'
- bash: 'swift test'
- job: Windows
pool:
vmImage: 'windows-2019'
steps:
- script: |
@REM Following snippet derived from: https://gist.github.com/devhawk/2d8cb579f179ed659e3862c860d846d6
echo on
set vswherepath="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
for /f "usebackq delims=" %%i in (`%vswherepath% -latest -property installationPath`) do (
set vslatest="%%i"
if exist "%%i\VC\Auxiliary\Build\vcvars64.bat" (
set vcvars64="%%i\VC\Auxiliary\Build\vcvars64.bat"
)
)
@echo vslatest %vslatest%
@echo vcvars64 %vcvars64%
call %vcvars64%
@REM Following snippet derived from: https://github.com/SDGGiesbrecht/SDGCornerstone/blob/955d54feae736122e2f6af4887c2cfaef468870a/.github/workflows/Windows.yaml
echo on
curl --location ^
https://swift.org/builds/swift-5.4.3-release/windows10/swift-5.4.3-RELEASE/swift-5.4.3-RELEASE-windows10.exe ^
--output %TEMP%\swift-5.4.3-RELEASE-windows10.exe
%TEMP%\swift-5.4.3-RELEASE-windows10.exe /passive
set SDKROOT=C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk
copy %SDKROOT%\usr\share\ucrt.modulemap "%UniversalCRTSdkDir%\Include\%UCRTVersion%\ucrt\module.modulemap"
copy %SDKROOT%\usr\share\visualc.modulemap "%VCToolsInstallDir%\include\module.modulemap"
copy %SDKROOT%\usr\share\visualc.apinotes "%VCToolsInstallDir%\include\visualc.apinotes"
copy %SDKROOT%\usr\share\winsdk.modulemap "%UniversalCRTSdkDir%\Include\%UCRTVersion%\um\module.modulemap"
set Path=C:\Library\icu-67\usr\bin;%Path%
set Path=C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin;%Path%
set Path=C:\Library\Swift-development\bin;%Path%
set Path=C:\Library\Developer\Platforms\Windows.platform\Developer\Library\XCTest-development\usr\bin;%Path%
swift test ^
-Xswiftc -I -Xswiftc C:\Library\Developer\Platforms\Windows.platform\Developer\Library\XCTest-development\usr\lib\swift\windows\x86_64 ^
-Xswiftc -L -Xswiftc C:\Library\Developer\Platforms\Windows.platform\Developer\Library\XCTest-development\usr\lib\swift\windows