-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Experiment with common drone utility functions.
- Loading branch information
1 parent
a1e39d7
commit 7a294ff
Showing
2 changed files
with
48 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Use, modification, and distribution are | ||
# subject to the Boost Software License, Version 1.0. (See accompanying | ||
# file LICENSE.txt) | ||
# | ||
# Copyright René Ferdinand Rivera Morell 2020. | ||
|
||
|
||
# Generate pipeline for Linux platform compilers. | ||
def linux_cxx(name, cxx, cxxflags="", packages="", llvm_os="", llvm_ver="", arch="amd64", image="ubuntu:18.04"): | ||
return { | ||
"name": "Linux %s" % name, | ||
"kind": "pipeline", | ||
"type": "docker", | ||
"trigger": { "branch": [ "master" ] }, | ||
"platform": { | ||
"os": "linux", | ||
"arch": arch | ||
}, | ||
# Create env vars per generation arguments. | ||
"environment": { | ||
"CXX": cxx, | ||
"CXXFLAGS": cxxflags, | ||
"PACKAGES": packages, | ||
"LLVM_OS": llvm_os, | ||
"LLVM_VER": llvm_ver | ||
}, | ||
"steps": [ | ||
{ | ||
"name": "Everything", | ||
"image": image, | ||
"commands": [ | ||
# Need some extra container setup. | ||
"echo '==================================> SETUP'", | ||
"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. | ||
"echo '==================================> INSTALL TOOLSET'", | ||
"uname -a", | ||
"./.ci_playground/linux-cxx-install.sh", | ||
# And the compiler step just calls the compiler. | ||
"echo '==================================> COMPILE'", | ||
"$${CXX} --version", | ||
"$${CXX} $${CXXFLAGS} -v src/main.cpp" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters