Skip to content

Commit 6721de4

Browse files
Refactor ci/cd pipeline
- Update SPM version - Update Xcode version - Add two macOS version support - Update simulator iOS version
1 parent 26f0d55 commit 6721de4

File tree

3 files changed

+87
-6
lines changed

3 files changed

+87
-6
lines changed

.github/workflows/linux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# TODO

.github/workflows/ci.yml renamed to .github/workflows/macOS-11.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
name: "Web3swift CI"
1+
name: "macOS 11"
22

33
on:
44
push:
55
branches:
66
- master
77
- develop
88
- hotfix
9+
- feature/github-actions-2.0
910
paths:
1011
- Packag*.swift
1112
- web3swift.podspec
@@ -22,13 +23,13 @@ on:
2223

2324
jobs:
2425
spm:
25-
name: Swift Package Manager 5.4
26+
name: Swift Package Manager 5.5
2627
runs-on: macOS-11
2728
concurrency:
2829
group: spm-${{ github.run_id }}
2930
cancel-in-progress: false
3031
env:
31-
DEVELOPER_DIR: /Applications/Xcode_12.5.1.app/Contents/Developer
32+
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
3233
steps:
3334
- uses: actions/checkout@v2
3435
- name: Resolve dependencies
@@ -45,19 +46,19 @@ jobs:
4546
run: swift test --skip-build -c debug --filter localTests
4647
- name: Run remote tests
4748
run: swift test --skip-build -c debug --filter remoteTests
48-
carthage:
49+
carthage-iOS:
4950
name: Carthage
5051
runs-on: macOS-11
5152
concurrency:
5253
group: carthage-${{ github.run_id }}
5354
cancel-in-progress: false
5455
env:
55-
DEVELOPER_DIR: /Applications/Xcode_12.5.1.app/Contents/Developer
56+
DEVELOPER_DIR: /Applications/Xcode_13.2.1.app/Contents/Developer
5657
strategy:
5758
fail-fast: false
5859
max-parallel: 2
5960
matrix:
60-
destination: ['OS=14.5,name=iPhone 12']
61+
destination: ['OS=15.2,name=iPhone 13']
6162
steps:
6263
- uses: actions/checkout@v2
6364
- name: Resolving dependencies

.github/workflows/macOS-12.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: "macOS 12"
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- develop
8+
- hotfix
9+
- feature/github-actions-2.0
10+
paths:
11+
- Packag*.swift
12+
- web3swift.podspec
13+
- Cartfile
14+
- Sources/**
15+
- 'Tests/**'
16+
- 'web3swift*/**'
17+
- '.github/workflows/**'
18+
pull_request:
19+
branches:
20+
- master
21+
- develop
22+
- unstable
23+
24+
jobs:
25+
spm:
26+
name: Swift Package Manager 5.5
27+
runs-on: macOS-12
28+
concurrency:
29+
group: spm-${{ github.run_id }}
30+
cancel-in-progress: false
31+
env:
32+
DEVELOPER_DIR: /Applications/Xcode_13.3.1.app/Contents/Developer
33+
steps:
34+
- uses: actions/checkout@v2
35+
- name: Resolve dependencies
36+
run: swift package resolve
37+
- name: Build
38+
run: swift build --build-tests
39+
- name: Install ganache
40+
run: npm install ganache --global
41+
- name: Start ganache in background
42+
run: ganache &
43+
- name: Wait till ganache starts
44+
run: sleep 1
45+
- name: Run local tests
46+
run: swift test --skip-build -c debug --filter localTests
47+
- name: Run remote tests
48+
run: swift test --skip-build -c debug --filter remoteTests
49+
carthage-iOS:
50+
name: Carthage
51+
runs-on: macOS-12
52+
concurrency:
53+
group: carthage-${{ github.run_id }}
54+
cancel-in-progress: false
55+
env:
56+
DEVELOPER_DIR: /Applications/Xcode_13.3.1.app/Contents/Developer
57+
strategy:
58+
fail-fast: false
59+
max-parallel: 2
60+
matrix:
61+
destination: ['OS=15.4,name=iPhone 13']
62+
steps:
63+
- uses: actions/checkout@v2
64+
- name: Resolving dependencies
65+
run: carthage checkout
66+
- name: Building dependencies
67+
run: carthage build --no-use-binaries --platform iOS Simulator --use-xcframeworks
68+
- name: Building framework
69+
run: xcodebuild build-for-testing -project "web3swift.xcodeproj" -scheme "web3swift" -destination "${{matrix.destination}}"
70+
- name: Install ganache
71+
run: npm install ganache --global
72+
- name: Start ganache in background
73+
run: ganache &
74+
- name: Wait till ganache starts
75+
run: sleep 1
76+
- name: Run local tests
77+
run: xcodebuild test-without-building -project "web3swift.xcodeproj" -scheme "web3swift" -destination "${{matrix.destination}}" -testPlan LocalTests
78+
- name: Run remote tests
79+
run: xcodebuild test-without-building -project "web3swift.xcodeproj" -scheme "web3swift" -destination "${{matrix.destination}}" -testPlan RemoteTests

0 commit comments

Comments
 (0)