Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .github/actions/select-xcode/action.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Select Xcode with Swift 6.2+
description: >
Select the newest Xcode 26+ install on the runner so a swift-tools-version
Select an installed Xcode 26+ on the runner so a swift-tools-version
6.2 Package.swift resolves. macos-latest currently defaults to Xcode 16.4,
which ships Swift 6.1.0 and rejects 6.2 manifests with
"is using Swift tools version 6.2.0 but the installed version is 6.1.0".
By default picks the newest installed Xcode 26+; pass `version` to pin
a specific major.minor (e.g. `26.3`) for matrix coverage.

# TODO: remove this action and every `- uses: ./.github/actions/select-xcode`
# call site once GitHub's macos-latest image defaults to an Xcode that ships
Expand All @@ -12,15 +14,25 @@ description: >
# (look for "(default)" in the Xcode table). When the default version meets
# the package's swift-tools-version, the explicit selection becomes redundant.

inputs:
version:
description: >
Xcode version glob to match (e.g. "26.3" matches Xcode_26.3*.app).
Defaults to "26", which picks the newest Xcode 26+ installed.
required: false
default: "26"

runs:
using: composite
steps:
- shell: bash
env:
XCODE_VERSION: ${{ inputs.version }}
run: |
set -euo pipefail
xcode=$(ls -d /Applications/Xcode_26*.app 2>/dev/null | sort -V | tail -1)
xcode=$(ls -d /Applications/Xcode_${XCODE_VERSION}*.app 2>/dev/null | sort -V | tail -1)
if [[ -z "$xcode" ]]; then
echo "No Xcode 26+ installed on this runner image." >&2
echo "No Xcode matching /Applications/Xcode_${XCODE_VERSION}*.app installed on this runner image." >&2
ls /Applications | grep -i xcode >&2 || true
exit 1
fi
Expand Down
21 changes: 19 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,28 @@ permissions:

jobs:
test-pinned:
name: Test (pinned artifactbundle)
runs-on: macos-latest
# Matrix Xcode coverage to catch issues like the SE-0482 artifactbundle
# module-map import failure reported on Xcode 26.3 (issue #33), which
# the "newest 26+" picker on macos-latest does not exercise.
# Xcode 26.4+ requires macOS 26 (Tahoe), so it must run on macos-26;
# 26.3 is the highest Xcode that installs on macos-15 (Sequoia).
name: Test (pinned artifactbundle, Xcode ${{ matrix.xcode }})
strategy:
fail-fast: false
matrix:
include:
- os: macos-15
xcode: "26.3"
- os: macos-26
xcode: "26.4"
- os: macos-26
xcode: "26.5"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: ./.github/actions/select-xcode
with:
version: ${{ matrix.xcode }}
- name: Run tests
run: swift test

Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import PackageDescription
// dependency consumers (both `Context.packageDirectory` and `#filePath` return
// synthetic paths during dep evaluation).
let tokenizersRustArtifactBundleURL =
"https://github.com/DePasqualeOrg/swift-tokenizers/releases/download/tokenizers-rust-0.6.1/TokenizersRust-0.6.1.artifactbundle.zip"
"https://github.com/DePasqualeOrg/swift-tokenizers/releases/download/tokenizers-rust-0.6.3/TokenizersRust-0.6.3.artifactbundle.zip"
let tokenizersRustArtifactBundleChecksum =
"8002b3bffd226b10d64cbe632804e5fc5bc7716ec30f2b1e058b95f25637c76c"
"95e42afc2d1edbf2bd0209cd1e2cb202c1059900c1180942377cc3e800b52dc9"

let docsEnabled = Context.environment["TOKENIZERS_ENABLE_DOCS"] == "1"
let localRustArtifactPath = Context.environment["TOKENIZERS_RUST_LOCAL_ARTIFACTBUNDLE_PATH"]
Expand Down
2 changes: 1 addition & 1 deletion Sources/Tokenizers/RustTokenizer.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright © Anthony DePasquale

import Foundation
@_implementationOnly import TokenizersFFI
import TokenizersFFI

private struct RustTokenizerDescriptor {
let runtimeConfiguration: TokenizerRuntimeConfiguration
Expand Down
Loading
Loading