travis CI 不适用于 C 编译器。
.travis.yml:
sudo: required
language: c
os:
- linux
compiler:
- gcc
GitHib 存储库链接: Algorithms
特拉维斯 CI 错误:
travis_time:end:0dcb3648:start=1438359476527442359,finish=1438359476614557866,duration=87115507
[0K$ cd piyush-maurya/algorithms
$ git checkout -qf 37da548d8f6e1ced6df4b3e22e2b5afd5435c2a2
travis_fold:end:git.checkout
[0K$ export CC=gcc
$ gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
travis_time:start:2b2b89e2
[0K$ ./configure && make && make test
/home/travis/build.sh: line 41: ./configure: No such file or directory
travis_time:end:2b2b89e2:start=1438359476633265005,finish=1438359476641026855,duration=7761850
[0K
[31;1mThe command "./configure && make && make test" exited with 127.[0m
Done. Your build exited with 1.
错误链接: travis CI error log
最佳答案
你还没有specified how to build the project 。对于 C 项目,默认为标准 autotools 样式 ./configure && make
,但您的项目没有配置脚本(或 Makefile)。
您可以添加类似的内容
build: cc file1.c file2.c …
要直接调用C编译器,但如果您希望该项目对其他人有用,您应该提供一个Makefile(或使用像autotools、CMake、waf等构建系统),然后就这样做
build: make
关于c - travis CI 无法与 GitHub 上的 C 编译器配合使用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31751048/