-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
64 additions
and
17 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
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,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
if [ "$TRAVIS_OS_NAME" != linux ]; then | ||
exit 0 | ||
fi | ||
|
||
sudo apt-get update | ||
|
||
# needed for musl targets | ||
sudo apt-get install -y musl-tools | ||
|
||
# needed to build deb packages | ||
sudo apt-get install -y fakeroot | ||
|
||
# needed for i686 linux gnu target | ||
if [[ $TARGET == i686-unknown-linux-gnu ]]; then | ||
sudo apt-get install -y gcc-multilib | ||
fi | ||
|
||
# needed for cross-compiling for arm | ||
if [[ $TARGET == arm-unknown-linux-gnueabihf ]]; then | ||
sudo apt-get install -y \ | ||
gcc-4.8-arm-linux-gnueabihf \ | ||
binutils-arm-linux-gnueabihf \ | ||
libc6-armhf-cross \ | ||
libc6-dev-armhf-cross | ||
fi |
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,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
# Incorporate TARGET env var to the build and test process | ||
cargo build --target "$TARGET" --verbose | ||
|
||
# We cannot run arm executables on linux | ||
if [[ $TARGET != arm-unknown-linux-gnueabihf ]]; then | ||
cargo test --target "$TARGET" --verbose | ||
|
||
# Run 'bat' on its own source code and the README | ||
cargo run --target "$TARGET" -- src/main.rs README.md --paging=never | ||
fi |