-
Notifications
You must be signed in to change notification settings - Fork 0
122 lines (106 loc) · 4.07 KB
/
ci.yml
File metadata and controls
122 lines (106 loc) · 4.07 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
name: MiniApp CI
on:
push:
branches: [ main ]
pull_request:
branches:
- '*'
schedule:
# run at 10AM & 10PM UTC
- cron: '0 10,22 * * *'
env:
DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
jobs:
linux:
runs-on: ubuntu-latest
steps:
- run: sudo apt-get update
- name: Install dependencies
run: sudo apt-get install -y libjavascriptcoregtk-4.0-dev
- run: pkg-config --libs javascriptcoregtk-4.0
- uses: actions/checkout@v3
with:
submodules: true
- name: Test (Debug)
run: swift test --configuration debug
#- name: Test (Release)
#run: swift test --configuration release -Xswiftc -enable-testing
ios:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Test (Debug)
run: xcodebuild clean test -configuration Debug -scheme "MiniApp-Package" -sdk "iphonesimulator" -destination "platform=iOS Simulator,name=iPhone 14 Pro"
#- name: Test (Release)
#run: xcodebuild clean test -configuration Release -scheme "MiniApp-Package" -sdk "iphonesimulator" -destination "platform=iOS Simulator,name=iPhone 14 Pro"
tvos:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Test (Debug)
run: xcodebuild clean test -configuration Debug -scheme "MiniApp-Package" -sdk "appletvsimulator" -destination "platform=tvOS Simulator,name=Apple TV"
#- name: Test (Release)
#run: xcodebuild clean test -configuration Release -scheme "MiniApp-Package" -sdk "appletvsimulator" -destination "platform=tvOS Simulator,name=Apple TV"
macos:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Test (Debug)
run: swift test --configuration debug
#- name: Test (Release)
#run: swift test --configuration release -Xswiftc -enable-testing
api-doc:
runs-on: macos-12 # needed to be able to document SwiftUI
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Build documentation
run: |
swift -version
export SWIFTPM_ENABLE_COMMAND_PLUGINS=1
export DOCC_JSON_PRETTYPRINT="YES"
# insert the docc dependency
sed -I "" 's;^ dependencies: \[; dependencies: [ .package(name: "swift-docc-plugin", url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"), ;1' Package.swift
swift package --allow-writing-to-directory docs \
generate-documentation --target MiniApp \
--disable-indexing \
--transform-for-static-hosting \
--hosting-base-path MiniApp \
--output-path docs
swift package --allow-writing-to-directory docs \
generate-documentation --target MiniAppManifest \
--disable-indexing \
--transform-for-static-hosting \
--hosting-base-path MiniAppManifest \
--output-path docs
swift package --allow-writing-to-directory docs \
generate-documentation --target MiniAppPackaging \
--disable-indexing \
--transform-for-static-hosting \
--hosting-base-path MiniAppPackaging \
--output-path docs
swift package --allow-writing-to-directory docs \
generate-documentation --target MiniAppLifecycle \
--disable-indexing \
--transform-for-static-hosting \
--hosting-base-path MiniAppLifecycle \
--output-path docs
swift package --allow-writing-to-directory docs \
generate-documentation --target MiniAppAddressing \
--disable-indexing \
--transform-for-static-hosting \
--hosting-base-path MiniAppAddressing \
--output-path docs
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: '.'