Mad*_*den 5 github travis-ci travis-ci-cli
我目前正在github上与Raspberry Pi相关的项目上工作,我想将其附加到某种CI系统上,以便贡献者可以查看它们是否破坏东西而无需构建电路(该项目涉及GPIO引脚)。TravisCI似乎是显而易见的选择,因为它与github很好地集成在一起,但是我对其他人开放
环顾四周之后,似乎要做的事情是在我的Pi机器上本地运行TravisCI服务器(而不是尝试在Travis云中设置某种模拟环境),但是我不确定如何指出我本地服务器上的github项目页面?谁能解释我该怎么做?
您是否有必要在您的个人硬件上运行该项目?如果您对Raspberry Pi的代码编译和测试感到满意,可以按照以下方式进行:
在 Travis 上交叉编译。我得到了以下代码:
Dockerfile:
FROM mitchallen/pi-cross-compile
# Switch into our apps working directory
WORKDIR /build
COPY . /build
# The base image has more examples how to use make or CMake for the project, directly
# calling the cross-compiler, is the minimal example here.
RUN ["/pitools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-gcc",\
"-o", "hello", "hello.cpp"]
Run Code Online (Sandbox Code Playgroud)
.travis.yml:
language: cpp
services:
- docker
before_install:
- docker build -t me/image .
script:
# One of those lines is necessary otherwise travis runs 'rake' by default.
- true
- echo "Success"
Run Code Online (Sandbox Code Playgroud)
hello.cpp:
#include <stdio.h>
int main (int argc, char **argv) {
printf("Hello, world!\n");
return 0;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
640 次 |
| 最近记录: |