Skip to content

Commit

Permalink
Bulid for mac as well
Browse files Browse the repository at this point in the history
  • Loading branch information
yalishanda42 committed May 13, 2023
1 parent ff93170 commit 7f20998
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 7 deletions.
34 changes: 31 additions & 3 deletions .github/workflows/build-n-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
branches: [ "main" ]

jobs:
debug-build:
name: Build app in Debug config
ios-debug-build:
name: Build iOS app in Debug config
runs-on: macos-13

steps:
Expand All @@ -19,10 +19,34 @@ jobs:
- name: Install fastlane
run: |
brew install fastlane
- name: Switch to Xcode 14.3
run: |
sudo xcode-select -s /Applications/Xcode_14.3.app
- name: Build iOS app (debug config)
run: |
fastlane build_app_debug
fastlane ios build_app_debug
mac-debug-build:
name: Build macOS app in Debug config
runs-on: macos-13

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install fastlane
run: |
brew install fastlane
- name: Switch to Xcode 14.3
run: |
sudo xcode-select -s /Applications/Xcode_14.3.app
- name: Build macOS app (debug config)
run: |
fastlane mac build_app_debug
tests:
name: Run all tests
Expand All @@ -35,6 +59,10 @@ jobs:
- name: Install fastlane
run: |
brew install fastlane
- name: Switch to Xcode 14.3
run: |
sudo xcode-select -s /Applications/Xcode_14.3.app
- name: Run tests
run: |
Expand Down
19 changes: 16 additions & 3 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
default_platform(:ios)

platform :ios do
desc "Build the app in debug configuration"
desc "Build the iOS app in debug configuration for iOS 16.4"
lane :build_app_debug do
xcversion(version: "14.3")
build_ios_app(
project: "BDZDelays.xcodeproj",
scheme: "BDZDelays",
Expand All @@ -33,7 +32,6 @@ platform :ios do

desc "Run all tests"
lane :tests do
xcversion(version: "14.3")
sh('rm -rf "$(pwd)/test_output"')
for scheme in [
"StationDomain",
Expand All @@ -50,3 +48,18 @@ platform :ios do
end
end
end

platform :mac do
desc "Build the macOS app in debug configuration for macOS 13"
lane :build_app_debug do
build_mac_app(
project: "BDZDelays.xcodeproj",
scheme: "BDZDelays",
configuration: "Debug",
clean: true,
export_method: "development",
skip_codesigning: true,
skip_archive: true,
)
end
end
15 changes: 14 additions & 1 deletion fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do
[bundle exec] fastlane ios build_app_debug
```

Build the app in debug configuration
Build the iOS app in debug configuration for iOS 16.4

### ios tests

Expand All @@ -33,6 +33,19 @@ Run all tests

----


## Mac

### mac build_app_debug

```sh
[bundle exec] fastlane mac build_app_debug
```

Build the macOS app in debug configuration for macOS 13

----

This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.

More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).
Expand Down

0 comments on commit 7f20998

Please sign in to comment.