Skip to content

1.1.0 #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Feb 29, 2020
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
29 changes: 21 additions & 8 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
name: Swift
name: Test

on: [push]
on: [push, pull_request]

jobs:
build:

runs-on: macOS-latest

strategy:
matrix:
os: [macOS-latest, ubuntu-latest]
swift: ["5.1"]
runs-on: ${{ matrix.os }}
env:
SWIFT_VERSION: ${{ matrix.swift }}
SWIFT_EXEC: .swiftenv/shims/swift
steps:
- uses: actions/checkout@v2
- name: Install Swift
run: |
git clone https://github.com/kylef/swiftenv.git ~/.swiftenv
~/.swiftenv/bin/swiftenv install $SWIFT_VERSION --skip-existing
~/.swiftenv/bin/swiftenv rehash
- name: Build
run: swift build -v
- name: Run Tests
run: swift test -v
run: |
~/$SWIFT_EXEC --version
~/$SWIFT_EXEC build -v
- name: Test
run: |
~/$SWIFT_EXEC test -v
5 changes: 5 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ opt_in_rules:

reporter: "xcode"

excluded:
- Tests/LinuxMain.swift
- Tests/HalfTests/XCTestManifests.swift
- Tests/CHalfTests/XCTestManifests.swift

identifier_name:
excluded:
- pi
Expand Down
317 changes: 317 additions & 0 deletions ATTRIBUTIONS

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Half.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "Half"
s.version = "1.0.2"
s.version = "1.1.0"
s.summary = "Swift Half-Precision Floating Point"
s.description = <<-DESC
A lightweight framework containing a Swift implementation for a half-precision floating point type for iOS, macOS, tvOS, and watchOS.
Expand All @@ -19,7 +19,7 @@ Pod::Spec.new do |s|
s.source = { :git => "https://github.com/SomeRandomiOSDev/Half.git", :tag => s.version.to_s }
s.source_files = 'Sources/**/*.{swift,h,c}'
s.frameworks = 'Foundation'
s.swift_versions = ['4.0', '4.2', '5.0']
s.swift_versions = ['5.0']
s.cocoapods_version = '>= 1.7.3'

end
54 changes: 37 additions & 17 deletions Half.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
DD94FBF923F3C5BB0041D4EC /* half.h in Headers */ = {isa = PBXBuildFile; fileRef = DDFEEC8423F0B6FF0096015C /* half.h */; settings = {ATTRIBUTES = (Public, ); }; };
DD94FBFA23F3C5BC0041D4EC /* half.h in Headers */ = {isa = PBXBuildFile; fileRef = DDFEEC8423F0B6FF0096015C /* half.h */; settings = {ATTRIBUTES = (Public, ); }; };
DD94FBFB23F3C5BD0041D4EC /* half.h in Headers */ = {isa = PBXBuildFile; fileRef = DDFEEC8423F0B6FF0096015C /* half.h */; settings = {ATTRIBUTES = (Public, ); }; };
DDB8120323F587890079FEB5 /* CHalfTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB8120223F587890079FEB5 /* CHalfTests.swift */; };
DDB8120423F587890079FEB5 /* CHalfTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB8120223F587890079FEB5 /* CHalfTests.swift */; };
DDB8120523F587890079FEB5 /* CHalfTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB8120223F587890079FEB5 /* CHalfTests.swift */; };
DDFEEC3D23EF13910096015C /* Half.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDFEEC3323EF13900096015C /* Half.framework */; };
DDFEEC4223EF13910096015C /* HalfTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDFEEC4123EF13910096015C /* HalfTests.swift */; };
DDFEECC723F2001A0096015C /* Half.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DDFEECBE23F2001A0096015C /* Half.framework */; };
Expand Down Expand Up @@ -88,11 +91,14 @@

/* Begin PBXFileReference section */
DD6F08D124008A7400749359 /* codecov.yml */ = {isa = PBXFileReference; lastKnownFileType = text.yaml; path = codecov.yml; sourceTree = "<group>"; };
DDB1DF3F240A25D900C20FED /* fp_extend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fp_extend.cpp; sourceTree = "<group>"; };
DDB1DF40240A25D900C20FED /* fp_trunc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fp_trunc.cpp; sourceTree = "<group>"; };
DDB8120223F587890079FEB5 /* CHalfTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CHalfTests.swift; sourceTree = "<group>"; };
DDFEEC3323EF13900096015C /* Half.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Half.framework; sourceTree = BUILT_PRODUCTS_DIR; };
DDFEEC3723EF13900096015C /* Half-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Half-Info.plist"; path = "Info/Half-Info.plist"; sourceTree = "<group>"; };
DDFEEC3723EF13900096015C /* Half-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Half-Info.plist"; path = "Plists/Half-Info.plist"; sourceTree = "<group>"; };
DDFEEC3C23EF13910096015C /* HalfTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HalfTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
DDFEEC4123EF13910096015C /* HalfTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HalfTests.swift; sourceTree = "<group>"; };
DDFEEC4323EF13910096015C /* HalfTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "HalfTests-Info.plist"; path = "../../Info/HalfTests-Info.plist"; sourceTree = "<group>"; };
DDFEEC4323EF13910096015C /* HalfTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "HalfTests-Info.plist"; path = "Plists/HalfTests-Info.plist"; sourceTree = "<group>"; };
DDFEEC8423F0B6FF0096015C /* half.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = half.h; sourceTree = "<group>"; };
DDFEECAB23F1BA550096015C /* Half.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; path = Half.podspec; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
DDFEECAC23F1BA550096015C /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = SOURCE_ROOT; };
Expand Down Expand Up @@ -174,11 +180,20 @@
DD94FBF723F3C50E0041D4EC /* Tests */ = {
isa = PBXGroup;
children = (
DDB1DF43240A279300C20FED /* CHalfTests */,
DDFEEC4023EF13910096015C /* HalfTests */,
);
path = Tests;
sourceTree = "<group>";
};
DDB1DF43240A279300C20FED /* CHalfTests */ = {
isa = PBXGroup;
children = (
DDB8120223F587890079FEB5 /* CHalfTests.swift */,
);
path = CHalfTests;
sourceTree = "<group>";
};
DDFEEC2923EF13900096015C = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -217,7 +232,6 @@
DDFEEC4123EF13910096015C /* HalfTests.swift */,
DDFEED4D23F26F170096015C /* Half+CodingTests.swift */,
DDFEED5123F2737B0096015C /* FunctionsTests.swift */,
DDFEEC4323EF13910096015C /* HalfTests-Info.plist */,
);
path = HalfTests;
sourceTree = "<group>";
Expand All @@ -243,6 +257,7 @@
DDFEECB023F1BA6E0096015C /* ATTRIBUTIONS */,
DDFEECB123F1BA730096015C /* LICENSE */,
DDFEEC3723EF13900096015C /* Half-Info.plist */,
DDFEEC4323EF13910096015C /* HalfTests-Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
Expand Down Expand Up @@ -279,6 +294,8 @@
isa = PBXGroup;
children = (
DDFEED8223F345690096015C /* half.c */,
DDB1DF3F240A25D900C20FED /* fp_extend.cpp */,
DDB1DF40240A25D900C20FED /* fp_trunc.cpp */,
);
path = src;
sourceTree = "<group>";
Expand Down Expand Up @@ -603,6 +620,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
DDB8120323F587890079FEB5 /* CHalfTests.swift in Sources */,
DDFEED4E23F26F170096015C /* Half+CodingTests.swift in Sources */,
DDFEED5223F2737B0096015C /* FunctionsTests.swift in Sources */,
DDFEEC4223EF13910096015C /* HalfTests.swift in Sources */,
Expand All @@ -624,6 +642,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
DDB8120423F587890079FEB5 /* CHalfTests.swift in Sources */,
DDFEED4F23F26F170096015C /* Half+CodingTests.swift in Sources */,
DDFEED5323F2737B0096015C /* FunctionsTests.swift in Sources */,
DDFEED0A23F200FE0096015C /* HalfTests.swift in Sources */,
Expand All @@ -645,6 +664,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
DDB8120523F587890079FEB5 /* CHalfTests.swift in Sources */,
DDFEED5023F26F170096015C /* Half+CodingTests.swift in Sources */,
DDFEED5423F2737B0096015C /* FunctionsTests.swift in Sources */,
DDFEED0B23F200FF0096015C /* HalfTests.swift in Sources */,
Expand Down Expand Up @@ -827,7 +847,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Info/Half-Info.plist";
INFOPLIST_FILE = "Plists/Half-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -852,7 +872,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Info/Half-Info.plist";
INFOPLIST_FILE = "Plists/Half-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -873,7 +893,7 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = "Info/HalfTests-Info.plist";
INFOPLIST_FILE = "Plists/HalfTests-Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -892,7 +912,7 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = "Info/HalfTests-Info.plist";
INFOPLIST_FILE = "Plists/HalfTests-Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -930,7 +950,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Info/Half-Info.plist";
INFOPLIST_FILE = "Plists/Half-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -956,7 +976,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Info/Half-Info.plist";
INFOPLIST_FILE = "Plists/Half-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -977,7 +997,7 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = "Info/HalfTests-Info.plist";
INFOPLIST_FILE = "Plists/HalfTests-Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
Expand All @@ -995,7 +1015,7 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = "Info/HalfTests-Info.plist";
INFOPLIST_FILE = "Plists/HalfTests-Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
Expand All @@ -1016,7 +1036,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Info/Half-Info.plist";
INFOPLIST_FILE = "Plists/Half-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -1042,7 +1062,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Info/Half-Info.plist";
INFOPLIST_FILE = "Plists/Half-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -1063,7 +1083,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = "Info/HalfTests-Info.plist";
INFOPLIST_FILE = "Plists/HalfTests-Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -1081,7 +1101,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = "Info/HalfTests-Info.plist";
INFOPLIST_FILE = "Plists/HalfTests-Info.plist";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -1104,7 +1124,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Info/Half-Info.plist";
INFOPLIST_FILE = "Plists/Half-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -1131,7 +1151,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = "Info/Half-Info.plist";
INFOPLIST_FILE = "Plists/Half-Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down
6 changes: 4 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ let package = Package(
],

products: [
.library(name: "Half", type: .dynamic, targets: ["Half"])
.library(name: "Half", targets: ["Half", "CHalf"])
],

targets: [
.target(name: "CHalf"),
.testTarget(name: "CHalfTests", dependencies: ["CHalf"]),

.target(name: "Half", dependencies: ["CHalf"]),
.testTarget(name: "HalfTests", dependencies: ["Half"])
],

swiftLanguageVersions: [.version("4"), .version("4.2"), .version("5")]
swiftLanguageVersions: [.version("5")]
)
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ Half
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/Half.svg)](https://cocoapods.org/pods/Half)
[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![Platform](https://img.shields.io/cocoapods/p/Half.svg)](https://cocoapods.org/pods/Half)
![Linux](https://img.shields.io/badge/platform-linux-lightgrey)
[![Build](https://travis-ci.com/SomeRandomiOSDev/Half.svg?branch=master)](https://travis-ci.com/SomeRandomiOSDev/Half)
[![Code Coverage](https://codecov.io/gh/SomeRandomiOSDev/Half/branch/master/graph/badge.svg)](https://codecov.io/gh/SomeRandomiOSDev/Half)
[![Codacy](https://api.codacy.com/project/badge/Grade/8ad52c117e4a46d9aa4699d22fc0bf49)](https://app.codacy.com/app/SomeRandomiOSDev/Half?utm_source=github.com&utm_medium=referral&utm_content=SomeRandomiOSDev/Half&utm_campaign=Badge_Grade_Dashboard)
![Swift](https://github.com/SomeRandomiOSDev/HalfTest/workflows/Swift/badge.svg)

**Half** is a lightweight framework containing a Swift implementation for a half-precision floating point type for iOS, macOS, tvOS, and watchOS.

Expand Down Expand Up @@ -70,7 +72,7 @@ Joseph Newton, somerandomiosdev@gmail.com
Credits
--------

**Half** is based heavily on the `Float`, `Double`, and `Float80` structures provided by Swift. See `ATTRIBUTIONS` for more details.
**Half** is based heavily on the implementations of the `Float`, `Double`, and `Float80` structures provided by Swift. See `ATTRIBUTIONS` for more details.

License
--------
Expand Down
Loading