Skip to content

Commit

Permalink
Add SwiftPM and Github actions support
Browse files Browse the repository at this point in the history
  • Loading branch information
master-nevi committed Nov 3, 2021
1 parent e0e74c5 commit 8234da8
Show file tree
Hide file tree
Showing 13 changed files with 111 additions and 18 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "OMGHTTPURLRQ CI"

on:
push:
branches:
- master
pull_request:
branches:
- '*'

jobs:
Pods:
name: Cocoapods Lint (Latest Stable Xcode)
runs-on: macOS-11
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Xcode version
uses: maxim-lobanov/[email protected]
with:
xcode-version: latest-stable

- name: Run pod lib lint
run: pod lib lint --fail-fast

SwiftPM:
name: SwiftPM (Latest Stable Xcode)
runs-on: macOS-11
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Xcode version
uses: maxim-lobanov/[email protected]
with:
xcode-version: latest-stable

- name: Build
run: swift build

- name: Run tests
run: swift test
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
/Carthage
/Cartfile.resolved
xcuserdata
.DS_Store
.DS_Store

# Swift Package Manager
.build/
.swiftpm/
Package.resolved
3 changes: 0 additions & 3 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions OMGHTTPURLRQ.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ Pod::Spec.new do |s|
s.default_subspecs = 'RQ'

s.subspec 'RQ' do |ss|
ss.source_files = 'Sources/OMGHTTPURLRQ.{h,m}'
ss.source_files = 'Sources/RQ/OMGHTTPURLRQ.{h,m}'
ss.dependency 'OMGHTTPURLRQ/UserAgent'
ss.dependency 'OMGHTTPURLRQ/FormURLEncode'
end

s.subspec 'UserAgent' do |ss|
ss.source_files = 'Sources/OMGUserAgent.{h,m}'
ss.source_files = 'Sources/UserAgent/OMGUserAgent.{h,m}'
end

s.subspec 'FormURLEncode' do |ss|
ss.source_files = 'Sources/OMGFormURLEncode.{h,m}'
ss.source_files = 'Sources/FormURLEncode/OMGFormURLEncode.{h,m}'
end

end
20 changes: 10 additions & 10 deletions OMGHTTPURLRQ.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
51D4A3D61BAC562700BC6AE2 /* OMGFormURLEncode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OMGFormURLEncode.h; path = Sources/OMGFormURLEncode.h; sourceTree = "<group>"; };
51D4A3D81BAC562700BC6AE2 /* OMGUserAgent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OMGUserAgent.h; path = Sources/OMGUserAgent.h; sourceTree = "<group>"; };
51D4A3D61BAC562700BC6AE2 /* OMGFormURLEncode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OMGFormURLEncode.h; path = Sources/FormURLEncode/OMGFormURLEncode.h; sourceTree = "<group>"; };
51D4A3D81BAC562700BC6AE2 /* OMGUserAgent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OMGUserAgent.h; path = Sources/UserAgent/OMGUserAgent.h; sourceTree = "<group>"; };
635FC0261AB8AE4600E3CFFE /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
6364E0251A7FFDED00F83CA1 /* OMGFormURLEncode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OMGFormURLEncode.h; path = Sources/OMGFormURLEncode.h; sourceTree = "<group>"; };
6364E0261A7FFDED00F83CA1 /* OMGFormURLEncode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OMGFormURLEncode.m; path = Sources/OMGFormURLEncode.m; sourceTree = "<group>"; };
6364E0271A7FFDED00F83CA1 /* OMGHTTPURLRQ.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OMGHTTPURLRQ.h; path = Sources/OMGHTTPURLRQ.h; sourceTree = "<group>"; };
6364E0281A7FFDED00F83CA1 /* OMGHTTPURLRQ.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OMGHTTPURLRQ.m; path = Sources/OMGHTTPURLRQ.m; sourceTree = "<group>"; };
6364E0291A7FFDED00F83CA1 /* OMGUserAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OMGUserAgent.h; path = Sources/OMGUserAgent.h; sourceTree = "<group>"; };
6364E02A1A7FFDED00F83CA1 /* OMGUserAgent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OMGUserAgent.m; path = Sources/OMGUserAgent.m; sourceTree = "<group>"; };
6364E0251A7FFDED00F83CA1 /* OMGFormURLEncode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OMGFormURLEncode.h; path = Sources/FormURLEncode/OMGFormURLEncode.h; sourceTree = "<group>"; };
6364E0261A7FFDED00F83CA1 /* OMGFormURLEncode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OMGFormURLEncode.m; path = Sources/FormURLEncode/OMGFormURLEncode.m; sourceTree = "<group>"; };
6364E0271A7FFDED00F83CA1 /* OMGHTTPURLRQ.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OMGHTTPURLRQ.h; path = Sources/RQ/OMGHTTPURLRQ.h; sourceTree = "<group>"; };
6364E0281A7FFDED00F83CA1 /* OMGHTTPURLRQ.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OMGHTTPURLRQ.m; path = Sources/RQ/OMGHTTPURLRQ.m; sourceTree = "<group>"; };
6364E0291A7FFDED00F83CA1 /* OMGUserAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OMGUserAgent.h; path = Sources/UserAgent/OMGUserAgent.h; sourceTree = "<group>"; };
6364E02A1A7FFDED00F83CA1 /* OMGUserAgent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OMGUserAgent.m; path = Sources/UserAgent/OMGUserAgent.m; sourceTree = "<group>"; };
636A05041A7FFFE600EA66E1 /* OMGFormURLEncodeTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OMGFormURLEncodeTestCase.m; path = Tests/OMGFormURLEncodeTestCase.m; sourceTree = "<group>"; };
63EDFE721A7FFD0E0030F974 /* OMGHTTPURLRQ.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OMGHTTPURLRQ.framework; sourceTree = BUILT_PRODUCTS_DIR; };
63EDFE7D1A7FFD0E0030F974 /* OMGTest.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OMGTest.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -237,7 +237,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 3.2.4;
CURRENT_PROJECT_VERSION = 3.3.0;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)";
Expand Down Expand Up @@ -295,7 +295,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 3.2.4;
CURRENT_PROJECT_VERSION = 3.3.0;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = "$(CURRENT_PROJECT_VERSION)";
Expand Down
48 changes: 48 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// swift-tools-version:5.3

import PackageDescription

let package = Package(
name: "OMGHTTPURLRQ",
platforms: [
.iOS(.v9),
.tvOS(.v9),
.watchOS(.v2),
.macOS(.v10_10)
],
products: [
.library(
name: "OMGHTTPURLRQ",
targets: ["OMGHTTPURLRQ"]),
.library(
name: "OMGHTTPURLRQUserAgent",
targets: ["OMGHTTPURLRQUserAgent"]),
.library(
name: "OMGHTTPURLRQFormURLEncode",
targets: ["OMGHTTPURLRQFormURLEncode"]),
],
dependencies: [],
targets: [
.target(
name: "OMGHTTPURLRQ",
dependencies: [
"OMGHTTPURLRQUserAgent",
"OMGHTTPURLRQFormURLEncode"
],
path: "Sources/RQ",
publicHeadersPath: "."),
.target(
name: "OMGHTTPURLRQUserAgent",
path: "Sources/UserAgent",
publicHeadersPath: "."),
.target(
name: "OMGHTTPURLRQFormURLEncode",
path: "Sources/FormURLEncode",
publicHeadersPath: "."),
.testTarget(
name: "OMGHTTPURLRQTests",
dependencies: ["OMGHTTPURLRQ"],
path: "Tests",
exclude: ["Tests-Info.plist"]),
]
)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OMGHTTPURLRQ [![Build Status](https://travis-ci.org/mxcl/OMGHTTPURLRQ.svg?branch=master)](https://travis-ci.org/mxcl/OMGHTTPURLRQ)
# OMGHTTPURLRQ ![Build Status](https://github.com/mxcl/OMGHTTPURLRQ/actions/workflows/CI.yml/badge.svg)

[![Join the chat at https://gitter.im/mxcl/OMGHTTPURLRQ](https://badges.gitter.im/mxcl/OMGHTTPURLRQ.svg)](https://gitter.im/mxcl/OMGHTTPURLRQ?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 8234da8

Please sign in to comment.