加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.travis.yml 2.20 KB
一键复制 编辑 原始数据 按行查看 历史
sudo: required
# Travis doesn't provide a wide variety of host environments to run on, so we
# rely on Docker to provide these instead.
services:
- docker
# It is not really needed, other than for showing correct language tag in
# Travis CI build log.
language: c
# The matrix of targets that we're interested in.
env:
- HOST="ubuntu:16.04"
# Before running the install phase we need to set up docker container that runs
# the target machine.
before_install:
# Spin up container
- docker run -d --name host -v $(pwd):/travis $HOST tail -f /dev/null
- docker ps
# Update the container and install dependencies
install:
- docker exec -t host bash -c "yes | apt-get update"
- docker exec -t host bash -c "yes | apt-get upgrade"
- docker exec -t host bash -c "yes | apt-get install build-essential git wget jq"
# Install QEMU dependencies
- docker exec -t host bash -c "yes | apt-get install libpixman-1-0 libnuma1 libpng12-0 libglib2.0-0 libjpeg8"
# Download RISC-V embedded toolchain
- docker exec -t host bash -c "cd /travis && wget https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-ubuntu14.tar.gz"
- docker exec -t host bash -c "cd /travis && tar xzvf riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-ubuntu14.tar.gz"
# Download RISC-V QEMU
- docker exec -t host bash -c "cd /travis && wget https://static.dev.sifive.com/dev-tools/riscv-qemu-4.1.0-2019.08.0-x86_64-linux-ubuntu14.tar.gz"
- docker exec -t host bash -c "cd /travis && tar xzvf riscv-qemu-4.1.0-2019.08.0-x86_64-linux-ubuntu14.tar.gz"
# Here's where we actually run the test.
script:
# check that submodules match wit-manifest.json
- docker exec -t host bash -c "cd /travis && ./scripts/check-submodules"
# Build all software for all targets
- docker exec -t host bash -c "export RISCV_PATH=/travis/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-ubuntu14 && cd /travis && ./scripts/all-targets-build"
# Test by running software on all QEMU targets
- docker exec -t host bash -c "export RISCV_PATH=/travis/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-ubuntu14 && export PATH=$PATH:/travis/riscv-qemu-4.1.0-2019.08.0-x86_64-linux-ubuntu14/bin && cd /travis && ./scripts/test-qemu-targets"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化