Skip to content

Commit

Permalink
Clean up Cirrus CI defs and description.
Browse files Browse the repository at this point in the history
  • Loading branch information
grafikrobot committed May 21, 2020
1 parent 0b51ff7 commit 43f7965
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 63 deletions.
7 changes: 7 additions & 0 deletions .ci_playground/choco-vs2017.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@
<packages>
<package id="visualstudio2017buildtools" packageParameters="--add Microsoft.VisualStudio.Workload.VCTools" />
</packages>
<!--
Use, modification, and distribution are
subject to the Boost Software License, Version 1.0. (See accompanying
file LICENSE.txt)
Copyright Rene Rivera 2020.
-->
7 changes: 7 additions & 0 deletions .ci_playground/choco-vs2019.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@
<packages>
<package id="visualstudio2019buildtools" packageParameters="--add Microsoft.VisualStudio.Workload.VCTools" />
</packages>
<!--
Use, modification, and distribution are
subject to the Boost Software License, Version 1.0. (See accompanying
file LICENSE.txt)
Copyright Rene Rivera 2020.
-->
136 changes: 73 additions & 63 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,37 @@

# Configuration for https://cirrus-ci.org/.

# linux_task:
# # All the GCC's and Clang's available for Ubuntu Bionic.
# matrix:
# - { name: 'Linux, GCC 10', env: { CXX: g++-10, PACKAGES: g++-10 }, container: { image: 'ubuntu:18.04' } }
# - { name: 'Linux, GCC 9', env: { CXX: g++-9, PACKAGES: g++-9 }, container: { image: 'ubuntu:18.04' } }
# - { name: 'Linux, GCC 8', env: { CXX: g++-8, PACKAGES: g++-8 }, container: { image: 'ubuntu:18.04' } }
# - { name: 'Linux, GCC 7', env: { CXX: g++-7, PACKAGES: g++-7 }, container: { image: 'ubuntu:18.04' } }
# - { name: 'Linux, GCC 6', env: { CXX: g++-6, PACKAGES: g++-6 }, container: { image: 'ubuntu:18.04' } }
# - { name: 'Linux, GCC 5', env: { CXX: g++-5, PACKAGES: g++-5 }, container: { image: 'ubuntu:18.04' } }
# - { name: 'Linux, Clang 10', env: { CXX: clang++-10, PACKAGES: clang-10, LLVM_OS: bionic, LLVM_VER: 10 }, container: { image: 'ubuntu:18.04' } }
# - { name: 'Linux, Clang 9', env: { CXX: clang++-9, PACKAGES: clang-9, LLVM_OS: bionic, LLVM_VER: 9 }, container: { image: 'ubuntu:18.04' } }
# - { name: 'Linux, Clang 8', env: { CXX: clang++-8, PACKAGES: clang-8, LLVM_OS: bionic, LLVM_VER: 8 }, container: { image: 'ubuntu:18.04' } }
# - { name: 'Linux, Clang 7', env: { CXX: clang++-7, PACKAGES: clang-7, LLVM_OS: bionic, LLVM_VER: 7 }, container: { image: 'ubuntu:18.04' } }
# - { name: 'Linux, Clang 6', env: { CXX: clang++-6.0, PACKAGES: clang-6.0, LLVM_OS: bionic, LLVM_VER: 6.0 }, container: { image: 'ubuntu:18.04' } }
# - { name: 'Linux, Clang 5', env: { CXX: clang++-5.0, PACKAGES: clang-5.0, LLVM_OS: bionic, LLVM_VER: 5.0 }, container: { image: 'ubuntu:18.04' } }
# # Need some extra container setup.
# setup_script: [
# "apt-get -o Acquire::Retries=3 update && apt-get -o Acquire::Retries=3 install -y sudo software-properties-common wget apt-transport-https && rm -rf /var/lib/apt/lists/*"
# ]
# # The install runs a helper script to do the install and any setup.
# install_script: [
# "uname -a",
# "./.ci_playground/linux-cxx-install.sh"
# ]
# compile_script: [
# "${CXX} --version",
# "${CXX} ${CXXFLAGS} -v src/main.cpp"
# ]
linux_task:
# All the GCC's and Clang's available for Ubuntu Bionic.
matrix:
- { name: 'Linux, GCC 10', env: { CXX: g++-10, PACKAGES: g++-10 }, container: { image: 'ubuntu:18.04' } }
- { name: 'Linux, GCC 9', env: { CXX: g++-9, PACKAGES: g++-9 }, container: { image: 'ubuntu:18.04' } }
- { name: 'Linux, GCC 8', env: { CXX: g++-8, PACKAGES: g++-8 }, container: { image: 'ubuntu:18.04' } }
- { name: 'Linux, GCC 7', env: { CXX: g++-7, PACKAGES: g++-7 }, container: { image: 'ubuntu:18.04' } }
- { name: 'Linux, GCC 6', env: { CXX: g++-6, PACKAGES: g++-6 }, container: { image: 'ubuntu:18.04' } }
- { name: 'Linux, GCC 5', env: { CXX: g++-5, PACKAGES: g++-5 }, container: { image: 'ubuntu:18.04' } }
- { name: 'Linux, Clang 10', env: { CXX: clang++-10, PACKAGES: clang-10, LLVM_OS: bionic, LLVM_VER: 10 }, container: { image: 'ubuntu:18.04' } }
- { name: 'Linux, Clang 9', env: { CXX: clang++-9, PACKAGES: clang-9, LLVM_OS: bionic, LLVM_VER: 9 }, container: { image: 'ubuntu:18.04' } }
- { name: 'Linux, Clang 8', env: { CXX: clang++-8, PACKAGES: clang-8, LLVM_OS: bionic, LLVM_VER: 8 }, container: { image: 'ubuntu:18.04' } }
- { name: 'Linux, Clang 7', env: { CXX: clang++-7, PACKAGES: clang-7, LLVM_OS: bionic, LLVM_VER: 7 }, container: { image: 'ubuntu:18.04' } }
- { name: 'Linux, Clang 6', env: { CXX: clang++-6.0, PACKAGES: clang-6.0, LLVM_OS: bionic, LLVM_VER: 6.0 }, container: { image: 'ubuntu:18.04' } }
- { name: 'Linux, Clang 5', env: { CXX: clang++-5.0, PACKAGES: clang-5.0, LLVM_OS: bionic, LLVM_VER: 5.0 }, container: { image: 'ubuntu:18.04' } }
# Need some extra container setup.
setup_script: [
"apt-get -o Acquire::Retries=3 update && apt-get -o Acquire::Retries=3 install -y sudo software-properties-common wget apt-transport-https && rm -rf /var/lib/apt/lists/*"
]
# The install runs a helper script to do the install and any setup.
install_script: [
"uname -a",
"./.ci_playground/linux-cxx-install.sh"
]
compile_script: [
"${CXX} --version",
"${CXX} ${CXXFLAGS} -v src/main.cpp"
]

# This currently fails because the Cirrus feature for encrypted variables seems
# broken when used with env vars. Hence it's entirely disabled.
# xcode_task:
# matrix:
# - { name: 'macOS, Xcode 11.4.1', env: { CXX: clang++, XCODE_VERSION: 11.4.1 }, osx_instance: { image: 'catalina-xcode-11.4.1' } }
Expand All @@ -60,43 +62,51 @@
# "${CXX} ${CXXFLAGS} -v --sysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk src/main.cpp"
# ]

# freebsd_task:
# # All the GCC's and Clang's currently supported by FreeBSD ports.
# matrix:
# - { name: 'FreeBSD, GCC 11', env: { CXX: 'g++11', PACKAGE: 'gcc11-devel' }, freebsd_instance: { image_family: 'freebsd-13-0-snap' } }
# - { name: 'FreeBSD, GCC 10', env: { CXX: 'g++10', PACKAGE: 'gcc10-devel' }, freebsd_instance: { image_family: 'freebsd-13-0-snap' } }
# - { name: 'FreeBSD, GCC 9', env: { CXX: 'g++9', PACKAGE: 'gcc9-devel' }, freebsd_instance: { image_family: 'freebsd-13-0-snap' } }
# - { name: 'FreeBSD, GCC 8', env: { CXX: 'g++8', PACKAGE: 'gcc8-devel' }, freebsd_instance: { image_family: 'freebsd-13-0-snap' } }
# - { name: 'FreeBSD, GCC 7', env: { CXX: 'g++7', PACKAGE: 'gcc7' }, freebsd_instance: { image_family: 'freebsd-13-0-snap' } }
# - { name: 'FreeBSD, Clang 10', env: { CXX: 'clang++10', PACKAGE: 'llvm10' }, freebsd_instance: { image_family: 'freebsd-13-0-snap' } }
# - { name: 'FreeBSD, Clang 9', env: { CXX: 'clang++90', PACKAGE: 'llvm90' }, freebsd_instance: { image_family: 'freebsd-13-0-snap' } }
# - { name: 'FreeBSD, Clang 8', env: { CXX: 'clang++80', PACKAGE: 'llvm80' }, freebsd_instance: { image_family: 'freebsd-13-0-snap' } }
# - { name: 'FreeBSD, Clang 7', env: { CXX: 'clang++70', PACKAGE: 'llvm70' }, freebsd_instance: { image_family: 'freebsd-13-0-snap' } }
# - { name: 'FreeBSD, Clang 6', env: { CXX: 'clang++60', PACKAGE: 'llvm60' }, freebsd_instance: { image_family: 'freebsd-13-0-snap' } }
# # To install with ports we need to initialize the package manager. To avoid
# # confirmation prompts we need to set an env var.
# install_script: [
# "uname -a",
# "env ASSUME_ALWAYS_YES=YES pkg bootstrap",
# "env ASSUME_ALWAYS_YES=YES pkg install ${PACKAGE}"
# ]
# # Compiling is simply calling the compiler.
# compile_script: [
# "${CXX} --version",
# "${CXX} ${CXXFLAGS} -v src/main.cpp"
# ]

msvc_task:
freebsd_task:
# All the GCC's and Clang's currently supported by FreeBSD ports.
matrix:
# - { name: 'Windows, VS 2019', env: { CXX: cl.exe, CXXFLAGS: /Femain, VSWHERE_VERSION: '[16.0,17.0)', PLATFORM: x64, CHOCO_CONFIG: vs2019 } }
- { name: 'Windows, VS 2017', env: { CXX: cl.exe, CXXFLAGS: /Femain, VSWHERE_VERSION: '[15.0,16.0)', PLATFORM: x64, CHOCO_CONFIG: vs2017 } }
windows_container:
image: cirrusci/windowsservercore:2019
- { name: 'FreeBSD, GCC 11', env: { CXX: 'g++11', PACKAGE: 'gcc11-devel' }, freebsd_instance: { image_family: 'freebsd-13-0-snap' } }
- { name: 'FreeBSD, GCC 10', env: { CXX: 'g++10', PACKAGE: 'gcc10-devel' }, freebsd_instance: { image_family: 'freebsd-13-0-snap' } }
- { name: 'FreeBSD, GCC 9', env: { CXX: 'g++9', PACKAGE: 'gcc9-devel' }, freebsd_instance: { image_family: 'freebsd-13-0-snap' } }
- { name: 'FreeBSD, GCC 8', env: { CXX: 'g++8', PACKAGE: 'gcc8-devel' }, freebsd_instance: { image_family: 'freebsd-13-0-snap' } }
- { name: 'FreeBSD, GCC 7', env: { CXX: 'g++7', PACKAGE: 'gcc7' }, freebsd_instance: { image_family: 'freebsd-13-0-snap' } }
- { name: 'FreeBSD, Clang 10', env: { CXX: 'clang++10', PACKAGE: 'llvm10' }, freebsd_instance: { image_family: 'freebsd-13-0-snap' } }
- { name: 'FreeBSD, Clang 9', env: { CXX: 'clang++90', PACKAGE: 'llvm90' }, freebsd_instance: { image_family: 'freebsd-13-0-snap' } }
- { name: 'FreeBSD, Clang 8', env: { CXX: 'clang++80', PACKAGE: 'llvm80' }, freebsd_instance: { image_family: 'freebsd-13-0-snap' } }
- { name: 'FreeBSD, Clang 7', env: { CXX: 'clang++70', PACKAGE: 'llvm70' }, freebsd_instance: { image_family: 'freebsd-13-0-snap' } }
- { name: 'FreeBSD, Clang 6', env: { CXX: 'clang++60', PACKAGE: 'llvm60' }, freebsd_instance: { image_family: 'freebsd-13-0-snap' } }
# To install with ports we need to initialize the package manager. To avoid
# confirmation prompts we need to set an env var.
install_script: [
"choco install .ci_playground/choco-%CHOCO_CONFIG%.config -y --ignore-detected-reboot --no-progress",
"choco install vswhere -y --no-progress"
"uname -a",
"env ASSUME_ALWAYS_YES=YES pkg bootstrap",
"env ASSUME_ALWAYS_YES=YES pkg install ${PACKAGE}"
]
# Compiling is simply calling the compiler.
compile_script: [
".ci_playground/windows-msvc-setup.cmd",
"\"%CXX%\" %CXXFLAGS% src/main.cpp"
"${CXX} --version",
"${CXX} ${CXXFLAGS} -v src/main.cpp"
]

# Unfortunately choco installs a package that requires a reboot. Which is
# something that can't work in the containers Cirrus uses. Hence this is
# disabled entirely. But left here for reference and information.
# msvc_task:
# # Cirrus doesn't have preinstalled VS version. We specify info to install
# # VS with Chocolatey.
# matrix:
# - { name: 'Windows, VS 2019', env: { CXX: cl.exe, CXXFLAGS: /Femain, VSWHERE_VERSION: '[16.0,17.0)', PLATFORM: x64, CHOCO_CONFIG: vs2019 } }
# - { name: 'Windows, VS 2017', env: { CXX: cl.exe, CXXFLAGS: /Femain, VSWHERE_VERSION: '[15.0,16.0)', PLATFORM: x64, CHOCO_CONFIG: vs2017 } }
# windows_container:
# image: cirrusci/windowsservercore:2019
# # Install VS and vswhere. For VS we use a predefined configuration that
# # define the packages and arguments needed.
# install_script: [
# "choco install .ci_playground/choco-%CHOCO_CONFIG%.config -y --ignore-detected-reboot --no-progress",
# "choco install vswhere -y --no-progress"
# ]
# # To compile we need to set up the compile environment.
# compile_script: [
# ".ci_playground/windows-msvc-setup.cmd",
# "\"%CXX%\" %CXXFLAGS% src/main.cpp"
# ]
5 changes: 5 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ file is the only setup needed for CircleCI.

=== https://cirrus-ci.org/[Cirrus CI] image:https://api.cirrus-ci.com/github/bfgroup/ci_playground.svg?branch=master["Build Status", link="https://cirrus-ci.com/github/bfgroup/ci_playground"]

Of the current cloud CI offerings Cirrus CI is different in that it offers
FreeBSD public VMs. Cirrus CI provides "community clusters" that also include
Linux, macOS, and Windows. Unfortunately getting macOS Xcode and Visual Studio
installed is currently not possible.

Configuration::
link:.cirrus.yml[`<root>/.cirrus.yml`]

Expand Down

0 comments on commit 43f7965

Please sign in to comment.