Skip to content

Commit

Permalink
[ADD] Try linux CI
Browse files Browse the repository at this point in the history
  • Loading branch information
DarthMike committed May 20, 2022
1 parent 94653a5 commit 9d7207a
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 47 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI

on:
pull_request:
branches: [ develop ]

jobs:
# macos:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v3
# - name: Build
# run: swift build -v
# - name: Tests
# run: swift test -v
linux:
runs-on: ubuntu-latest
container:
image: swift:latest
steps:
- uses: actions/checkout@v3
- name: Build
run: swift build -v
- name: Tests
run: swift test -v
19 changes: 0 additions & 19 deletions .github/workflows/swift.yml

This file was deleted.

9 changes: 9 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@
"version": "2.0.1"
}
},
{
"package": "OpenCombine",
"repositoryURL": "https://github.com/OpenCombine/OpenCombine.git",
"state": {
"branch": null,
"revision": "9cf67e363738dbab61b47fb5eaed78d3db31e5ee",
"version": "0.13.0"
}
},
{
"package": "secp256k1",
"repositoryURL": "https://github.com/Boilertalk/secp256k1.swift",
Expand Down
71 changes: 43 additions & 28 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,50 @@ let package = Package(
dependencies: [
.package(name: "BigInt", url: "https://github.com/attaswift/BigInt", from: "5.0.0"),
.package(name: "GenericJSON", url: "https://github.com/zoul/generic-json-swift", from: "2.0.0"),
.package(name: "secp256k1", url: "https://github.com/Boilertalk/secp256k1.swift", from: "0.1.0")
.package(name: "secp256k1", url: "https://github.com/Boilertalk/secp256k1.swift", from: "0.1.0"),
.package(url: "https://github.com/OpenCombine/OpenCombine.git", from: "0.13.0")
],
targets: [
.target(name: "web3",
dependencies:
[.target(name: "keccaktiny"),
.target(name: "aes"),
.target(name: "Internal_CryptoSwift_PBDKF2"),
"BigInt",
"GenericJSON",
"secp256k1"],
path: "web3swift/src"),
.target(name: "keccaktiny",
dependencies: [],
path: "web3swift/lib/keccak-tiny",
exclude: ["module.map"]),
.target(name: "aes",
dependencies: [],
path: "web3swift/lib/aes",
exclude: ["module.map"]),
.target(name: "Internal_CryptoSwift_PBDKF2",
dependencies: [],
path: "web3swift/lib/CryptoSwift"),
.testTarget(name: "web3swiftTests",
dependencies: ["web3"],
path: "web3sTests",
resources: [
.copy("Resources/rlptests.json"),
.copy("Account/cryptofights_712.json")
]),
.target(
name: "web3",
dependencies:
[
.target(name: "keccaktiny"),
.target(name: "aes"),
.target(name: "Internal_CryptoSwift_PBDKF2"),
"BigInt",
"GenericJSON",
"secp256k1",
.product(name: "OpenCombine", package: "OpenCombine"),
.product(name: "OpenCombineFoundation", package: "OpenCombine")
],
path: "web3swift/src"
),
.target(
name: "keccaktiny",
dependencies: [],
path: "web3swift/lib/keccak-tiny",
exclude: ["module.map"]
),
.target(
name: "aes",
dependencies: [],
path: "web3swift/lib/aes",
exclude: ["module.map"]
),
.target(
name: "Internal_CryptoSwift_PBDKF2",
dependencies: [],
path: "web3swift/lib/CryptoSwift"
),
.testTarget(
name: "web3swiftTests",
dependencies: ["web3"],
path: "web3sTests",
resources: [
.copy("Resources/rlptests.json"),
.copy("Account/cryptofights_712.json")
]
),
]
)
4 changes: 4 additions & 0 deletions web3swift/src/Client/EthereumClient+Call.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
//

import Foundation
#if canImport(Combine)
import Combine
#else
import OpenCombine
#endif

public enum OffchainReadError: Error {
case network
Expand Down

0 comments on commit 9d7207a

Please sign in to comment.