forked from adap/flower
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (51 loc) · 1.55 KB
/
swift.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
name: Swift
on:
push:
branches: ['main']
paths: ['src/swift/**']
pull_request:
branches: ['main']
paths: ['src/swift/**']
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
defaults:
run:
working-directory: src/swift/flwr
name: Test
runs-on: macos-14
steps:
- uses: fwal/setup-swift@v2
with:
swift-version: 5.10
- uses: actions/checkout@v4
- name: Run tests
run: arch -x86_64 xcodebuild test -scheme flwr -destination 'platform=iOS Simulator,name=iPhone 15 Pro Max,OS=17.2'
build_docs:
runs-on: macos-14
name: Build docs
steps:
- uses: fwal/setup-swift@v2
with:
swift-version: 5.10
- uses: actions/checkout@v4
- name: Build docs
run: ./dev/build-swift-api-ref.sh
deploy_docs:
needs: "build_docs"
if: ${{ github.ref == 'refs/heads/main' && github.repository == 'adap/flower' && !github.event.pull_request.head.repo.fork }}
runs-on: macos-14
name: Deploy docs
steps:
- uses: fwal/setup-swift@v2
with:
swift-version: 5.10
- uses: actions/checkout@v4
- name: Build and deploy docs
env:
AWS_DEFAULT_REGION: ${{ secrets. AWS_DEFAULT_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets. AWS_SECRET_ACCESS_KEY }}
run: ./dev/deploy-swift-docs.sh