This repository was archived by the owner on Oct 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
128 lines (108 loc) · 4.65 KB
/
ci.yml
File metadata and controls
128 lines (108 loc) · 4.65 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
macos_big_sur:
runs-on: macos-11.0
strategy:
matrix:
xcode:
- "11.7" # Swift 5.2
- "12.2" # Swift 5.3
name: "macOS Big Sur (Xcode ${{ matrix.xcode }})"
steps:
- name: Checkout
uses: actions/checkout@v1
- uses: actions/cache@v2
with:
path: .build
key: ${{ runner.os }}-spm-xcode-${{ matrix.xcode }}-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-xcode-${{ matrix.xcode }}-
- name: Install System Dependencies
run: |
brew install graphviz
- name: Build and Test
run: |
swift test
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
macos_catalina:
runs-on: macos-10.15
strategy:
matrix:
xcode:
- "11.7" # Swift 5.2
- "12" # Swift 5.3
name: "macOS Catalina (Xcode ${{ matrix.xcode }})"
steps:
- name: Checkout
uses: actions/checkout@v1
- uses: actions/cache@v2
with:
path: .build
key: ${{ runner.os }}-spm-xcode-${{ matrix.xcode }}-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-xcode-${{ matrix.xcode }}-
- name: Install System Dependencies
run: |
brew install graphviz
- name: Build and Test
run: |
swift test
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer
linux:
runs-on: ubuntu-latest
strategy:
matrix:
swift: ["5.3", "5.2"]
name: "Ubuntu Linux (Swift ${{ matrix.swift }})"
container:
image: swift:${{ matrix.swift }}
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install System Dependencies
run: |
apt-get update
apt-get install -y libxml2-dev graphviz-dev
- name: Build and Test
run: |
swift test --enable-test-discovery
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: seanmiddleditch/gha-setup-vsdevenv@master
# TODO(compnerd) figure out how to build graphviz
- name: Fetch graphviz
run: |
Invoke-WebRequest -Uri "https://artprodeus21.artifacts.visualstudio.com/A8fd008a0-56bc-482c-ba46-67f9425510be/3133d6ab-80a8-4996-ac4f-03df25cd3224/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL2NvbXBuZXJkL3Byb2plY3RJZC8zMTMzZDZhYi04MGE4LTQ5OTYtYWM0Zi0wM2RmMjVjZDMyMjQvYnVpbGRJZC81MDQ4NS9hcnRpZmFjdE5hbWUvZ3JhcGh2aXotd2luZG93cy14NjQ1/content?format=zip" -OutFile $env:Temp\graphviz-windows-x64.zip
Expand-Archive -Path $env:Temp\graphviz-windows-x64.zip -Destination $env:Temp -Force
Move-Item -Path $env:Temp\graphviz-windows-x64\Library -Destination C:\ -Force
- name: Install swift-5.4
run: |
Install-Binary -Url "https://swift.org/builds/swift-5.4-release/windows10/swift-5.4-RELEASE/swift-5.4-RELEASE-windows10.exe" -Name "installer.exe" -ArgumentList ("-q")
- name: Set Environment Variables
run: |
echo "SDKROOT=C:\Library\Developer\Platforms\Windows.platform\Developer\SDKs\Windows.sdk" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "DEVELOPER_DIR=C:\Library\Developer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Adjust Paths
run: |
echo "C:\Library\Swift-development\bin;C:\Library\icu-67\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install Supporting Files
run: |
Copy-Item "$env:SDKROOT\usr\share\ucrt.modulemap" -destination "$env:UniversalCRTSdkDir\Include\$env:UCRTVersion\ucrt\module.modulemap"
Copy-Item "$env:SDKROOT\usr\share\visualc.modulemap" -destination "$env:VCToolsInstallDir\include\module.modulemap"
Copy-Item "$env:SDKROOT\usr\share\visualc.apinotes" -destination "$env:VCToolsInstallDir\include\visualc.apinotes"
Copy-Item "$env:SDKROOT\usr\share\winsdk.modulemap" -destination "$env:UniversalCRTSdkDir\Include\$env:UCRTVersion\um\module.modulemap"
- name: Add graphviz to PATH
run: |
echo "C:\Library\graphviz-development\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Build and Test
run: swift test --enable-test-discovery -Xlinker -LC:\Library\graphviz-development\usr\lib