Skip to content

Commit

Permalink
Set up GH Actions (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
DivineDominion authored Aug 26, 2021
1 parent f3658f6 commit ce456e1
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 69 deletions.
99 changes: 99 additions & 0 deletions .github/workflows/cross-platform-compile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Cross-Platform Compilation and Testing

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: macos-10.15
timeout-minutes: 10
strategy:
matrix:
include:
- scheme: macOS
sdk: "macosx11.1"
destination: "platform=macOS"
arch: x86_64
swift_version: "5.3"
action: test
pod_lint: "YES"
- scheme: iOS
sdk: iphonesimulator
destination: "platform=iOS Simulator,OS=14.4,name=iPhone 11"
swift_version: "5.3"
action: test
pod_lint: "NO"
- scheme: tvOS
sdk: appletvsimulator
destination: "platform=tvOS Simulator,OS=14.3,name=Apple TV 4K"
swift_version: "5.3"
action: test
pod_lint: "NO"
- scheme: watchOS
sdk: watchsimulator
destination: "platform=watchOS Simulator,name=Apple Watch Series 5 - 44mm"
swift_version: "5.3"
action: build
pod_lint: "NO"

env:
LC_CTYPE: en_US.UTF-8
LANG: en_US.UTF-8
FRAMEWORK_NAME: "ReSwift-Thunk"

steps:
- name: Checkout Project
uses: actions/checkout@v2
- name: Select Xcode
uses: devbotsxyz/[email protected]
with:
version: "12.4.0"

- name: Show Build Settings
run: xcodebuild -project ${{ env.FRAMEWORK_NAME }}.xcodeproj -scheme '${{ env.FRAMEWORK_NAME }} ${{ matrix.scheme }}' -showBuildSettings
- name: Show Build SDK
run: xcodebuild -project ${{ env.FRAMEWORK_NAME }}.xcodeproj -scheme '${{ env.FRAMEWORK_NAME }} ${{ matrix.scheme }}' -showsdks
- name: Show Available Destinations
run: xcodebuild -project ${{ env.FRAMEWORK_NAME }}.xcodeproj -scheme '${{ env.FRAMEWORK_NAME }} ${{ matrix.scheme }}' -showdestinations

- name: Recover Cached Carthage dependencies
uses: actions/cache@v1
id: carthage-cache
with:
path: Carthage
key: ${{ matrix.scheme }}-carthage-${{ hashFiles('Cartfile.resolved') }}-cache_v3
- name: Print Carthage contents after cache
run: |
if [[ -d Carthage ]]; then
ls Carthage/**/*
fi
- name: Carthage Bootstrap
if: steps.carthage-cache.outputs.cache-hit != 'true'
run: carthage bootstrap --no-use-binaries --use-xcframeworks --cache-builds --platform ${{ matrix.scheme }}
- name: Print Carthage contents after bootstrap
run: ls Carthage/**/*

- name: Build and Test
run: |
xcodebuild clean ${{ matrix.action }} \
-destination "${{ matrix.destination }}" \
-scheme "${{ env.FRAMEWORK_NAME }} ${{ matrix.scheme }}" \
-sdk "${{ matrix.sdk }}" \
-configuration Debug \
-project "${{ env.FRAMEWORK_NAME }}.xcodeproj" \
CODE_SIGN_IDENTITY="" \
CODE_SIGNING_REQUIRED=NO \
ONLY_ACTIVE_ARCH=YES \
GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES \
GCC_GENERATE_TEST_COVERAGE_FILES=YES \
SWIFT_VERSION=${{ matrix.swift_version }}
- name: Lint If Needed
if: matrix.pod_lint == 'YES'
run: |
gem install cocoapods -v '1.10.1'
pod repo update
pod lib lint --verbose --allow-warnings
52 changes: 0 additions & 52 deletions .travis.yml

This file was deleted.

28 changes: 11 additions & 17 deletions ReSwift-Thunk.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 52;
objects = {

/* Begin PBXBuildFile section */
Expand All @@ -26,12 +26,12 @@
5036627C24A5DC81003C65ED /* Thunk.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65A3D6EF218B8A300075CB92 /* Thunk.swift */; };
5036627D24A5DC81003C65ED /* createThunkMiddleware.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65A3D6F4218C92420075CB92 /* createThunkMiddleware.swift */; };
5036627E24A5DD1E003C65ED /* ReSwift_Thunk.h in Headers */ = {isa = PBXBuildFile; fileRef = 65A3D6D8218B89A60075CB92 /* ReSwift_Thunk.h */; settings = {ATTRIBUTES = (Public, ); }; };
507DCA1C2695F217007A5474 /* ReSwift.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 507DCA1B2695F217007A5474 /* ReSwift.xcframework */; };
507DCA1D2695F217007A5474 /* ReSwift.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 507DCA1B2695F217007A5474 /* ReSwift.xcframework */; };
507DCA1E2695F217007A5474 /* ReSwift.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 507DCA1B2695F217007A5474 /* ReSwift.xcframework */; };
507DCA1F2695F217007A5474 /* ReSwift.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 507DCA1B2695F217007A5474 /* ReSwift.xcframework */; };
65A3D6E4218B89A60075CB92 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65A3D6E3218B89A60075CB92 /* Tests.swift */; };
D28E4F562214F37100DEFA7D /* ExpectThunk.swift in Sources */ = {isa = PBXBuildFile; fileRef = D28E4F552214F37100DEFA7D /* ExpectThunk.swift */; };
D4142B39253A3B24009FE569 /* ReSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D4142B35253A3B03009FE569 /* ReSwift.framework */; };
D4142B3D253A3B29009FE569 /* ReSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D4142B3C253A3B29009FE569 /* ReSwift.framework */; };
D4142B41253A3B30009FE569 /* ReSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D4142B40253A3B30009FE569 /* ReSwift.framework */; };
D4142B45253A3B33009FE569 /* ReSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D4142B44253A3B33009FE569 /* ReSwift.framework */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -65,6 +65,7 @@
5036624F24A5DB68003C65ED /* ReSwiftThunk.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ReSwiftThunk.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5036626124A5DC31003C65ED /* ReSwiftThunk.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ReSwiftThunk.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5036626924A5DC32003C65ED /* ReSwift-Thunk-Tests tvOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ReSwift-Thunk-Tests tvOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
507DCA1B2695F217007A5474 /* ReSwift.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = ReSwift.xcframework; path = Carthage/Build/ReSwift.xcframework; sourceTree = "<group>"; };
65A3D6D8218B89A60075CB92 /* ReSwift_Thunk.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ReSwift_Thunk.h; sourceTree = "<group>"; };
65A3D6D9218B89A60075CB92 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
65A3D6DE218B89A60075CB92 /* ReSwift-Thunk-Tests iOS.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ReSwift-Thunk-Tests iOS.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
Expand All @@ -73,10 +74,6 @@
65A3D6EF218B8A300075CB92 /* Thunk.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Thunk.swift; sourceTree = "<group>"; };
65A3D6F4218C92420075CB92 /* createThunkMiddleware.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = createThunkMiddleware.swift; sourceTree = "<group>"; };
D28E4F552214F37100DEFA7D /* ExpectThunk.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExpectThunk.swift; sourceTree = "<group>"; };
D4142B35253A3B03009FE569 /* ReSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ReSwift.framework; path = Carthage/Build/iOS/ReSwift.framework; sourceTree = "<group>"; };
D4142B3C253A3B29009FE569 /* ReSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ReSwift.framework; path = Carthage/Build/Mac/ReSwift.framework; sourceTree = "<group>"; };
D4142B40253A3B30009FE569 /* ReSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ReSwift.framework; path = Carthage/Build/watchOS/ReSwift.framework; sourceTree = "<group>"; };
D4142B44253A3B33009FE569 /* ReSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ReSwift.framework; path = Carthage/Build/tvOS/ReSwift.framework; sourceTree = "<group>"; };
D4286E7721EFED3F00D5749B /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = "<group>"; };
D4286E7821EFED4D00D5749B /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand All @@ -86,15 +83,15 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D4142B39253A3B24009FE569 /* ReSwift.framework in Frameworks */,
507DCA1C2695F217007A5474 /* ReSwift.xcframework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
5036622F24A5D8FB003C65ED /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D4142B3D253A3B29009FE569 /* ReSwift.framework in Frameworks */,
507DCA1D2695F217007A5474 /* ReSwift.xcframework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -110,15 +107,15 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D4142B41253A3B30009FE569 /* ReSwift.framework in Frameworks */,
507DCA1E2695F217007A5474 /* ReSwift.xcframework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
5036625E24A5DC31003C65ED /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
D4142B45253A3B33009FE569 /* ReSwift.framework in Frameworks */,
507DCA1F2695F217007A5474 /* ReSwift.xcframework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -191,10 +188,7 @@
D4142B34253A3B02009FE569 /* Frameworks */ = {
isa = PBXGroup;
children = (
D4142B44253A3B33009FE569 /* ReSwift.framework */,
D4142B40253A3B30009FE569 /* ReSwift.framework */,
D4142B3C253A3B29009FE569 /* ReSwift.framework */,
D4142B35253A3B03009FE569 /* ReSwift.framework */,
507DCA1B2695F217007A5474 /* ReSwift.xcframework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down

0 comments on commit ce456e1

Please sign in to comment.