Skip to content

Commit

Permalink
Merge pull request #1 from tkey/refactor
Browse files Browse the repository at this point in the history
feat: refactor
  • Loading branch information
metalurgical authored Jan 23, 2024
2 parents 988edd4 + aa60e91 commit c91366b
Show file tree
Hide file tree
Showing 28 changed files with 712 additions and 544 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
on:
push:
branches:
- main
pull_request:
types:
- opened
- reopened
- synchronize

jobs:
build:
runs-on: macOS-latest
strategy:
matrix:
platform:
- iOS
steps:
- uses: actions/checkout@v2.3.4
- uses: mxcl/xcodebuild@v1
with:
platform: ${{ matrix.platform }}
action: test
scheme: curvelib.swift
code-coverage: true
upload-logs: always
32 changes: 19 additions & 13 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,35 +1,41 @@
// swift-tools-version: 5.9
// swift-tools-version: 5.7
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "curvelib",
name: "curvelib.swift",
platforms: [
.iOS(SupportedPlatform.IOSVersion.v13), .macOS(.v10_15)
],
products: [
// Products define the executables and libraries a package produces, making them visible to other packages.
.library(
name: "curvelib",
targets: ["curvelib"]),
name: "curvelib.swift",
targets: ["curvelib.swift"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],

targets: [
.binaryTarget(name: "libcurvelib",
path: "Sources/libcurvelib/libcurvelib.xcframework"
.binaryTarget(name: "curve_secp256k1",
path: "Sources/curve_secp256k1/curve_secp256k1.xcframework"
),

.target(name: "tkeylibcurve",
dependencies: ["libcurvelib"],
path: "Sources/libcurvelib"
.target(name: "curvelib",
dependencies: ["curve_secp256k1"],
path: "Sources/curve_secp256k1"
),
// Targets are the basic building blocks of a package, defining a module or a test suite.
// Targets can depend on other targets in this package and products from dependencies.
.target(
name: "curvelib",
dependencies: ["tkeylibcurve"],
name: "curvelib.swift",
dependencies: ["curvelib"],
path: "Sources/curvelib"
),
.testTarget(
name: "curvelibTests",
dependencies: ["curvelib"]),
dependencies: ["curvelib.swift"]),
]
)
1 change: 1 addition & 0 deletions Sources/curve_secp256k1/bridge.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "curve_secp256k1.h"
Loading

0 comments on commit c91366b

Please sign in to comment.