Skip to content

Commit

Permalink
Release 1.0.0 (#9)
Browse files Browse the repository at this point in the history
* Change the locking mechanism from `DispatchSemaphore` to `unfair_lock_os` (#2)

* Implement `os_unfair_lock`

* Update `CHANGELOG.md`

* Integrate `Danger` (#3)

* Integrate `Danger`

* Update `ci.yml`

* Add `SwiftLint` job in `ci.yml`

* Update `CHANGELOG.md`

* Integrate `CodeCov` (#4)

* Integrate `CodeCov`

* Update `CHANGELOG.md`

* Update `pre-commit` hook (#5)

* Update `pre-commit` hook

* Fix `SwiftLint` warnings

* Update `CHANGELOG.md`

* `visionOS` support (#6)

* `visionOS` support

* Update `.swiftlint.yml`

* Update `CHANGELOG.md`

* Add `sdk` key (#7)

* Update `README.md` & `CHANGELOG.md` (#8)

* Update `README.md`

* Update `CHANGELOG.md`

* Update `README.md`
  • Loading branch information
nik3212 authored Nov 6, 2023
1 parent c99f771 commit 53fae2f
Show file tree
Hide file tree
Showing 18 changed files with 595 additions and 55 deletions.
33 changes: 27 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,24 @@ on:
- main
- dev
pull_request:
branches: [ main ]

concurrency:
group: ci
cancel-in-progress: true
paths:
- '.swiftlint.yml'
- ".github/workflows/**"
- "Package.swift"
- "Source/**"
- "Tests/**"

jobs:
SwiftLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: GitHub Action for SwiftLint
uses: norio-nomura/[email protected]
with:
args: --strict
env:
DIFF_BASE: ${{ github.base_ref }}
Latest:
name: Test Latest (iOS, macOS, tvOS, watchOS)
runs-on: macOS-12
Expand All @@ -26,16 +37,26 @@ jobs:
- destination: "OS=16.1,name=iPhone 14 Pro"
name: "iOS"
scheme: "Atomic"
sdk: iphonesimulator
- destination: "OS=16.1,name=Apple TV"
name: "tvOS"
scheme: "Atomic"
sdk: appletvsimulator
- destination: "OS=9.1,name=Apple Watch Series 8 (45mm)"
name: "watchOS"
scheme: "Atomic"
sdk: watchsimulator
- destination: "platform=macOS"
name: "macOS"
scheme: "Atomic"
sdk: macosx
steps:
- uses: actions/checkout@v3
- name: ${{ matrix.name }}
run: xcodebuild test -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" clean
run: xcodebuild test -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "./${{ matrix.sdk }}.xcresult"
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
xcode: true
xcode_archive_path: "./${{ matrix.sdk }}.xcresult"
29 changes: 29 additions & 0 deletions .github/workflows/danger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Danger

on:
pull_request:
types: [synchronize, opened, reopened, labeled, unlabeled, edited]

env:
LC_CTYPE: en_US.UTF-8
LANG: en_US.UTF-8

jobs:
run-danger:
runs-on: ubuntu-latest
steps:
- name: ruby setup
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- name: Checkout code
uses: actions/checkout@v2
- name: Setup gems
run: |
gem install bundler
bundle install --clean --path vendor/bundle
- name: danger
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
run: bundle exec danger --verbose
1 change: 1 addition & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ excluded:
- Tests
- Package.swift
- .build
- [email protected]

# Rules

Expand Down
102 changes: 102 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/Atomic.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1410"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Atomic"
BuildableName = "Atomic"
BlueprintName = "Atomic"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AtomicTests"
BuildableName = "AtomicTests"
BlueprintName = "AtomicTests"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES"
onlyGenerateCoverageForSpecifiedTargets = "YES">
<CodeCoverageTargets>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Atomic"
BuildableName = "Atomic"
BlueprintName = "Atomic"
ReferencedContainer = "container:">
</BuildableReference>
</CodeCoverageTargets>
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AtomicTests"
BuildableName = "AtomicTests"
BlueprintName = "AtomicTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "Atomic"
BuildableName = "Atomic"
BlueprintName = "Atomic"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Change Log
All notable changes to this project will be documented in this file.

#### 1.0.x Releases
- `1.0.x` Releases - [1.0.0](#100)

#### 0.0.x Releases
- `0.0.x` Releases - [0.0.1](#001)

---

## [1.0.0](https://github.com/space-code/atomic/releases/tag/1.0.0)
Released on 2023-11-06.

## Added
- Add `visionOS` support
- Added in Pull Request [#6](https://github.com/space-code/atomic/pull/6).
- Updating pre-commit hook rules
- Added in Pull Request [#5](https://github.com/space-code/atomic/pull/5).
- Integrate `CodeCov`
- Added in Pull Request [#4](https://github.com/space-code/atomic/pull/4).
- Integrate `Danger`
- Added in Pull Request [#3](https://github.com/space-code/atomic/pull/3).
- Change the locking mechanism from `DispatchSemaphore` to `unfair_lock_os` and add support for `@dynamicMemberLookup`
- Added in Pull Request [#2](https://github.com/space-code/atomic/pull/2).

---

## [0.0.1](https://github.com/space-code/atomic/releases/tag/0.0.1)
Released on 2023-06-18.

#### Added
- Initial release of Atomic.
- Added by [Nikita Vasilev](https://github.com/nik3212).
1 change: 1 addition & 0 deletions Dangerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
danger.import_dangerfile(github: 'space-code/dangerfile')
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source "https://rubygems.org"

gem 'danger'
66 changes: 66 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
base64 (0.1.1)
claide (1.1.0)
claide-plugins (0.9.2)
cork
nap
open4 (~> 1.3)
colored2 (3.1.2)
cork (0.3.0)
colored2 (~> 3.1)
danger (9.3.2)
claide (~> 1.0)
claide-plugins (>= 0.9.2)
colored2 (~> 3.1)
cork (~> 0.1)
faraday (>= 0.9.0, < 3.0)
faraday-http-cache (~> 2.0)
git (~> 1.13)
kramdown (~> 2.3)
kramdown-parser-gfm (~> 1.0)
no_proxy_fix
octokit (~> 6.0)
terminal-table (>= 1, < 4)
faraday (2.7.11)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-http-cache (2.5.0)
faraday (>= 0.8)
faraday-net_http (3.0.2)
git (1.18.0)
addressable (~> 2.8)
rchardet (~> 1.8)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
nap (1.1.0)
no_proxy_fix (0.1.2)
octokit (6.1.1)
faraday (>= 1, < 3)
sawyer (~> 0.9)
open4 (1.3.4)
public_suffix (5.0.3)
rchardet (1.8.0)
rexml (3.2.6)
ruby2_keywords (0.0.5)
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.5.0)

PLATFORMS
x86_64-darwin-22

DEPENDENCIES
danger

BUNDLED WITH
2.4.21
3 changes: 2 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version: 5.5
// swift-tools-version: 5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand All @@ -10,6 +10,7 @@ let package = Package(
.iOS(.v13),
.watchOS(.v6),
.tvOS(.v11),
.visionOS(.v1),
],
products: [
.library(name: "Atomic", targets: ["Atomic"]),
Expand Down
28 changes: 28 additions & 0 deletions [email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// 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: "Atomic",
platforms: [
.macOS(.v10_15),
.iOS(.v13),
.watchOS(.v6),
.tvOS(.v11),
],
products: [
.library(name: "Atomic", targets: ["Atomic"]),
],
dependencies: [],
targets: [
.target(
name: "Atomic",
dependencies: []
),
.testTarget(
name: "AtomicTests",
dependencies: ["Atomic"]
),
]
)
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

<p align="center">
<a href="https://github.com/space-code/atomic/blob/main/LICENSE"><img alt="License" src="https://img.shields.io/github/license/space-code/atomic?style=flat"></a>
<a href="https://developer.apple.com/"><img alt="Platform" src="https://img.shields.io/badge/platform-ios%20%7C%20osx%20%7C%20watchos%20%7C%20tvos-%23989898"/></a>
<a href="https://developer.apple.com/swift"><img alt="Swift5.5" src="https://img.shields.io/badge/language-Swift5.5-orange.svg"/></a>
<a href="https://swiftpackageindex.com/space-code/atomic"><img alt="Swift Compability" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fspace-code%2Fatomic%2Fbadge%3Ftype%3Dswift-versions">
<a href="https://swiftpackageindex.com/space-code/atomic"><img alt="Platform Compability" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fspace-code%2Fatomic%2Fbadge%3Ftype%3Dplatforms">
<a href="https://github.com/space-code/atomic"><img alt="CI" src="https://github.com/space-code/atomic/actions/workflows/ci.yml/badge.svg?branch=main"></a>
<a href="https://github.com/apple/swift-package-manager" alt="RxSwift on Swift Package Manager" title="RxSwift on Swift Package Manager"><img src="https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg" /></a>
<a href="https://codecov.io/gh/space-code/atomic"><img alt="CodeCov" src="https://codecov.io/gh/space-code/atomic/graph/badge.svg?token=XEAA2PB5PP"></a>
</p>

## Description
`atomic` is a fast, safe class for making values thread-safe in Swift.
`atomic` is a Swift property wrapper designed to make values thread-safe.

- [Usage](#usage)
- [Requirements](#requirements)
Expand Down Expand Up @@ -37,7 +37,7 @@ Once you have your Swift package set up, adding `atomic` as a dependency is as e

```swift
dependencies: [
.package(url: "https://github.com/space-code/atomic.git", .upToNextMajor(from: "0.0.1"))
.package(url: "https://github.com/space-code/atomic.git", .upToNextMajor(from: "1.0.0"))
]
```

Expand Down
Loading

0 comments on commit 53fae2f

Please sign in to comment.