From 6f6354cf69ef176187a3270b4569c778e04a0509 Mon Sep 17 00:00:00 2001 From: Serhiy Mytrovtsiy Date: Sat, 11 Jul 2020 20:54:28 +0200 Subject: [PATCH] - add gh action to build the application - add `dep` script to makefile (update carthage dependency) - change carthage build -> carthage update in gh action --- .github/workflows/build.yaml | 36 ++++++++++++++++++++++++++++++++++++ Cartfile.resolved | 1 - Makefile | 5 ++++- 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 00000000..954cfbe5 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,36 @@ +name: Build the application + +on: + push: + branches: + - master + +jobs: + build: + runs-on: macos-latest + + steps: + - uses: actions/checkout@master + + - name: Fetch dependencies from cache + id: cache + uses: actions/cache@v2 + with: + path: Carthage + key: ${{ runner.os }}-carthage-${{ hashFiles('**/Cartfile.resolved') }} + restore-keys: | + ${{ runner.os }}-carthage- + + - name: Install carthage dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: carthage update --platform macOS + + - name: Build application + if: success() + run: | + xcodebuild \ + -scheme Stats \ + -destination 'platform=OS X,arch=x86_64' \ + -configuration Release \ + CODE_SIGN_IDENTITY="" \ + CODE_SIGNING_REQUIRED=NO diff --git a/Cartfile.resolved b/Cartfile.resolved index e068c421..052c3eaf 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -1,3 +1,2 @@ github "ashleymills/Reachability.swift" "v5.0.0" -github "danielgindi/Charts" "v3.5.0" github "malcommac/Repeat" "0.6.0" diff --git a/Makefile b/Makefile index bcdd37c9..0796f804 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ APP_PATH = "$(BUILD_PATH)/$(APP).app" ZIP_PATH = "$(BUILD_PATH)/$(APP).zip" .SILENT: archive notarize sign prepare-dmg prepare-dSYM clean next-version check history -.PHONY: build archive notarize sign prepare-dmg prepare-dSYM clean next-version check history +.PHONY: build archive notarize sign prepare-dmg prepare-dSYM clean next-version check history dep build: clean next-version archive notarize sign prepare-dmg prepare-dSYM open @@ -121,3 +121,6 @@ history: open: echo "Opening working folder..." open $(PWD) + +dep: + carthage update --platform macOS