Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
Add swift package (#10)
Browse files Browse the repository at this point in the history
* Add swift package

* Bring back mocks

* permissions

* docs
  • Loading branch information
graszka22 authored Aug 17, 2023
1 parent 65fda74 commit edc0d5f
Show file tree
Hide file tree
Showing 22 changed files with 31 additions and 272 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
run: brew install swift-format xcbeautify

- name: Run formatter 🎨
run: swift-format format -i -r ./JellyfishClientSdk/Sources/**/*.swift --configuration swift-format-config.json
run: swift-format format -i -r ./Sources/**/*.swift --configuration swift-format-config.json

- name: Run lint 👀
run: swift-format lint -r -s ./JellyfishClientSdk/**/**/*.swift --configuration swift-format-config.json
run: swift-format lint -r -s ./**/**/*.swift --configuration swift-format-config.json

- name: Generate mocks 🫥
run: cd JellyfishClientSdk && swift package update Mockingbird && ./gen-mocks.sh
run: swift package update Mockingbird && ./gen-mocks.sh

- name: Run tests 💀
run: set -o pipefail && xcodebuild -scheme JellyfishClientSdkTests test -destination "platform=iOS Simulator,name=iPhone 14,OS=latest" | xcbeautify
4 changes: 2 additions & 2 deletions .github/workflows/publish_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v3

- name: Build Docs
run: mkdir JellyfishClientSdk/docs && xcodebuild docbuild -scheme JellyfishClientSdk -destination generic/platform=iOS OTHER_DOCC_FLAGS="--transform-for-static-hosting --output-path docs --hosting-base-path ios-client-sdk"
run: mkdir docs && xcodebuild docbuild -scheme JellyfishClientSdk -destination generic/platform=iOS OTHER_DOCC_FLAGS="--transform-for-static-hosting --output-path docs --hosting-base-path ios-client-sdk"

- name: Install coreutils
run: brew install coreutils
Expand All @@ -25,5 +25,5 @@ jobs:
env:
REPO: self
BRANCH: gh-pages
FOLDER: JellyfishClientSdk/docs
FOLDER: docs
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion JellyfishClient.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
9 changes: 0 additions & 9 deletions JellyfishClientSdk/.gitignore

This file was deleted.

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions JellyfishClientSdk/README.md

This file was deleted.

122 changes: 0 additions & 122 deletions JellyfishClientSdk/project.json

This file was deleted.

12 changes: 6 additions & 6 deletions JellyfishClientSdk/Package.resolved → Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"repositoryURL": "https://github.com/google/promises.git",
"state": {
"branch": null,
"revision": "ec957ccddbcc710ccc64c9dcbd4c7006fcf8b73a",
"version": "2.2.0"
"revision": "e70e889c0196c76d22759eb50d6a0270ca9f1d9e",
"version": "2.3.1"
}
},
{
Expand Down Expand Up @@ -60,17 +60,17 @@
"repositoryURL": "https://github.com/apple/swift-log.git",
"state": {
"branch": null,
"revision": "32e8d724467f8fe623624570367e3d50c5638e46",
"version": "1.5.2"
"revision": "532d8b529501fb73a2455b179e0bbb6d49b652ed",
"version": "1.5.3"
}
},
{
"package": "SwiftProtobuf",
"repositoryURL": "https://github.com/apple/swift-protobuf.git",
"state": {
"branch": null,
"revision": "f25867a208f459d3c5a06935dceb9083b11cd539",
"version": "1.22.0"
"revision": "ce20dc083ee485524b802669890291c0d8090170",
"version": "1.22.1"
}
},
{
Expand Down
3 changes: 2 additions & 1 deletion JellyfishClientSdk/Package.swift → Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ let package = Package(
.product(name: "MembraneRTC", package: "membrane-webrtc-ios"),
.product(name: "SwiftProtobuf", package: "swift-protobuf"),
.product(name: "Starscream", package: "Starscream"),
]),
],
path: "Sources"),
.testTarget(name: "JellyfishClientSdkTests", dependencies: ["JellyfishClientSdk", "Mockingbird"]),
]
)
2 changes: 1 addition & 1 deletion compile_proto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ printf "DONE\n\n"
file="./protos/jellyfish/peer_notifications.proto"

printf "Compiling: file $file\n"
protoc --swift_out="./JellyfishClientSdk/Sources/JellyfishClientSdk" $file
protoc --swift_out="./Sources/JellyfishClientSdk" $file
printf "DONE\n"
2 changes: 1 addition & 1 deletion JellyfishClientSdk/gen-mocks.sh → gen-mocks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ swift package describe --type json > project.json
.build/checkouts/mockingbird/mockingbird generate --project project.json \
--output-dir Tests/JellyfishClientSdkTests/JellyfishClientSdkMocks \
--testbundle JellyfishClientSdkTests \
--targets JellyfishClientSdk
--targets JellyfishClientSdk

0 comments on commit edc0d5f

Please sign in to comment.