Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

Commit f2f3ebc

Browse files
committed
Initial commit
0 parents  commit f2f3ebc

File tree

12 files changed

+876
-0
lines changed

12 files changed

+876
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- "*"
9+
10+
jobs:
11+
12+
"sanity-Tests":
13+
runs-on: macOS-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
- name: Install swiftformat
18+
run: brew install swiftformat
19+
- name: Run sanity
20+
run: ./scripts/sanity.sh .
21+
22+
"tuxOS-Tests":
23+
runs-on: ubuntu-latest
24+
strategy:
25+
matrix:
26+
images:
27+
- swift:5.1
28+
- swift:5.2
29+
- swiftlang/swift:nightly-5.3-bionic
30+
- swiftlang/swift:nightly-bionic
31+
container:
32+
image: ${{ matrix.images }}
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v2
36+
- name: Test
37+
run: swift test --enable-code-coverage --enable-test-discovery
38+
- name: Convert coverage files
39+
run: |
40+
llvm-cov export -format="lcov" \
41+
.build/debug/swift-extras-uuidPackageTests.xctest \
42+
-ignore-filename-regex="\/Tests\/" \
43+
-instr-profile .build/debug/codecov/default.profdata > info.lcov
44+
- name: Install curl
45+
run: apt-get update && apt-get install -y curl # required by the codecov action.
46+
- name: Upload to codecov.io
47+
uses: codecov/codecov-action@v1
48+
with:
49+
file: info.lcov
50+
51+
"tuxOS-Performance-Tests":
52+
runs-on: ubuntu-latest
53+
strategy:
54+
matrix:
55+
images:
56+
- swift:5.1
57+
- swift:5.2
58+
- swiftlang/swift:nightly-5.3-bionic
59+
- swiftlang/swift:nightly-bionic
60+
container:
61+
image: ${{ matrix.images }}
62+
steps:
63+
- name: Checkout
64+
uses: actions/checkout@v2
65+
- name: Build and run test
66+
run: swift run -c release --enable-test-discovery
67+
68+
"macOS-Tests":
69+
runs-on: macOS-latest
70+
strategy:
71+
matrix:
72+
xcode:
73+
- Xcode_11.1.app
74+
- Xcode_11.6.app
75+
- Xcode_12.app
76+
steps:
77+
- name: Checkout
78+
uses: actions/checkout@v2
79+
- name: Show all Xcode versions
80+
run: ls -an /Applications/ | grep Xcode*
81+
- name: Change Xcode command line tools
82+
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}/Contents/Developer
83+
- name: Swift version
84+
run: swift --version
85+
- name: Xcode Tests
86+
run: |
87+
swift package generate-xcodeproj --skip-extra-files --enable-code-coverage
88+
xcodebuild -quiet -parallel-testing-enabled YES -scheme swift-extras-uuid-Package -enableCodeCoverage YES build test
89+
- name: Codecov
90+
run: bash <(curl -s https://codecov.io/bash) -f info.lcov
91+
92+
"macOS-Performance-Tests":
93+
runs-on: macOS-latest
94+
strategy:
95+
matrix:
96+
xcode:
97+
- Xcode_11.1.app
98+
- Xcode_11.6.app
99+
- Xcode_12.app
100+
steps:
101+
- name: Checkout
102+
uses: actions/checkout@v2
103+
- name: Change Xcode command line tools
104+
run: sudo xcode-select -s /Applications/${{ matrix.xcode }}/Contents/Developer
105+
- name: Swift version
106+
run: swift --version
107+
- name: Build and run test
108+
run: swift run -c release

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.DS_Store
2+
/.build
3+
/Packages
4+
/*.xcodeproj
5+
xcuserdata/

.swiftformat

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# file options
2+
3+
--swiftversion 5.1
4+
--exclude .build
5+
6+
# format options
7+
8+
--self insert
9+
--patternlet inline
10+
--stripunusedargs unnamed-only
11+
--ifdef no-indent
12+
13+
# rules

Package.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// swift-tools-version:5.1
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "swift-extras-uuid",
8+
products: [
9+
.library(name: "ExtrasUUID", targets: ["ExtrasUUID"]),
10+
],
11+
targets: [
12+
.target(name: "PerfTests", dependencies: ["ExtrasUUID"]),
13+
.target(name: "ExtrasUUID", dependencies: []),
14+
.testTarget(name: "ExtrasUUIDTests", dependencies: ["ExtrasUUID"]),
15+
]
16+
)

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# swift-extras-uuid
2+
3+
A reimplementation of UUID in Swift without the use of Foundation.

0 commit comments

Comments
 (0)