Skip to content

Commit

Permalink
Merge pull request #37 from XYOracleNetwork/feature/swift-tools-version
Browse files Browse the repository at this point in the history
Feature/swift tools version
  • Loading branch information
JoelBCarter authored Nov 10, 2024
2 parents c801541 + 6dbc591 commit 03f672e
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 23 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/build-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,26 @@ name: build-beta

on:
push:
branches: [ beta ]
branches:
- beta
pull_request:
branches: [ beta ]
branches:
- beta

jobs:
build:

runs-on: macos-latest

steps:
- uses: actions/checkout@v3
- name: Build
run: swift build -v
- name: Run tests
run: swift test -v
- uses: actions/checkout@v3
# Use until swift 6 support is added to the default setup-swift action
# https://github.com/swift-actions/setup-swift
# https://github.com/swift-actions/setup-swift/pull/684
# - uses: swift-actions/[email protected]
- uses: JoelBCarter/setup-swift@feat/swift-6
with:
swift-version: "6.0"
- name: Build
run: swift build -v
- name: Run tests
run: swift test -v
24 changes: 16 additions & 8 deletions .github/workflows/build-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,26 @@ name: build-main

on:
push:
branches: [ main ]
branches:
- main
pull_request:
branches: [ main ]
branches:
- main

jobs:
build:

runs-on: macos-latest

steps:
- uses: actions/checkout@v3
- name: Build
run: swift build -v
- name: Run tests
run: swift test -v
- uses: actions/checkout@v3
# Use until swift 6 support is added to the default setup-swift action
# https://github.com/swift-actions/setup-swift
# https://github.com/swift-actions/setup-swift/pull/684
# - uses: swift-actions/[email protected]
- uses: JoelBCarter/setup-swift@feat/swift-6
with:
swift-version: "6.0"
- name: Build
run: swift build -v
- name: Run tests
run: swift test -v
16 changes: 9 additions & 7 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.3
// swift-tools-version:6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand All @@ -17,21 +17,23 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "5.2.0")),
.package(
name: "secp256k1",
url: "https://github.com/21-DOT-DEV/swift-secp256k1",
"0.18.0"..."0.18.0"),
.package(url: "https://github.com/21-DOT-DEV/swift-secp256k1", "0.18.0"..."0.18.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(name: "keccak"),
.target(
name: "XyoClient",
dependencies: ["Alamofire", "secp256k1", "keccak"]),
dependencies: [
.product(name: "secp256k1", package: "swift-secp256k1"),
"Alamofire",
"keccak"
]
),
.testTarget(
name: "XyoClientTests",
dependencies: ["XyoClient"])
],
swiftLanguageVersions: [.v5, .v4_2]
swiftLanguageModes: [.v5, .v4_2]
)

0 comments on commit 03f672e

Please sign in to comment.