diff --git a/.github/actions/checkout-swift-headers/action.yml b/.github/actions/checkout-swift-headers/action.yml deleted file mode 100644 index 970206b..0000000 --- a/.github/actions/checkout-swift-headers/action.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Checkout Swift Headers -description: | - This action checks-out certain header files from the swiftlang/swift - repository. - -inputs: - path: - description: Relative path under $GITHUB_WORKSPACE to place the repository - required: true - swift-version-major: - description: The Swift toolchain major version. - required: true - swift-version-minor: - description: The Swift toolchain minor version. - required: true - -runs: - using: "composite" - steps: - - uses: actions/checkout@v4 - with: - repository: swiftlang/swift - path: ${{ inputs.path }} - ref: release/${{ inputs.swift-version-major }}.${{ inputs.swift-version-minor }} - sparse-checkout: | - include/swift - stdlib/include - stdlib/public/SwiftShims - stdlib/public/runtime/MetadataAllocatorTags.def - - name: Write CMakeConfig.h file - run: | - cat > include/swift/Runtime/CMakeConfig.h << EOF - #ifndef SWIFT_RUNTIME_CMAKECONFIG_H - #define SWIFT_RUNTIME_CMAKECONFIG_H - #define SWIFT_VERSION_MAJOR "${SWIFT_VERSION_MAJOR}" - #define SWIFT_VERSION_MINOR "${SWIFT_VERSION_MINOR}" - #endif - EOF - shell: bash - working-directory: ${{ inputs.path }} - env: - SWIFT_VERSION_MAJOR: ${{ inputs.swift-version-major }} - SWIFT_VERSION_MINOR: ${{ inputs.swift-version-minor }} diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index a63e158..cb4659b 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -16,13 +16,7 @@ jobs: steps: - name: Set up Xcode run: sudo xcode-select -s "/Applications/Xcode_26.4.app" - - id: swift-version - run: | - MAJOR=$(echo "${{ matrix.swift }}" | cut -d. -f1) - MINOR=$(echo "${{ matrix.swift }}" | cut -d. -f2) - echo "major=$MAJOR" >> $GITHUB_OUTPUT - echo "minor=$MINOR" >> $GITHUB_OUTPUT - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: true - name: Build @@ -30,10 +24,10 @@ jobs: - name: Build XCFramework run: ./Scripts/create-xcframework.sh - name: Upload XCFramework - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: - name: Compute.xcframework.zip path: .build/Xcode/Frameworks/Compute.xcframework.zip + archive: false linux-build: name: Linux @@ -48,7 +42,7 @@ jobs: run: | apt-get update apt-get install -y libssl-dev - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: submodules: true - name: Build diff --git a/Scripts/build.sh b/Scripts/build.sh deleted file mode 100755 index 8f6e12a..0000000 --- a/Scripts/build.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/zsh - -swift build \ - -Xcc -I$(swiftly use --print-location)/usr/include \ - -Xcc -Wno-elaborated-enum-base - diff --git a/Scripts/clone-swift.sh b/Scripts/clone-swift.sh deleted file mode 100755 index a7a4b9b..0000000 --- a/Scripts/clone-swift.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/zsh - -set -e - -# Default values -CHECKOUT_PATH=".build/checkouts/swift" -SWIFT_VERSION="" - -# Parse arguments -while [[ $# -gt 0 ]]; do - case $1 in - --path) - CHECKOUT_PATH="$2" - shift 2 - ;; - --swift-version) - SWIFT_VERSION="$2" - shift 2 - ;; - *) - echo "Unknown option: $1" - echo "Usage: $0 [--path ] [--swift-version ]" - exit 1 - ;; - esac -done - -# Detect Swift version if not provided -if [ -z "$SWIFT_VERSION" ]; then - SWIFT_VERSION=$(swift --version 2>/dev/null | grep -oE 'Swift version [0-9]+\.[0-9]+' | grep -oE '[0-9]+\.[0-9]+') - echo "Detected Swift version: $SWIFT_VERSION" -fi - -SWIFT_VERSION_MAJOR=$(echo "$SWIFT_VERSION" | cut -d. -f1) -SWIFT_VERSION_MINOR=$(echo "$SWIFT_VERSION" | cut -d. -f2) - -# Remove existing checkout if present -rm -rf "$CHECKOUT_PATH" -mkdir -p "$CHECKOUT_PATH" - -# Clone with sparse checkout -git clone --filter=blob:none --no-checkout --depth 1 \ - --branch "release/$SWIFT_VERSION_MAJOR.$SWIFT_VERSION_MINOR" \ - git@github.com:swiftlang/swift.git "$CHECKOUT_PATH" - -cd "$CHECKOUT_PATH" - -git sparse-checkout set --no-cone \ - include/swift \ - stdlib/include \ - stdlib/public/SwiftShims \ - stdlib/public/runtime/MetadataAllocatorTags.def - -git checkout - -# Write CMakeConfig.h file -cat > include/swift/Runtime/CMakeConfig.h << EOF -#ifndef SWIFT_RUNTIME_CMAKECONFIG_H -#define SWIFT_RUNTIME_CMAKECONFIG_H -#define SWIFT_VERSION_MAJOR "$SWIFT_VERSION_MAJOR" -#define SWIFT_VERSION_MINOR "$SWIFT_VERSION_MINOR" -#endif -EOF - -echo "The Swift repository has been cloned to $CHECKOUT_PATH"