-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding travis-ci integration for macOS builds
- Deploys to github - Travis CI link in readme
- Loading branch information
Showing
3 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# travis-ci integration to build macOS binaries for dfu-util | ||
|
||
language: c | ||
|
||
os: | ||
- osx | ||
|
||
compiler: | ||
- clang | ||
|
||
# Package Setup | ||
before_install: | ||
- brew update | ||
- brew install tree libusb | ||
|
||
# System Setup | ||
install: | ||
# Info about OS | ||
- uname -a | ||
|
||
# Prepare output dir | ||
- mkdir -p output | ||
|
||
# Directory tree to validate checkout | ||
- tree | ||
|
||
# Run Build | ||
script: | ||
- ./autogen.sh && ./configure && make && ./package.bash | ||
|
||
## Deploy release | ||
deploy: | ||
provider: releases | ||
api_key: $GITHUB_OAUTH_TOKEN | ||
skip_cleanup: true | ||
draft: true # XXX Must "publish" on github | ||
prerelease: true # XXX Set this to false to enable a stable release | ||
file_glob: true | ||
file: output/dfu-util* | ||
on: | ||
tags: true | ||
repo: kiibohd/dfu-util | ||
|
||
# Post Build Commands/Packaging | ||
after_script: | ||
- tree | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
set -x | ||
|
||
# Copy Files, including libusb | ||
mkdir -p pkg | ||
cp src/dfu-util src/dfu-prefix src/dfu-suffix pkg/. | ||
cp /usr/local/opt/libusb/lib/libusb-1.0.0.dylib pkg/. | ||
|
||
# Change rpath to point to packaged libusb | ||
cd pkg | ||
install_name_tool -change /usr/local/opt/libusb/lib/libusb-1.0.0.dylib "@loader_path/libusb-1.0.0.dylib" dfu-util | ||
install_name_tool -change /usr/local/opt/libusb/lib/libusb-1.0.0.dylib "@loader_path/libusb-1.0.0.dylib" dfu-prefix | ||
install_name_tool -change /usr/local/opt/libusb/lib/libusb-1.0.0.dylib "@loader_path/libusb-1.0.0.dylib" dfu-suffix | ||
|
||
zip -r ../output/dfu-util-${TRAVIS_TAG}.zip * | ||
|