Skip to content

Commit 7ac7fe4

Browse files
authored
Merge pull request #212 from argentlabs/tech/async-conditional
[TIDY] Async/await APIs available without version requirement
2 parents f1e2f10 + ad682b4 commit 7ac7fe4

File tree

21 files changed

+197
-644
lines changed

21 files changed

+197
-644
lines changed

.github/workflows/CI.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [ develop ]
6+
7+
jobs:
8+
macos:
9+
runs-on: macos-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Build
13+
run: swift build -v
14+
- name: Tests
15+
run: swift test -v
16+
linux:
17+
runs-on: ubuntu-latest
18+
container:
19+
image: swift:5.5-bionic
20+
steps:
21+
- uses: actions/checkout@v3
22+
- name: Build
23+
run: swift build -v
24+
- name: Tests
25+
run: swift test -v

.github/workflows/swift.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

Package.resolved

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 43 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,50 @@ let package = Package(
1313
dependencies: [
1414
.package(name: "BigInt", url: "https://github.com/attaswift/BigInt", from: "5.0.0"),
1515
.package(name: "GenericJSON", url: "https://github.com/zoul/generic-json-swift", from: "2.0.0"),
16-
.package(name: "secp256k1", url: "https://github.com/Boilertalk/secp256k1.swift", from: "0.1.0")
16+
.package(name: "secp256k1", url: "https://github.com/Boilertalk/secp256k1.swift", from: "0.1.0"),
17+
.package(url: "https://github.com/OpenCombine/OpenCombine.git", from: "0.13.0")
1718
],
1819
targets: [
19-
.target(name: "web3",
20-
dependencies:
21-
[.target(name: "keccaktiny"),
22-
.target(name: "aes"),
23-
.target(name: "Internal_CryptoSwift_PBDKF2"),
24-
"BigInt",
25-
"GenericJSON",
26-
"secp256k1"],
27-
path: "web3swift/src"),
28-
.target(name: "keccaktiny",
29-
dependencies: [],
30-
path: "web3swift/lib/keccak-tiny",
31-
exclude: ["module.map"]),
32-
.target(name: "aes",
33-
dependencies: [],
34-
path: "web3swift/lib/aes",
35-
exclude: ["module.map"]),
36-
.target(name: "Internal_CryptoSwift_PBDKF2",
37-
dependencies: [],
38-
path: "web3swift/lib/CryptoSwift"),
39-
.testTarget(name: "web3swiftTests",
40-
dependencies: ["web3"],
41-
path: "web3sTests",
42-
resources: [
43-
.copy("Resources/rlptests.json"),
44-
.copy("Account/cryptofights_712.json")
45-
]),
20+
.target(
21+
name: "web3",
22+
dependencies:
23+
[
24+
.target(name: "keccaktiny"),
25+
.target(name: "aes"),
26+
.target(name: "Internal_CryptoSwift_PBDKF2"),
27+
"BigInt",
28+
"GenericJSON",
29+
"secp256k1",
30+
"OpenCombine",
31+
.product(name: "OpenCombineFoundation", package: "OpenCombine"),
32+
],
33+
path: "web3swift/src"
34+
),
35+
.target(
36+
name: "keccaktiny",
37+
dependencies: [],
38+
path: "web3swift/lib/keccak-tiny",
39+
exclude: ["module.map"]
40+
),
41+
.target(
42+
name: "aes",
43+
dependencies: [],
44+
path: "web3swift/lib/aes",
45+
exclude: ["module.map"]
46+
),
47+
.target(
48+
name: "Internal_CryptoSwift_PBDKF2",
49+
dependencies: [],
50+
path: "web3swift/lib/CryptoSwift"
51+
),
52+
.testTarget(
53+
name: "web3swiftTests",
54+
dependencies: ["web3"],
55+
path: "web3sTests",
56+
resources: [
57+
.copy("Resources/rlptests.json"),
58+
.copy("Account/cryptofights_712.json")
59+
]
60+
),
4661
]
4762
)

docker-run.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#/bin/bash
2+
3+
docker run --rm --privileged \
4+
--interactive --tty \
5+
--name swift-5.5 \
6+
--volume "$(pwd):/web3swift" \
7+
--workdir "/web3swift" \
8+
swift:5.5 /bin/bash

web3.swift.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Pod::Spec.new do |s|
88
s.source = { :git => 'https://github.com/argentlabs/web3.swift.git', :tag => s.version.to_s }
99
s.module_name = 'web3'
1010

11-
s.swift_version = '5.0'
12-
s.ios.deployment_target = '11.0'
11+
s.swift_version = '5.5'
12+
s.ios.deployment_target = '13.0'
1313

1414
s.source_files = 'web3swift/src/**/*.swift', 'web3swift/lib/**/*.{c,h,swift}'
1515
s.pod_target_xcconfig = {

0 commit comments

Comments
 (0)