Skip to content

Commit 8a5a649

Browse files
authored
Merge pull request #267 from TelemetryDeck/feat/update-ci
feat: Update device target versions, xcode 26.1.1, switch to swift lint
2 parents 6e2dfb4 + 1ab8d30 commit 8a5a649

File tree

3 files changed

+77
-59
lines changed

3 files changed

+77
-59
lines changed

.github/workflows/ci.yaml

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,44 @@
11
name: Test and Lint
22

33
on:
4-
push:
5-
branches: [main]
6-
pull_request:
7-
branches:
8-
- "*"
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches:
8+
- "*"
99

1010
jobs:
11-
lint:
12-
name: Lint Code
13-
runs-on: ubuntu-latest
14-
steps:
15-
- name: Repository checkout
16-
uses: actions/checkout@v4
17-
- name: Lint
18-
uses: norio-nomura/action-swiftlint@3.2.1
19-
with:
20-
args: --strict
21-
test:
22-
name: Test Xcode ${{ matrix.xcode }} - ${{ matrix.xcodebuildCommand }}
23-
runs-on: "macos-26"
24-
strategy:
25-
fail-fast: true
26-
matrix:
27-
xcode:
28-
- "26"
29-
xcodebuildCommand:
30-
- "-sdk iphonesimulator -destination 'platform=iOS Simulator,OS=26.1,name=iPhone 17'"
31-
- "-sdk macosx -destination 'platform=macOS'"
32-
- "-sdk xrsimulator -destination 'platform=visionOS Simulator,OS=26.0,name=Apple Vision Pro'"
33-
- "-sdk appletvsimulator -destination 'platform=tvOS Simulator,OS=26.0,name=Apple TV 4K (3rd generation)'"
34-
- "-sdk watchsimulator -destination 'platform=watchOS Simulator,OS=26.0,name=Apple Watch Series 11 (46mm)'"
35-
steps:
36-
- name: Repository checkout
37-
uses: actions/checkout@v4
38-
- name: Setup Xcode
39-
uses: maxim-lobanov/setup-xcode@v1
40-
with:
41-
xcode-version: ${{ matrix.xcode }}
42-
- name: Build and Test
43-
run: xcodebuild test -scheme TelemetryDeck-Package ${{ matrix.xcodebuildCommand }}
11+
lint:
12+
name: Lint Code
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Repository checkout
16+
uses: actions/checkout@v5
17+
- name: Get swift version
18+
run: swift --version
19+
- name: Lint
20+
run: make checklint
21+
test:
22+
name: Test Xcode ${{ matrix.xcode }} - ${{ matrix.xcodebuildCommand }}
23+
runs-on: "macos-26"
24+
strategy:
25+
fail-fast: true
26+
matrix:
27+
xcode:
28+
- "26.1.1"
29+
xcodebuildCommand:
30+
- "-sdk iphonesimulator -destination 'platform=iOS Simulator,OS=26.1,name=iPhone 17'"
31+
- "-sdk macosx -destination 'platform=macOS'"
32+
- "-sdk xrsimulator -destination 'platform=visionOS Simulator,OS=26.1,name=Apple Vision Pro'"
33+
- "-sdk appletvsimulator -destination 'platform=tvOS Simulator,OS=26.1,name=Apple TV 4K (3rd generation)'"
34+
- "-sdk watchsimulator -destination 'platform=watchOS Simulator,OS=26.1,name=Apple Watch Series 11 (46mm)'"
35+
steps:
36+
- name: Repository checkout
37+
uses: actions/checkout@v5
38+
- name: Setup Xcode
39+
uses: maxim-lobanov/setup-xcode@v1
40+
with:
41+
xcode-version: ${{ matrix.xcode }}
42+
43+
- name: Build and Test
44+
run: xcodebuild test -scheme TelemetryDeck-Package ${{ matrix.xcodebuildCommand }}

.github/workflows/cocoapods.yaml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
name: deploy_to_cocoapods
22

33
on:
4-
push:
5-
tags:
6-
- "*"
4+
push:
5+
tags:
6+
- "*"
77

88
jobs:
9-
build:
10-
runs-on: macos-15
9+
build:
10+
runs-on: macos-15
1111

12-
steps:
13-
- uses: actions/checkout@v4
12+
steps:
13+
- uses: actions/checkout@v5
1414

15-
- name: Setup Xcode
16-
uses: maxim-lobanov/setup-xcode@v1
17-
with:
18-
xcode-version: latest-stable
15+
- name: Setup Xcode
16+
uses: maxim-lobanov/setup-xcode@v1
17+
with:
18+
xcode-version: latest-stable
1919

20-
- name: Install Cocoapods
21-
run: gem install cocoapods
20+
- name: Install Cocoapods
21+
run: gem install cocoapods
2222

23-
- name: Deploy to Cocoapods
24-
run: |
25-
set -eo pipefail
26-
export LIB_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
27-
pod lib lint --allow-warnings
28-
pod trunk push --allow-warnings
29-
env:
30-
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
23+
- name: Deploy to Cocoapods
24+
run: |
25+
set -eo pipefail
26+
export LIB_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
27+
pod lib lint --allow-warnings
28+
pod trunk push --allow-warnings
29+
env:
30+
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}

Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.PHONY: help test build checklint lint
2+
3+
help:
4+
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
5+
6+
7+
test: ## Run unit tests
8+
@swift test
9+
10+
build: ## Build the library
11+
@swift build
12+
13+
checklint: ## Checks the project for linting errors, used by the CI
14+
@swift format lint --strict --configuration ./.swift-format -r .
15+
16+
lint: ## Applies all auto-correctable lint issues and reformats all source files
17+
@swift format --configuration ./.swift-format -r -i .

0 commit comments

Comments
 (0)