Travis和React Native。适用于Android和iOS的Parallels构建

时间:2019-07-11 22:11:59

标签: android ios reactjs travis-ci

我对特拉维斯很陌生。我有一个React Native App。实际上,我正在使用Travis依次部署两个平台。
我想知道是否有可能为ios和android并行构建以使travis处理更快。谢谢。

1 个答案:

答案 0 :(得分:0)

经过大量测试和文档,我找到了一种方法来实现。这是.travis.yml文件:

  matrix:
  include:
    - language: objective-c
      os: osx
      xcode_workspace: '../ios/YourProject.xcworkspace'
      xcode_scheme: YourProject
      xcode_sdk: iphonesimulator9.0
      osx_image: xcode10.1
      podfile: ios/Podfile
      node_js: false
      sudo: true
      before_install:
        - echo "before_install"
      install:
        - echo "install"
      script:
        - echo "script"
    - language: android
      android:
        components:
          - tools
          - platform-tools
      sudo: true
      before_install:
        - echo "android before_install"
      install:
        - echo "android install"
      script:
        - echo "android script"
    - if: branch = master
      language: node_js
      node_js: lts/*
      install: true
      script: echo "MASTER BRANCH"