Skip to content

Commit

Permalink
Setup semaphore Android & iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
retyui committed Nov 14, 2020
2 parents 119d16c + 9634d9d commit bdea11d
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 1 deletion.
24 changes: 24 additions & 0 deletions .semaphore/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: v1.0
name: React Native Android
agent:
machine:
type: e1-standard-2
os_image: ubuntu1804
containers:
- name: main
image: 'registry.semaphoreci.com/android:29-node'

blocks:
- name: Bundle android
task:
jobs:
- name: yarn install and cache
commands:
- checkout
- npm i -g yarn
- cache restore yarn-$(checksum yarn.lock)
- yarn install --frozen-lockfile
- cache store yarn-$(checksum yarn.lock) node_modules
- cd android
- ./gradlew bundleRelease assembleRelease
- artifact push job app/build/outputs
24 changes: 24 additions & 0 deletions .semaphore/ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: v1.0
name: React Native iOS
agent:
machine:
type: a1-standard-4
os_image: macos-xcode12

blocks:
- name: Build ios
task:
env_vars:
- name: LANG
value: en_US.UTF-8
jobs:
- name: Fastlane build
commands:
- checkout
- brew install yarn
- cache restore yarn-$(checksum yarn.lock)
- yarn install --frozen-lockfile
- cache store yarn-$(checksum yarn.lock) node_modules
- cd ios
- pod install
- xcodebuild clean archive -workspace testCiCdReactNative.xcworkspace -scheme testCiCdReactNative -archivePath testCiCdReactNative.xcarchive CODE_SIGNING_ALLOWED=NO | xcpretty
42 changes: 42 additions & 0 deletions ENVINFO.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
- [CircleCI (android)](#circleci-android)
- [Codemagic (android)](#codemagic-android)
- [Gitlab CI (android)](#gitlab-ci-android)
- [Semaphore CI (android)](#semaphore-ci-android)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Expand Down Expand Up @@ -906,3 +907,44 @@ Databases:
SQLite: 3.32.2 - /opt/android/sdk/platform-tools/sqlite3
```

### Semaphore CI (android)

```shell script
System:
OS: Linux 4.15 Debian GNU/Linux 10 (buster) 10 (buster)
CPU: (2) x64 Intel Core Processor (Haswell)
Memory: 2.02 GB / 3.85 GB
Container: Yes
Shell: 5.0.3 - /bin/bash
Binaries:
Node: 10.22.1 - /tmp/yarn--1605262512805-0.533221535200799/node
Yarn: 1.22.10 - /tmp/yarn--1605262512805-0.533221535200799/yarn
npm: 6.14.6 - /usr/bin/npm
Managers:
Apt: 1.8.2.1 - /usr/bin/apt
Gradle: 4.4.1 - /usr/bin/gradle
Maven: 3.6.0 - /usr/bin/mvn
RubyGems: 3.0.1 - /opt/rubies/ruby-2.6.1/bin/gem
Utilities:
Make: 4.2.1 - /usr/bin/make
GCC: 8.3.0 - /usr/bin/gcc
Git: 2.20.1 - /usr/bin/git
Mercurial: 4.8.2 - /usr/bin/hg
Virtualization:
Docker: 19.03.9 - /usr/bin/docker
SDKs:
Android SDK:
API Levels: 25, 26, 27, 28, 29
Build Tools: 25.0.3, 26.0.1, 26.0.2, 27.0.0, 27.0.1, 27.0.2, 27.0.3, 28.0.0, 28.0.1, 28.0.2, 28.0.3, 29.0.1, 29.0.2
IDEs:
Vim: 8.1 - /usr/bin/vim
Languages:
Bash: 5.0.3 - /bin/bash
Java: 1.8.0_272 - /usr/local/openjdk-8/bin/javac
Perl: 5.28.1 - /usr/bin/perl
Python: 2.7.16 - /usr/bin/python
Python3: 3.7.3 - /usr/bin/python3
Ruby: 2.6.1 - /opt/rubies/ruby-2.6.1/bin/ruby
Databases:
SQLite: 3.32.2 - /opt/android-sdk-linux/platform-tools/sqlite3
```
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Then I add a lot of native libraries to check how it cause build time
| [Gitlab CI/CD](https://docs.gitlab.com/ee/ci/) | [![GitLab CI status](https://gitlab.com/retyui/react-native-ci-cd-compare/badges/main/pipeline.svg)](https://gitlab.com/retyui/react-native-ci-cd-compare/-/jobs) | 07m44s / 12m47s | - |
| [Bitbucket Pipelines](https://bitbucket.org/product/ru/features/pipelines) | [n/a](https://bitbucket.org/retyui/react-native-ci-cd-compare/addon/pipelines/home) | **01m53s / 03m28s** 🚀 | - |
| [Azure DevOps](https://techcommunity.microsoft.com/t5/windows-dev-appconsult/using-azure-devops-to-create-a-ci-cd-pipeline-for-an-android/ba-p/1094422) | [![Build Status](https://dev.azure.com/retyui/react-native-ci-cd-compare/_apis/build/status/retyui.react-native-ci-cd-compare?branchName=refs%2Fpull%2F1%2Fmerge)](https://dev.azure.com/retyui/react-native-ci-cd-compare/_build/latest?definitionId=1&branchName=refs%2Fpull%2F1%2Fmerge) | 04m04s / 06m26s | 16m19s / 20m20s |

| [Semaphore CI](https://semaphoreci.com/) | [![Build Status](https://retyui.semaphoreci.com/badges/react-native-ci-cd-compare/branches/main.svg)](https://retyui.semaphoreci.com/projects/react-native-ci-cd-compare) | 02m42s | |

## Limitations of CI/CD services

Expand All @@ -68,6 +68,7 @@ Then I add a lot of native libraries to check how it cause build time

- [appcircle](https://appcircle.io/pricing/) 1 Concurrent Build, 20 minutes max build time per build, 25 Builds per Month

- [Semaphore CI](https://semaphoreci.com/blog/2014/08/14/semaphore-gets-free.html) becomes free for open source **(unlimited testing and deployment of open source projects)**

---

Expand Down

0 comments on commit bdea11d

Please sign in to comment.