1 Star 0 Fork 7

shanewfx/knet

forked from kibaamor/knet 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.travis.yml 4.74 KB
一键复制 编辑 原始数据 按行查看 历史
kibaamor 提交于 2021-10-06 09:25 . simplify travis.yml
language: cpp
jobs:
include:
- os: linux
dist: bionic
env: GCC_VERSION=5
- os: linux
dist: bionic
env: GCC_VERSION=6
- os: linux
dist: bionic
env: GCC_VERSION=7
- os: linux
dist: bionic
env: GCC_VERSION=8
- os: linux
dist: bionic
env: GCC_VERSION=9
- os: linux
dist: bionic
env: GCC_VERSION=10
- os: linux
dist: bionic
env: GCC_VERSION=11
- os: linux
dist: bionic
env: CLANG_VERSION=5.0
- os: linux
dist: bionic
env: CLANG_VERSION=6.0
- os: linux
dist: bionic
env: CLANG_VERSION=7
- os: linux
dist: bionic
env: CLANG_VERSION=8
- os: linux
dist: bionic
env: CLANG_VERSION=9
- os: linux
dist: bionic
env: CLANG_VERSION=10
- os: linux
dist: bionic
env: CLANG_VERSION=11
- os: linux
dist: bionic
env: CLANG_VERSION=12
- os: linux
dist: bionic
env: CLANG_VERSION=13
# osx image list https://docs.travis-ci.com/user/reference/osx/#macos-version
- os: osx
osx_image: xcode9.4
- os: osx
osx_image: xcode10.3
- os: osx
osx_image: xcode11.6
- os: osx
osx_image: xcode12.5
# - os: osx
# osx_image: xcode12.5
# env: GCC_VERSION=5
# - os: osx
# osx_image: xcode12.5
# env: GCC_VERSION=6
# - os: osx
# osx_image: xcode12.5
# env: GCC_VERSION=7
# - os: osx
# osx_image: xcode12.5
# env: GCC_VERSION=8
# - os: osx
# osx_image: xcode12.5
# env: GCC_VERSION=9
# - os: osx
# osx_image: xcode12.5
# env: GCC_VERSION=10
# - os: osx
# osx_image: xcode12.5
# env: GCC_VERSION=11
- os: freebsd
# https://www.freshports.org/
# - os: freebsd
# env: GCC_VERSION=8
# - os: freebsd
# env: GCC_VERSION=10
# - os: freebsd
# env: GCC_VERSION=11
# - os: freebsd
# env: CLANG_VERSION=70
# - os: freebsd
# env: CLANG_VERSION=80
# - os: freebsd
# env: CLANG_VERSION=90
# - os: freebsd
# env: CLANG_VERSION=10
# - os: freebsd
# env: CLANG_VERSION=11
# - os: freebsd
# env: CLANG_VERSION=12
# - os: freebsd
# env: CLANG_VERSION=13
ubuntu_prepare: &ubuntu_prepare
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
CMAKE_URL="https://cmake.org/files/v3.15/cmake-3.15.7-Linux-x86_64.sh"
wget -qO /tmp/cmake.sh $CMAKE_URL
sh /tmp/cmake.sh --prefix=/tmp/ --exclude-subdir --skip-license
echo "export PATH=/tmp/bin/:/usr/local/bin:/usr/bin:$PATH" >> /tmp/knet.env
if [[ "$GCC_VERSION" != "" ]]; then
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get -q update
sudo apt-get -yq install g++-$GCC_VERSION
echo "export CC=gcc-$GCC_VERSION CXX=g++-$GCC_VERSION" >> /tmp/knet.env
fi
if [[ "$CLANG_VERSION" != "" ]]; then
curl -sSL "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add -
echo "deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-$CLANG_VERSION main" | sudo tee -a ${TRAVIS_ROOT}/etc/apt/sources.list >/dev/null
sudo apt-get -q update
sudo apt-get -yq install clang-$CLANG_VERSION
echo "export CC=clang-$CLANG_VERSION CXX=clang++-$CLANG_VERSION" >> /tmp/knet.env
fi
fi
osx_prepare: &osx_prepare
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
if [[ "$GCC_VERSION" != "" ]]; then
brew install gcc@$GCC_VERSION
echo "export CC=gcc-$GCC_VERSION CXX=g++-$GCC_VERSION" >> /tmp/knet.env
fi
fi
freebsd_prepare: &freebsd_prepare
if [[ "$TRAVIS_OS_NAME" == "freebsd" ]]; then
if [[ "$GCC_VERSION" != "" ]]; then
su -m root -c "pkg install -y gcc$GCC_VERSION"
echo "export CC=gcc$GCC_VERSION CXX=g++$GCC_VERSION" >> /tmp/knet.env
fi
if [[ "$CLANG_VERSION" != "" ]]; then
su -m root -c "pkg install -y llvm$GCC_VERSION"
echo "export CC=/usr/local/bin/clang$CLANG_VERSION CXX=/usr/local/bin/clang++$CLANG_VERSION" >> /tmp/knet.env
fi
fi
before_install:
- echo > /tmp/knet.env
- *ubuntu_prepare
- *osx_prepare
- *freebsd_prepare
before_script:
- cat /tmp/knet.env
- source /tmp/knet.env
- printenv
- ${CC} --version
- ${CXX} --version
- cmake --version
script:
# Generate project
- cmake . -B build
# Debug
- cmake --build build --clean-first --config Debug
- (cd build && ctest --output-on-failure)
# Release
- cmake --build build --clean-first --config Release
- (cd build && ctest --output-on-failure)
# MinSizeRel
- cmake --build build --clean-first --config MinSizeRel
- (cd build && ctest --output-on-failure)
# RelWithDebInfo
- cmake --build build --clean-first --config RelWithDebInfo
- (cd build && ctest --output-on-failure)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/shanewfx/knet.git
[email protected]:shanewfx/knet.git
shanewfx
knet
knet
master

搜索帮助