Repository navigation
55 lines (46 loc) · 1.48 KB
/
Copy pathswift.yml
File metadata and controls
55 lines (46 loc) · 1.48 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
name: Swift package
on:
push:
branches: [master]
pull_request:
permissions:
contents: read
jobs:
test:
name: swift build + swift test (macOS)
runs-on: macos-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Show toolchain
run: |
xcodebuild -version
swift --version
- name: Check generated Swift catalog is up to date
run: python3 scripts/generate_swift.py --check
- name: Build
run: swift build
- name: Test
run: swift test
platforms:
name: Build for ${{ matrix.destination }}
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
destination:
- generic/platform=iOS Simulator
- generic/platform=tvOS Simulator
- generic/platform=visionOS Simulator
- generic/platform=macOS,variant=Mac Catalyst
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
# The repository root also contains the legacy SystemSoundLibrary.xcodeproj, so
# build the package from a copy that only contains the package files.
- name: Build package
run: |
set -o pipefail
PKG="$RUNNER_TEMP/package"
mkdir -p "$PKG"
cp -R Package.swift Sources Tests "$PKG/"
cd "$PKG"
xcodebuild build -scheme SystemSoundsLibrary -destination '${{ matrix.destination }}' CODE_SIGNING_ALLOWED=NO -quiet