I am playing with travis-ci for the first time and have run into an error thats confusing me.
Below is my .travis.yml which validates when linted.
language: node_js
node_js:
- 0.8
after_script:
- echo "Hello World"
The following is my travis build output:
$ git clone --depth=50 --branch=master git://github.com/iancrowther/travis-experiment.git iancrowther/travis-experiment
Cloning into 'iancrowther/travis-experiment'...
remote: Counting objects: 27, done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 27 (delta 2), reused 20 (delta 0)
Receiving objects: 100% (27/27), done.
Resolving deltas: 100% (2/2), done.
$ cd iancrowther/travis-experiment
git.2
$ git checkout -qf xxx
$ nvm use 0.8
Now using node v0.8.22
$ node --version
v0.8.22
$ npm --version
1.2.14
$ make test
make: *** No rule to make target `test'. Stop.
The command "make test" exited with 2.
after_script
$ echo "Hello World"
Hello World
Done. Your build exited with 1.
How can i prevent the make file being executed?
Any help would be great, I cant seem to ind the errors explained in the doc's
Ian
ps. does anyone have any links to a guide about styling code??
UPDATE
when #User re-formatted the question, they added the following comment: "used {} button to make the code visible".
change after_script to script
Have a look at this .travis.yml :
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq python3.2 python2.7
python:
- "2.7"
script: ./run_build.sh
The last line is the important one.
script is the command that runs the test.
before is something that enables the test to run
and after is something to clean up.
It is the same pattern you may know from unittests. Setup, Test, Teardown
Since Travis does not find a script: I guess it takes a default option for testing.
Related
I'm trying to build libsodium-sys dependency in an Azure Docker VM which is based on debian.
Have spend a couple of hours trying to fix this build error, but can't figure out what's going on.
I fixed a couple of build errors by installing missing dependencies as the Azure Docker VM seems very vanilla. Executed commands are below the error.
error: failed to run custom build command for `libsodium-sys v0.2.6 (https://github.com/cjdelisle/sodiumoxide?rev=76dc0e6e587b8c8a4bb193ebba9f8ae8f090b81b#76dc0e6e)`
Caused by:
process didn't exit successfully: `/home/packetcrypt_rs/target/release/build/libsodium-sys-169018138a0de36b/build-script-build` (exit code: 101)
checking for working alloca.h... yes
checking for alloca... yes
...
Making check in builds
--- stderr
/bin/bash: line 20: cd: builds: No such file or directory
make: *** [Makefile:516: check-recursive] Error 1
thread 'main' panicked at '
Failed to build libsodium using "make" "check" "-j4"
', /root/.cargo/git/checkouts/sodiumoxide-9b8c3ad42446e2d9/76dc0e6/libsodium-sys/build.rs:281:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
root#2d0a725cde47:/home/packetcrypt_rs#
Build.rs file it's talking about: https://github.com/sodiumoxide/sodiumoxide/blob/master/libsodium-sys/build.rs
Executed commands:
apt get-update
apt-get install pkg-config
apt install apt-utils
apt install file
apt install gcc git
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
apt install make
apt install build-essential gcc-multilib -y
rustup target add armv7-unknown-linux-gnueabihf
git clone https://github.com/cjdelisle/packetcrypt_rs
cd packetcrypt_rs
~/.cargo/bin/cargo build --release
The cause seems related to the issue explained here: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/1379#note_280986944
For reasons unbeknownst to me, these are the commands I needed to execute to fix it:
rm ~/.bashrc
rm ~/.profile
I am using Travis CI to deploy github pages using latest Hugo version
v0.59.1
however the build fails with the following error.
1.36s$ curl -LO https://github.com/gohugoio/hugo/releases/download/v0.59.1/hugo_0.59.1_Linux-64bit.deb install.2
1.29s$ sudo dpkg -i hugo_0.55.4_Linux-64bit.deb
0.08s$ hugo
Building sites … ERROR 2019/11/11 10:54:14 error: failed to transform
resource: TOCSS: failed to transform "style.scss" (text/x-sass): this
feature is not available in your current Hugo version
Total in 27 ms
Error: Error building site: logged 1 error(s)
The command "hugo" exited with 255.
Below is My .travis.yml
---
install:
- wget -O /tmp/hugo.deb
https://github.com/gohugoio/hugo/releases/download/v0.59.1/hugo_0.59.1_Linux-64bit.deb
- sudo dpkg -i /tmp/hugo.deb
script:
- hugo
deploy:
- provider: script
script: bash deploy.sh
skip_cleanup: true
on:
branch: source
Any suggestions as to how to address this issue? thanks in advance.
For anyone facing similar issue, It worked for me after replacing hugo_extended_0.59.1_Linux-64bit.deb instead of hugo_0.59.1_Linux-64bit.deb
I know it's duplicate but I have searched and tried many things but update not happening
Tried :
Carthage Update
rm -rf ~/Library/Caches/org.carthage.CarthageKit and carthage update --platform iOS
brew install carthage --HEAD
==> Cloning https://github.com/Carthage/Carthage.git Cloning into '/Users/xxxx/Library/Caches/Homebrew/carthage--git'... remote:
Counting objects: 20918, done. remote: Compressing objects: 100%
(6/6), done. remote: Total 20918 (delta 0), reused 1 (delta 0),
pack-reused 20912 Receiving objects: 100% (20918/20918), 18.03 MiB |
815.00 KiB/s, done. Resolving deltas: 100% (13727/13727), done.
==> Checking out branch master
==> make prefix_install PREFIX=/usr/local/Cellar/carthage/HEAD-256ae62 Error: The brew link step did not complete successfully The formula
built, but is not symlinked into /usr/local Could not symlink
bin/carthage Target /usr/local/bin/carthage already exists. You may
want to remove it: rm '/usr/local/bin/carthage'
To force the link and overwrite all conflicting files: brew link
--overwrite carthage
To list all files that would be deleted: brew link --overwrite
--dry-run carthage
Possible conflicting files are: /usr/local/bin/carthage
==> Caveats Bash completion has been installed to: /usr/local/etc/bash_completion.d
zsh completions have been installed to:
/usr/local/share/zsh/site-functions
==> Summary 🍺 /usr/local/Cellar/carthage/HEAD-256ae62: 69 files, 23.9MB, built in 6 minutes 7 seconds
Please update to the latest Carthage version: 0.30.1. You currently
are on 0.26.2
I could not update it.
How can i answer a question made by the console in travis-ci? I made a script that is downloading gvm but right after it completes i receive something like this:
"Do you want grails 2.1.5 to be set as default? (Y/n):"
Right after this question the build can't go foward, i tried to use expects but i was not very successful, my travis.yml is this:
language: groovy
jdk:
- oraclejdk7
before_install:
rm -rf ~/.gvm
curl -s get.gvmtool.net > ~/install_gvm.sh
chmod 775 ~/install_gvm.sh
~/install_gvm.sh
source "/home/travis/.sdkman/bin/sdkman-init.sh"
sdk install grails 2.1.5
echo "gvm_auto_answer=Y" > ~/.sdkman/bin/config
branches:
only:
- master
script: grails test-app --non-interactive
EDIT Grails wrapper is not working as you can see here
https://travis-ci.org/jpms2/ResS/builds/81761164
I seemed to find a problem like mine that happened with gvm instalation, the solution to this problem was a command like this:
echo "gvm_auto_answer=true" >> ~/.gvm/etc/config
So i tried to use this command and had no success:
echo "gvm_auto_answer=Y" >> ~/.sdkman/etc/config
I did find a way to pass the log message, using
echo sdkman_auto_answer=true > ~/.sdkman/etc/config
my travis.yml file is like this now:
language: groovy
jdk:
- oraclejdk7
before_install:
rm -rf ~/.gvm
curl -s get.gvmtool.net > ~/install_gvm.sh
chmod 775 ~/install_gvm.sh
~/install_gvm.sh
echo sdkman_auto_answer=true > ~/.sdkman/etc/config
source "/home/travis/.sdkman/bin/sdkman-init.sh"
sdk install grails 2.1.5
branches:
only:
- master
script: grails test-app --non-interactive
This is my travis.yml
language: java
sudo: required
jdk:
- oraclejdk8
install: true
script:
- sudo apt-get update && sudo apt-get install oracle-java8-installer
- java -version
after_success:
- ./gradlew test jacocoTestReport coveralls
And this is the travis output:
[...]
:processTestResources
:testClasses
:test
Download https://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946.pom
Download https://repo1.maven.org/maven2/org/jacoco/org.jacoco.build/0.7.5.201505241946/org.jacoco.build-0.7.5.201505241946.pom
Download https://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.7.5.201505241946/org.jacoco.agent-0.7.5.201505241946.jar
No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself.
The build has been terminated
I have no idea why and how I can debug this :\ any hints?
Works on my machine.
It turned out it has nothing to do with jacoco. I'm using JavaFX with TestFX and, of course, it needs a frame buffer. It works after enabling xvfb:
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"