Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: CI: Automated Linux builds #47

Merged
merged 8 commits into from
Nov 26, 2017

Conversation

hexagon6
Copy link
Contributor

@hexagon6 hexagon6 commented Nov 23, 2017

  • add .travis.yml
  • adjust settings to match for BusterLabs/Partyshare at deploy key:
    • change branch to master
    • change repo to Busterlabs/Partyshare
    • review if tagged commits should trigger the pipeline tags: true
    • @bhstahl: generate travis api_key via travis utility by running in the repo folder: $ gem install travis; travis setup releases

snippet from .travis.yml for help

deploy:
  provider: releases
  api_key:
    secure: <your key>
  file: dist/Partyshare.deb
  skip_cleanup: true
  on:
    repo: hexagon6/Partyshare
    branch: ci/upstream-build
tags: true

@hexagon6 hexagon6 mentioned this pull request Nov 23, 2017
@bhstahl
Copy link
Member

bhstahl commented Nov 24, 2017

@hexagon6, I'm excited to get started on a OSX build pipeline, so I just put together #48, which added a travis configuration file for us to work concurrently on our respective targets

@bhstahl bhstahl mentioned this pull request Nov 24, 2017
@bhstahl
Copy link
Member

bhstahl commented Nov 24, 2017

With #49, I setup an OSX build & release pipeline using travis, and used it to build & upload release v1.2.3.

When you're ready, lets get #42 and this merged, adding a linux target to the next release! 🍾

@@ -24,6 +35,7 @@ deploy:
- dist/latest-mac.yml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you run yarn build_electron does that produce dist/github/latest-linux.json & dist/latest-linux.yml for you? If so, we may want to include them for auto-update support

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No,
I only get this:

$ ls dist/
linux-unpacked  partyshare.busterlabs.xyz-1.2.7-linux.deb  partyshare.busterlabs.xyz-1.2.7-linux.tar.gz

I'll check how electron deals with Linux builds. Have to change the file reference too :-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, no worries. Auto-update might not be supported on linux, I'll check.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, you're right. unfortunately. I noticed my build crashed when trying to update. Can/should we disable asar for linux builds?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, it looks like we should be creating a latest-linux.* file according to the docs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

locally I don't get one. maybe do a ls -l at before_deploy key in .travis.yml, so we can see what is actually there.

Copy link
Contributor Author

@hexagon6 hexagon6 Nov 26, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding the "crash":

$ ipfs daemon; partyshare.busterlabs.xyz

My log output: https://gist.github.com/hexagon6/14303b59b269877eafcd384b7dc17909

It crashes with ipfs version 0.3.10, probably I should update.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, even with version 0.4.13 I get this Error:

_getConfig Error: non-zero exit code 1

            while running: /opt/Partyshare/resources/app.asar.unpacked/node_modules/go-ipfs-dep/go-ipfs/ipfs config show


            Error: api not running

    at Stream.listeners.done.once (/opt/Partyshare/resources/app.asar/node_modules/ipfsd-ctl/src/exec.js:39:11)
    at Stream.f (/opt/Partyshare/resources/app.asar/node_modules/once/once.js:25:25)
    at emitTwo (events.js:125:13)
    at Stream.emit (events.js:213:7)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

.travis.yml Outdated
@@ -24,6 +38,7 @@ deploy:
- dist/latest-mac.yml
- dist/partyshare.busterlabs.xyz-*-mac.dmg
- dist/partyshare.busterlabs.xyz-*-mac.zip
- dist/Partyshare.deb
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the linux target should follow the artifactName scheme, producing partyshare.busterlabs.xyz-1.2.7-linux.tar.gz and partyshare.busterlabs.xyz-1.2.7-linux.deb for the latest release?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bhstahl true, just noticed, see my comment above

@hexagon6
Copy link
Contributor Author

@bhstahl could you trigger a draft build so we see the contents of dist/ after building on travis?

@bhstahl
Copy link
Member

bhstahl commented Nov 26, 2017

Hmm, it's not letting me trigger a build since the code is in your fork. Let's merge this and work off master builds & PR's. Thanks for your help!

@bhstahl bhstahl merged commit 529b435 into BusterLabs:master Nov 26, 2017
@hexagon6 hexagon6 deleted the ci/upstream-build branch November 26, 2017 20:28
@bhstahl
Copy link
Member

bhstahl commented Nov 26, 2017

Alright, looks like we didn't get the auto-update files, but we do have the deb and tar.gz in the draft.

hexagon6 added a commit to hexagon6/Partyshare that referenced this pull request Nov 26, 2017
* chore(ci): add travis setup

* chore(linux): extend .travis.yml from upstream

* fix yaml

* fix(travis): move env key to matrix.include

* chore(travis): update file artifact pattern

* chore(travis): checkout produced files in dist/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants