android - travis-ci 可以使用多种语言和多种操作系统吗?

标签 android ios react-native travis-ci

我的 travis 工作是为 React-Native 部署。所以,我想在没有expo的情况下同时构建android和ios(expo服务非常好。但是,我想要一些本地库的本地代码)

完全符合逻辑

  • 语言:node_js

    • npm ci 用于 react 原生库
  • 语言:Ruby

    • gem 安装 faSTLane
  • 语言:android,操作系统:linux

    • 我不知道为什么 osx 镜像无法使用 oraclejdk8(见底部)
  • 语言:object-c 操作系统:osx

    • 我无法尝试...我正在修复一些代码...

有人帮助我吗?

os: osx
osx_image: xcode10.1

matrix:
  include:
    - language: node_js
      node_js:
        - node
        - lts/*
      cache: npm
    - language: ruby
      rvm:
        - 2.6
      cache: bundler

before_script:
  - npm install -g npm@latest
  - gem update --system
  - gem install fastlane -NV
  - fastlane update_fastlane
  - npm ci

jobs:
  include:
    - stage: Deploy Android Test
      if: branch = rework-travis and type = push
      language: android
      jdk: openjdk8
      before_cache:
        - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
        - rm -rf $HOME/.gradle/caches/*/plugin-resolution/
      cache:
        directories:
          - $HOME/.gradle/caches/
          - $HOME/.gradle/wrapper/
      android:
        components:
          - tools
          - platform-tools
          - android-28

          - extra-google-google_play_services
      before_script:
        - chmod +x ./android/gradlew
      script:
        - ./android/gradlew assembleRelease
$ ~/bin/install-jdk.sh --target "/Users/travis/openjdk8" --workspace "/Users/travis/.cache/install-jdk" --feature "8" --license "GPL"
install-jdk.sh 2019-03-22
Expected feature release number in range of 9 to 13, but got: 8
The command "~/bin/install-jdk.sh --target "/Users/travis/openjdk8" --workspace "/Users/travis/.cache/install-jdk" --feature "8" --license "GPL"" failed and exited with 3 during .

最佳答案

首先,我会为您的构建使用两种不同的环境 - Trusty Android 应用程序的 CI 和 macOS适用于 iOS 应用程序的 CI。在您的配置中,您只定义了一个环境。

您可以阅读如何设置两个环境 here .

通过 Trusty CI,您可以使用 openjdk8 ,因为它是默认且预安装的。

关于android - travis-ci 可以使用多种语言和多种操作系统吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55453431/

相关文章:

android - 我们可以检查 App 是在 phonegap 中制作的还是完全原生的

android - SSL 握手异常 : Connection closed by peer on android app

安卓 : Restrict apk file to install Only in Devices Which Uses HDPI & MDPI images.

ios - 为 iOS 端点生成的发现文件失败

reactjs - 如何使用 jest 模拟类和命名空间枚举?

android - Google 加跨站身份 Android 到 PHP 访问 token

ios - CCAdvancedMenu boundaryRect

ios - SecKeyEncrypt SecPaddingNone iOS

javascript - 在 React-Native 中将 props 作为 ref 和方法传递给子级或同级

react-native - 为什么 styled-components 5.x 会警告 "Expected style to contain units."