diff --git a/.github/workflows/Test.yml b/.github/workflows/Test.yml deleted file mode 100644 index 56783de..0000000 --- a/.github/workflows/Test.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: test - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - test_macos: - if: | - !contains(github.event.head_commit.message, '[ci skip]') && - !contains(github.event.head_commit.message, '[ci skip test]') && - !contains(github.event.head_commit.message, '[ci skip test_macos]') - runs-on: macos-26 - timeout-minutes: 30 - steps: - - uses: actions/checkout@v3 - - name: Select Xcode 26.2 - run: sudo xcode-select -s /Applications/Xcode_26.2.app - - name: Run tests - run: swift test diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f4bd8cb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + branches: + - '*' + workflow_dispatch: + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + xcodebuild-test: + name: xcodebuild-test + if: | + !contains(github.event.head_commit.message, '[ci skip]') && + !contains(github.event.head_commit.message, '[ci skip test]') && + !contains(github.event.head_commit.message, '[ci skip test_macos]') + runs-on: macos-latest + strategy: + matrix: + command: [test] + platform: [iOS, macOS, macCatalyst, tvOS, visionOS, watchOS] + xcode: ['26.2'] + timeout-minutes: 30 + steps: + - uses: actions/checkout@v6 + - name: Test + uses: capturecontext/swift-package-action/build@main + with: + xcode: ${{ matrix.xcode }} + cache-derived-data: true + action: xcodebuild-test + platform: ${{ matrix.platform }} + workspace: .github/package.xcworkspace + scheme: DeclarativeConfiguration + config: Debug diff --git a/LICENSE b/LICENSE index bb91ee3..3ef7fd7 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2025 CaptureContext +Copyright (c) 2026 CaptureContext Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Package.swift b/Package.swift index 26539d4..69005f0 100644 --- a/Package.swift +++ b/Package.swift @@ -1,4 +1,4 @@ -// swift-tools-version:6.0 +// swift-tools-version: 6.0 import PackageDescription diff --git a/Package@swift-5.10.swift b/Package@swift-5.9.swift similarity index 98% rename from Package@swift-5.10.swift rename to Package@swift-5.9.swift index 0f0870a..720504a 100644 --- a/Package@swift-5.10.swift +++ b/Package@swift-5.9.swift @@ -1,4 +1,4 @@ -// swift-tools-version:5.10 +// swift-tools-version: 5.9 import PackageDescription diff --git a/README.md b/README.md index 6cf6eb5..f36b15b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # swift-declarative-configuration -[![Test](https://github.com/CaptureContext/swift-declarative-configuration/actions/workflows/Test.yml/badge.svg)](https://github.com/CaptureContext/swift-declarative-configuration/actions/workflows/Test.yml) [![SwiftPM 6.2](https://img.shields.io/badge/swiftpm-6.2_|_5.10-ED523F.svg?style=flat)](https://swift.org/download/) ![Platforms](https://img.shields.io/badge/platforms-iOS_11_|_macOS_10.13_|_tvOS_11_|_watchOS_4_|_Catalyst_13-ED523F.svg?style=flat) [![@capture_context](https://img.shields.io/badge/contact-@capture__context-1DA1F2.svg?style=flat&logo=twitter)](https://twitter.com/capture_context) +[![Test](https://github.com/CaptureContext/swift-declarative-configuration/actions/workflows/Test.yml/badge.svg)](https://github.com/CaptureContext/swift-declarative-configuration/actions/workflows/Test.yml) [![Swift 6.0](https://img.shields.io/badge/swiftpm-6.0_|_5.9-ED523F.svg?style=flat)](https://swift.org/download/) ![Platforms](https://img.shields.io/badge/Platforms-iOS_11_|_macOS_10.13_|_tvOS_11_|_watchOS_4_|_Catalyst_13-ED523F.svg?style=flat) [![@capture_context](https://img.shields.io/badge/Contact-@capture__context-1DA1F2.svg?style=flat&logo=twitter)](https://twitter.com/capture_context) **DeclarativeConfiguration** provides a declarative, fluent way to configure objects and values in Swift. It enables expressive inline configuration, composable setup logic, and consistent configuration patterns across codebases. @@ -505,4 +505,4 @@ It's [no longer a part of `DeclarativeConfiguration` product](#package-structure ## License -This library is released under the MIT license. See [LICENSE](./LICENSE) for details. +This library is released under the MIT license. See [LICENSE](LICENSE) for details. diff --git a/Scripts/format.sh b/Scripts/format.sh deleted file mode 100755 index 0cd847a..0000000 --- a/Scripts/format.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -_get_parent_dir_abs_path() { - echo "$(cd "$(dirname "$1")" && pwd)" -} - -# ––––––––––––––––––––––––– Constants –––––––––––––––––––––––––– - -SCRIPT_DIR=$(_get_parent_dir_abs_path $0) -TOOLS_DIR="${SCRIPT_DIR}/.bin/" -TOOL_NAME="swiftformat" -TOOL="${TOOLS_DIR}/${TOOL_NAME}" - -# ––––––––––––––––––––––––––– Script ––––––––––––––––––––––––––– - -cd ${SCRIPT_DIR} -cd .. - -${TOOL} . \ - --config .swiftformat diff --git a/Scripts/install_swift-format.sh b/Scripts/install_swift-format.sh deleted file mode 100755 index afbc2e3..0000000 --- a/Scripts/install_swift-format.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/bash - -_get_parent_dir_abs_path() { - echo "$(cd "$(dirname "$1")" && pwd)" -} - -# ––––––––––––––––––––––––––– Config ––––––––––––––––––––––––––– - -TOOL_NAME="swiftformat" -TOOL_OWNER="nicklockwood" -TOOL_VERSION="0.50.5" - -# ––––––––––––––––––––––––– Constants –––––––––––––––––––––––––– - -SCRIPT_DIR=$(_get_parent_dir_abs_path $0) -TOOLS_INSTALL_PATH="${SCRIPT_DIR}/.bin" -TOOL_INSTALL_PATH="${TOOLS_INSTALL_PATH}/${TOOL_NAME}" -TOOL_DOWNLOAD_DIR="${TOOLS_INSTALL_PATH}/_${TOOL_NAME}" - -TOOL=${TOOL_INSTALL_PATH} -TOOL_REPO="https://github.com/${TOOL_OWNER}/${TOOL_NAME}" -ARCHIVE_NAME="${TOOL_NAME}.artifactbundle" -ARCHIVE_URL="${TOOL_REPO}/releases/download/${TOOL_VERSION}/${ARCHIVE_NAME}.zip" - -# ––––––––––––––––––––––––––– Steps –––––––––––––––––––––––––––– - -tool_fetch() { - curl -L ${ARCHIVE_URL} -o "${TOOL_DOWNLOAD_DIR}/${ARCHIVE_NAME}.zip" -} - -tool_extract() { - unzip "${TOOL_DOWNLOAD_DIR}/${ARCHIVE_NAME}.zip" -d ${TOOL_DOWNLOAD_DIR} -} - -tool_install() { - install "${TOOL_DOWNLOAD_DIR}/${ARCHIVE_NAME}/${TOOL_NAME}-${TOOL_VERSION}-macos/bin/${TOOL_NAME}" "${TOOLS_INSTALL_PATH}" -} - -# ––––––––––––––––––––––––––– Script ––––––––––––––––––––––––––– - -set_bold=$(tput bold) -set_normal=$(tput sgr0) - -log() { - printf "\n$1 ${set_bold}$2${set_normal}\n" -} - -clean_up() { - rm -rf "${TOOL_DOWNLOAD_DIR}" -} - -set -e -trap clean_up err exit SIGTERM SIGINT - -if [ -f "${TOOL_INSTALL_PATH}" ]; then - log "⚠️" " ${TOOL_NAME} already installed" - exit 0 -fi - -if [ ! -d "${TOOL_DOWNLOAD_DIR}" ]; then - mkdir -p "${TOOL_DOWNLOAD_DIR}" -fi - -cd "${TEMP_INSTALL_PATH}" - -log "⬇️" " Fetching ${TOOL_NAME}...\n" - -tool_fetch - -log "📦" " Extracting ${TOOL_NAME}...\n" - -tool_extract - -log "♻️" " Installing ${TOOL_NAME}..." - -tool_install - -log "💧" "Performing cleanup..." -clean_up - -if [ -f "${TOOL_INSTALL_PATH}" ]; then - log "✅" "${TOOL_NAME} successfully installed" - exit 0 -fi - -log "🚫" "${TOOL_NAME} failed to install"