Skip to content

Commit

Permalink
chore(build): fix versioning and uploading (#10)
Browse files Browse the repository at this point in the history
We previously were uploading the contents of firmwarebin/ to s3 which as it
turns out is a checked-in file that never changes. That is not what we want to
do.

Instead,
- Remove firmwarebin/ as a checked-in file
- Instead, use it as a directory containing the properly named build output
- Copy built hex files into firmwarebin using the same value as the version
string embedded in the build itself
- Make that version string generation actually work properly when running on a
checked out tag (which is a detached HEAD, which git show-ref doesn't like;
instead, there's a bit of logic to check if we have a branch and if not use git
describe)
- Upload tha actual fresh build to s3 instead
- Also, on tag, update the github release, since without the firmwarebin/
directory checked in it's nice to have somewhere to point to for stable builds
- Because we need to use git symbolic-ref and git describe, check out the
TRAVIS_BRANCH.
  • Loading branch information
sfoster1 authored Dec 10, 2019
1 parent 903fd37 commit 1f0a3d7
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 23,029 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ debug
/win_install.log
/linux_install.log
/src/default_excludes.mk
firmwarebin/
gcc-arm-none-eabi-*
34 changes: 22 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,32 @@ install:
- sudo apt-get install libc6:i386 libstdc++6:i386
- ./travis_install

before_script:
- git checkout $TRAVIS_BRANCH

script:
- make clean build

deploy:
provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
acl: public_read
local-dir: firmwarebin/
upload-dir: ${TRAVIS_BRANCH}-${TRAVIS_BUILD_NUMBER}
bucket: $HEX_BUCKET
region: us-east-2
skip_cleanup: true
on:
repo: Opentrons/SmoothiewareOT
all_branches: true
- provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
acl: public_read
local-dir: firmwarebin/
upload-dir: ${TRAVIS_BRANCH}
bucket: $HEX_BUCKET
region: us-east-2
skip_cleanup: true
on:
repo: Opentrons/SmoothiewareOT
all_branches: true
- provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file_glob: true
file: firmwarebin/*.hex
skip_cleanup: true
on:
tags: true

notifications:
email:
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

*This is an Opentrons fork of the open-source [Smoothieware](https://github.com/smoothieware/smoothieware)*

[Recent Stable Build Here](https://github.com/Opentrons/SmoothiewareOT/tree/edge/FirmwareBin)
A recent stable build can usually be found in the releases.

Smoothie is a free, opensource, high performance G-code interpreter and CNC controller written in Object-Oriented C++ for the LPC17xx micro-controller ( ARM Cortex M3 architecture ). It will run on a mBed, a LPCXpresso, a SmoothieBoard, R2C2 or any other LPC17xx-based board. The motion control part is a port of the awesome grbl.

Expand Down Expand Up @@ -42,6 +42,14 @@ Please take a look [here](https://github.com/Opentrons/opentrons/blob/edge/CONTR

Contributions are very welcome !

## Releasing (for Opentrons devs)

When you want to release a version of the smoothie software for subsequent Robot OS updates, just create a github release in this repository. Travis will automatically build the tag and post it to the release.

Note: You must create the github release first - don't create and push a tag from your remote. The release needs to be created for Travis to properly deploy the result.

Once you've made the release, go update the [package in buildroot](https://github.com/Opentrons/buildroot/blob/opentrons-develop/package/opentrons-smoothie-firmware/opentrons-smoothie-firmware.mk).

## Donate
We based our firmware off of the smoothie firmware which is developed by volunteers. If you find this software useful, want to say thanks and encourage development, please consider a
[donation!](https://paypal.me/smoothieware)
Expand Down
Loading

0 comments on commit 1f0a3d7

Please sign in to comment.