-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (68 loc) · 2.19 KB
/
build.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
81
82
83
84
85
86
87
88
89
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
analyze:
name: Analyze
runs-on: macos-14
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'swift' ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
#- name: Autobuild
# uses: github/codeql-action/autobuild@v2
# ^^ doesn't work for a purely swift package
- name: build
run: swift build
#- name: build and test
# run: swift test --enable-code-coverage -v
# or
# - run: xcodebuild -scheme FooBar -sdk iphonesimulator build
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
build:
runs-on: macos-14
steps:
- name: Checkout Project
uses: actions/checkout@v4
- name: Show Build Version
run: xcodebuild -version
# - name: Show Build Settings
# run: xcodebuild -scheme SwiftViz -showBuildSettings
# - name: Show Build SDK
# run: xcodebuild -scheme SwiftViz -showsdks
# xcodebuild
- name: build and test
run: swift test --enable-code-coverage -v
#- name: Xcode iOS build
#run: xcodebuild clean build -scheme SwiftVizScale-Package -destination 'platform=iOS Simulator,OS=15.5,name=iPhone 8' -showBuildTimingSummary
#- name: check against API breaking changes
# run: swift package diagnose-api-breaking-changes 0.5.0
# - name: env review
# run: env
#- name: doc utility build verification
# run: |
# cd utils
# swift build
- name: Prepare Code Coverage
run: xcrun llvm-cov export -format="lcov" .build/debug/SwiftVizScalePackageTests.xctest/Contents/MacOS/SwiftVizScalePackageTests -instr-profile .build/debug/codecov/default.profdata > info.lcov
- name: Upload to CodeCov.io
run: bash <(curl https://codecov.io/bash)
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}