Skip to content

Issue: Lack of iOS Support for Swift Benchmark #310

Description

@sinanege-tomtom

Description

I attempted to use Swift Benchmark for performance testing within an iOS project. While the package looks working for macOS and iOS, it currently does not support iOS, resulting in an error during the benchmarking process.

Steps to Reproduce

Create a Swift Package with the following Package.swift configuration:

// swift-tools-version:5.9
import PackageDescription

let package = Package(
    name: "PerformanceTest",
    platforms: [.iOS(.v16)],
    products: [
        .library(
            name: "PerformanceTest",
            targets: ["PerformanceTest"]),
    ],
    dependencies: [
        .package(url: "https://github.com/ordo-one/package-benchmark", branch: "main"),
    ],
    targets: [
        .target(
            name: "PerformanceTest"
        ),
        .executableTarget(
            name: "MyNewBenchmarkTarget",
            dependencies: [
                "PerformanceTest",
                .product(name: "Benchmark", package: "package-benchmark"),
            ],
            path: "Benchmarks/MyNewBenchmarkTarget"
        ),
    ]
)

When I run swift package benchmark run it gives me following error:

error: the executable 'MyNewBenchmarkTarget' requires macos 10.13, but depends on the product 'Benchmark' which requires macos 13.0; consider changing the executable 'MyNewBenchmarkTarget' to require macos 13.0 or later, or the product 'Benchmark' to require macos 10.13 or earlier.

Although iOS support appears to be included in the repository, I have not been able to get it to work. Could you please assist with this issue?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions