question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Document how to build for all platforms on Travis

See original GitHub issue
  • Version: 19.8.0
  • Target: macOS, Linux, Windows

Version 19.6.0 introduced support for building Windows target on macOS. It’s awesome that I can drop AppVeyor, but would be nice if it was documented how to set this up on Travis.

For example, can I do electron-builder -mwl in a dist npm run script and will electron-builder ignore building the Windows and macOS apps when running in the Linux image on Travis and ignore building the Linux app on the macOS image on Travis, or do I need a complicated .travis.yml?

Would be nice if electron-builder had a simple mode for this. I can imagine this would be the most common use-case.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

5reactions
develarcommented, Sep 1, 2017
osx_image: xcode8.3

dist: trusty
sudo: false

language: node_js
node_js: "8"

env:
  global:
    - ELECTRON_CACHE=$HOME/.cache/electron
    - ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder

os:
  - linux
  - osx

cache:
  directories:
  - node_modules
  - $HOME/.cache/electron
  - $HOME/.cache/electron-builder
  - $HOME/.npm/_prebuilds

before_install:
  - mkdir -p /tmp/git-lfs && curl -L https://github.com/github/git-lfs/releases/download/v2.2.0/git-lfs-$([ "$TRAVIS_OS_NAME" == "linux" ] && echo "linux" || echo "darwin")-amd64-2.2.0.tar.gz | tar -xz -C /tmp/git-lfs --strip-components 1 && /tmp/git-lfs/git-lfs pull
  - curl -L https://yarnpkg.com/latest.tar.gz | tar xvz && mv dist $HOME/.yarn
  - export PATH="$HOME/.yarn/bin:$PATH"

install:
  - yarn

script:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then yarn release; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then yarn release -- --mac --win; fi

before_cache:
  - rm -rf $HOME/.cache/electron-builder/wine

branches:
  except:
    - "/^v\\d+\\.\\d+\\.\\d+$/"

where release script in your package.json something like yarn compile && electron-builder.

4reactions
develarcommented, Jun 28, 2017

Example will be provided as soon as I will create prebuilt for keytar 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Customizing the Build - Travis CI Docs
Builds on Travis CI are configured mostly through the build configuration stored in the file .travis.yml in your repository. This allows your configuration...
Read more >
Travis CI - The Haskell Tool Stack
This page documents how to use Stack on Travis CI. ... also be interested in using AppVeyor, which supports Windows builds, for more...
Read more >
Migrate from Travis to Azure Pipelines - Microsoft Learn
Azure Pipelines is more than just a Continuous Integration tool, it's a flexible build and release orchestration platform.
Read more >
Travis CI — conan 1.45.0 documentation
You can use the Travis CI cloud service to automatically build and test your project in Linux/MacOS environments in the cloud. It is...
Read more >
Create a Build Pipeline with Travis CI - Baeldung
The build platform documentation covers all available environments and their differences. Just remember that if we change the platform, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found