11. Continuous Integration¶
To test the project the continuous integration tools
AppVeyor,
Azure Pipelines,
Cirrus CI and
Travis CI.
are used.
11.1. Project Status¶
CI Service |
Build Status |
Platform on Architecture with compiler |
---|---|---|
AppVeyor |
|
|
Azure Pipelines |
|
|
Travis-CI |
|
|
Cirrus-CI |
|
11.2. Configuration Details¶
11.2.1. AppVeyor¶
AppVeyor CI is configured by the .appveyor.yml
file.
version: 5.4.0.{build}
image: Visual Studio 2019
cache:
- C:\cygwin64\var\cache
- C:\cygwin64\home\appveyor\.cache\pip
skip_commits:
files:
- .vscode/*
- .github/*
- .cirrus.yml
- .editorconfig
- .gitattributes
- .gitignore
- .travis.yml
- .readthedocs.yml
- azure-pipelines.yml
- docs/environment.yml
init:
- git config --global core.autocrlf input
install:
- cmd: curl.exe -o setup-x86_64.exe http://www.cygwin.com/setup-x86_64.exe
- cmd: setup-x86_64.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode --packages alternatives,wget,python37,python37-devel,python37-pip,doxygen,graphviz,llvm,clang
- cmd: C:\cygwin64\bin\bash.exe -l -c "unlink /usr/bin/python3"
- cmd: C:\cygwin64\bin\bash.exe -l -c "/usr/sbin/update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 0 --slave /usr/bin/pip3 pip3 /usr/bin/pip3.6"
- cmd: C:\cygwin64\bin\bash.exe -l -c "/usr/sbin/update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 10 --slave /usr/bin/pip3 pip3 /usr/bin/pip3.7"
- cmd: C:\cygwin64\bin\bash.exe -l -c "/usr/sbin/update-alternatives --install /usr/bin/python python /usr/bin/python3 10 --slave /usr/bin/pip pip /usr/bin/pip3"
- cmd: C:\cygwin64\bin\bash.exe -l -c "/usr/sbin/update-alternatives --set python3 /usr/bin/python3.7"
- cmd: C:\cygwin64\bin\bash.exe -l -c "/usr/sbin/update-alternatives --set python /usr/bin/python3"
- cmd: C:\cygwin64\bin\bash.exe -l -c "python3 --version"
- cmd: C:\cygwin64\bin\bash.exe -l -c "python3 -m ensurepip --upgrade"
- cmd: C:\cygwin64\bin\bash.exe -l -c "python3 -m pip install --upgrade pip"
- cmd: C:\cygwin64\bin\bash.exe -l -c "export C_INCLUDE_PATH=/usr/include/python3.7m && python3 -m pip install --upgrade --requirement /cygdrive/c/projects/native-lua/requirements.txt"
- cmd: C:\cygwin64\bin\bash.exe -l -c "doxygen --version"
- cmd: C:\cygwin64\bin\bash.exe -l -c "dot -V"
- cmd: C:\cygwin64\bin\bash.exe -l -c "python3 --version"
- cmd: C:\cygwin64\bin\bash.exe -l -c "clang --version"
- cmd: C:\cygwin64\bin\bash.exe -l -c "gcc --version"
- cmd: set PATH=%PATH%;%userprofile%\AppData\Local\Programs\lua\bin
before_build:
# check that the correct python versions are used
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua && python3 waf configure"
build_script:
# build documentation
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua && python3 waf build_docs"
# --include-tests
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua && python3 waf distclean configure --include-tests"
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua && python3 waf build_gcc"
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua && python3 waf install_gcc"
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua/build/gcc/tests && which lua && lua -v && lua -e\"_U=true\" all.lua"
#- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua/build/gcc/tests && which lua && lua -v && lua all.lua"
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua && python3 waf uninstall_gcc"
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua && python3 waf build_clang"
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua && python3 waf install_clang"
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua/build/clang/tests && which lua && lua -v && lua -e\"_U=true\" all.lua"
#- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua/build/clang/tests && which lua && lua -v && lua all.lua"
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua && python3 waf uninstall_clang"
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua && python3 waf distclean"
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua && python3 scripts/run_test.py -c gcc -c clang --simple-test"
# --ltests --include-tests
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua && python3 waf distclean configure --ltests --include-tests"
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua && python3 waf build_gcc"
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua && python3 waf install_gcc"
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua/build/gcc/tests && which lua && lua -v && lua -e\"_U=true\" all.lua"
#- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua/build/gcc/tests && which lua && lua -v && lua all.lua"
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua && python3 waf uninstall_gcc"
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua && python3 waf build_clang"
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua && python3 waf install_clang"
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua/build/clang/tests && which lua && lua -v && lua -e\"_U=true\" all.lua"
#- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua/build/gcc/tests && which lua && lua -v && lua all.lua"
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua && python3 waf uninstall_clang"
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua && python3 waf distclean"
- cmd: C:\cygwin64\bin\bash.exe -l -c "cd /cygdrive/c/projects/native-lua && python3 scripts/run_test.py -c gcc -c clang --simple-test"
11.2.2. Azure Pipelines¶
Azure Pipelines CI is configured by the azure-pipelines.yml
file.
# specific path build
trigger:
paths:
exclude:
- .vscode/*
- .github/*
- .appveyor.yml
- .cirrus.yml
- .editorconfig
- .gitattributes
- .gitignore
- .travis.yml
- .readthedocs.yml
- docs/environment.yml
- pyproject.toml
variables:
NATIVE_LUA_CI_BUILD: "TRUE"
jobs:
- job: Linux
pool:
vmImage: "ubuntu-18.04"
displayName: "Linux Build"
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "3.6"
architecture: "x64"
- script: lsb_release -a
displayName: Ubuntu details
- script: echo "##vso[task.prependpath]/opt/lua/bin"
displayName: Add to path
- script: echo $PATH
displayName: echo PATH
- script: |
set -euxo pipefail
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install -y dialog apt-utils software-properties-common libreadline7 libreadline-dev doxygen graphviz
sudo apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main"
sudo apt-get install -y build-essential
sudo apt-get update
sudo apt-get install -y clang-10 lld-10
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 100
python -m pip install --upgrade pip
python -m pip install --upgrade --requirement requirements.txt
displayName: Install dependencies
- script: |
python --version
gcc --version
clang --version
doxygen --version
dot -V
sphinx-build --version
displayName: Compiler and Tools versions
- script: |
set -euxo pipefail
python waf configure -v
python waf build_docs
python waf clean_docs
python waf distclean
displayName: Documentation build
- script: |
set -euxo pipefail
python waf configure --include-tests --prefix=/opt/lua
python waf build_gcc
python waf install_gcc
pushd build/gcc/tests
lua -e"_U=true" all.lua
lua all.lua
popd
python waf uninstall_gcc
python waf clean_gcc
python waf distclean
displayName: GCC build including tests
- script: |
set -euxo pipefail
python waf configure --ltests --include-tests --prefix=/opt/lua
python waf build_gcc
python waf install_gcc
pushd build/gcc/tests
lua -e"_U=true" all.lua
lua all.lua
popd
python waf uninstall_gcc
python waf clean_gcc
displayName: GCC build including tests and ltests
- script: |
set -euxo pipefail
python waf configure --include-tests --prefix=/opt/lua
python waf build_clang
python waf install_clang
pushd build/clang/tests
lua -e"_U=true" all.lua
lua all.lua
popd
python waf uninstall_clang
python waf clean_clang
python waf distclean
displayName: clang build including tests
- script: |
set -euxo pipefail
python waf configure --ltests --include-tests --prefix=/opt/lua
python waf build_clang
python waf install_clang
pushd build/clang/tests
lua -e"_U=true" all.lua
lua all.lua
popd
python waf uninstall_clang
python waf clean_clang
displayName: clang build including tests and ltests
- script: |
set -euxo pipefail
python scripts/run_test.py -c gcc -c clang --simple-test
displayName: test script (gcc, clang) with --simple-test
- script: |
set -euxo pipefail
python scripts/run_test.py -c gcc -c clang --simple-test --ltests
displayName: test script (gcc, clang) with --simple-test and ltests
- job: Windows
pool:
vmImage: "windows-2019"
displayName: "Windows Build"
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "3.6"
addToPath: true
architecture: "x64"
- script: python -m pip install --upgrade pip
displayName: "Upgrad pip and friends"
- script: python -m pip install --upgrade --requirement requirements.txt
displayName: "Install requirements.txt"
- script: choco install llvm -y --version 10.0.0
displayName: Install LLVM
- script: |
curl.exe -o $(Agent.TempDirectory)\doxygen-x64.zip https://www.doxygen.nl/files/doxygen-1.8.20.windows.x64.bin.zip
curl.exe -o $(Agent.TempDirectory)\graphviz.zip https://graphviz.gitlab.io/_pages/Download/windows/graphviz-2.38.zip
displayName: Downloading doxygen and graphviz
- task: ExtractFiles@1
inputs:
archiveFilePatterns: "$(Agent.TempDirectory)/*.zip"
destinationFolder: "$(Agent.TempDirectory)"
cleanDestinationFolder: false
displayName: Extracting doxygen and graphviz
- script: echo "##vso[task.prependpath]$(Agent.TempDirectory)
displayName: Add doxygen to path
- script: echo "##vso[task.prependpath]$(Agent.TempDirectory)\release\bin
displayName: Add graphviz to path
- script: echo "##vso[task.prependpath]C:\Program Files\LLVM\bin
displayName: Add clang to path
- script: echo %PATH%
displayName: echo PATH
- script: |
python --version
gcc --version
clang --version
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.24.28314\bin\HostX64\x64\CL.exe"
doxygen --version
dot -V
sphinx-build --version
black --version
pylint --version
displayName: Compiler and Tools versions
- script: python scripts\run_test.py -c msvc -c gcc -c clang --simple-test -vv
displayName: test script (msvc, gcc, clang) with --simple-test
- script: python scripts\run_test.py -c msvc -c gcc -c clang --simple-test --ltests -vv
displayName: test script (msvc, gcc, clang) with --simple-test and ltests
- job: OSXBuild
pool:
vmImage: "macOS-10.14"
displayName: "MacOSX Build"
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "3.6"
- script: echo "##vso[task.prependpath]/opt/lua/bin"
displayName: Add lua install path to path
- script: echo "##vso[task.prependpath]/usr/local/Cellar/gcc/10.2.0/bin/"
displayName: Add gcc to path
- script: echo $PATH
displayName: echo PATH
- script: |
set -euxo pipefail
brew install --force gcc coreutils
brew ls --verbose gcc
brew unlink gcc
brew link gcc --dry-run
brew link gcc
ln -s /usr/local/bin/gcc-10 /usr/local/bin/gcc
which gcc
greadlink -f `which gcc`
echo | gcc -E -Wp,-v -
gcc -dM -E - < /dev/null
brew install doxygen
brew install graphviz
python -m pip install --upgrade pip
python -m pip install --upgrade --requirement requirements.txt
displayName: Install dependencies
- script: |
python --version
gcc --version
clang --version
doxygen --version
dot -V
sphinx-build --version
displayName: Compiler and Tools versions
- script: |
set -euxo pipefail
python waf configure -v
python waf build_docs
python waf clean_docs
python waf distclean
displayName: Documentation build
- script: |
set -euxo pipefail
python waf configure --include-tests --prefix=/opt/lua -v
displayName: configure with tests
- script: |
set -euxo pipefail
python waf build_clang -v
sudo python waf install_clang
pushd build/clang/tests
lua -e"_U=true" all.lua
# lua all.lua
popd
sudo python waf uninstall_clang
python waf clean_clang
displayName: clang build including tests
- script: |
set -euxo pipefail
python waf build_gcc -v
sudo python waf install_gcc
pushd build/gcc/tests
lua -e"_U=true" all.lua
# lua all.lua
popd
sudo python waf uninstall_gcc
python waf clean_gcc
displayName: gcc build including tests
- script: |
set -euxo pipefail
python waf distclean
displayName: distclean
- script: |
set -euxo pipefail
python waf configure --ltests --include-tests --prefix=/opt/lua -v
displayName: configure with tests and ltests
- script: |
set -euxo pipefail
python waf build_clang -v
sudo python waf install_clang
pushd build/clang/tests
lua -e"_U=true" all.lua
# lua all.lua
popd
sudo python waf uninstall_clang
python waf clean_clang
displayName: clang build including tests and ltests
- script: |
set -euxo pipefail
python waf build_gcc -v
sudo python waf install_gcc
pushd build/gcc/tests
lua -e"_U=true" all.lua
# lua all.lua
popd
sudo python waf uninstall_gcc
python waf clean_gcc
displayName: gcc build including tests and ltests
- script: |
set -euxo pipefail
python waf distclean
displayName: distclean
- job: Windows_Static_Program_Analysis
pool:
vmImage: "windows-2019"
displayName: "Static Program Analysis"
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "3.6"
addToPath: true
architecture: "x64"
- script: python -m pip install --upgrade pip
displayName: "Upgrad pip"
- script: python -m pip install --upgrade --requirement requirements.txt
displayName: "Install requirements.txt"
- script: |
python --version
black --version
pylint --version
displayName: Static Program Analysis Tools versions
- script: python waf --help
displayName: Unpack waf
- script: black . --config=pyproject.toml --check -v
displayName: Run black
- script: pylint --rcfile=pyproject.toml wscript
displayName: Run pylint wscript
- script: pylint --rcfile=pyproject.toml docs\conf.py
displayName: Run pylint docs\conf.py
- script: pylint --rcfile=pyproject.toml scripts\dot.py
displayName: Run pylint scripts\dot.py
- script: pylint --rcfile=pyproject.toml scripts\doxygen.py
displayName: Run pylint scripts\doxygen.py
- script: pylint --rcfile=pyproject.toml scripts\sphinx.py
displayName: Run pylint scripts\sphinx.py
11.2.3. Cirrus CI¶
Cirrus CI is configured by the .cirrus.yml
file.
task:
pip_cache:
folder: ~/.cache/pip
fingerprint_script: echo $CIRRUS_OS
matrix:
- container:
image: debian:10
install_script:
- export RUNLEVEL=1
- apt-get update
- apt-get install -y apt-utils lsb-release curl gnupg
- curl -o llvm-snapshot.gpg.key https://apt.llvm.org/llvm-snapshot.gpg.key
- cat llvm-snapshot.gpg.key
- apt-key add llvm-snapshot.gpg.key
- apt-get update
- lsb_release -a
- apt-get install -y dialog
- apt-get install -y software-properties-common libreadline7 libreadline-dev
- apt-add-repository "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-10 main"
- apt-get update
- apt-get -y upgrade
- apt-get install -y build-essential doxygen graphviz python3-pip
- apt-get install -y clang-10 lld-10
- update-alternatives --install /usr/bin/clang clang /usr/bin/clang-10 100
- python3 -m pip install --upgrade --requirement requirements.txt
- container:
image: fedora:30
install_script:
- export RUNLEVEL=1
- dnf -y update
- dnf -y install redhat-lsb-core gcc clang python3-pip doxygen graphviz readline readline-devel
- lsb_release -a
- python3 -m pip install --upgrade --requirement requirements.txt
- container:
image: ubuntu:bionic
install_script:
- export RUNLEVEL=1
- apt-get update
- apt-get install -y apt-utils lsb-release curl gnupg
- curl -o llvm-snapshot.gpg.key https://apt.llvm.org/llvm-snapshot.gpg.key
- cat llvm-snapshot.gpg.key
- apt-key add llvm-snapshot.gpg.key
- apt-get update
- lsb_release -a
- apt-get install -y dialog python3-pip
- apt-get install -y software-properties-common libreadline7 libreadline-dev
- apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main"
- apt-get update
- apt-get -y upgrade
- apt-get install -y build-essential doxygen graphviz
- apt-get install -y clang-9 lld-9
- update-alternatives --install /usr/bin/clang clang /usr/bin/clang-9 100
- python3 -m pip install --upgrade --requirement requirements.txt
- freebsd_instance:
image_family: freebsd-12-1
freebsd_install_script:
- pkg update -f
- env ASSUME_ALWAYS_YES=YES pkg bootstrap -f
- env ASSUME_ALWAYS_YES=YES pkg upgrade pkg
- env ASSUME_ALWAYS_YES=YES pkg install lang/gcc bash doxygen
- python3 -m ensurepip --default-pip
- python3 -m pip install --upgrade pip
- python3 -m pip install --upgrade --requirement requirements.txt
freebsd_setup_script:
- chsh -s /usr/local/bin/bash
version_script:
- python3 --version
- gcc --version
- clang --version
- doxygen --version
- dot -V
- sphinx-build --version
script:
# basic configuration
- python3 waf configure -v
# documentation build
- python3 waf build_docs
- python3 waf clean_docs
- python3 waf distclean
# configuration
- python3 waf configure --include-tests
# gcc [
- python3 waf build_gcc -v
- python3 waf install_gcc -v
- pushd build/gcc/tests
- lua -e"_U=true" all.lua
#- lua all.lua
- popd
- python3 waf uninstall_gcc
- python3 waf clean_gcc
# gcc ]
- python3 waf distclean
# including ltests
- python3 waf configure --ltests --include-tests
# gcc [
- python3 waf build_gcc -v
- python3 waf install_gcc -v
- pushd build/gcc/tests
- lua -e"_U=true" all.lua
#- lua all.lua
- popd
- python3 waf uninstall_gcc
- python3 waf clean_gcc
# gcc ]
# configuration
- python3 waf configure --include-tests
# clang [
- python3 waf build_clang -v
- python3 waf install_clang -v
- pushd build/clang/tests
- lua -e"_U=true" all.lua
#- lua all.lua
- popd
- python3 waf uninstall_clang
- python3 waf clean_clang
# clang ]
- python3 waf distclean
# including ltests
- python3 waf configure --ltests --include-tests
# clang [
- python3 waf build_clang -v
- python3 waf install_clang -v
- pushd build/clang/tests
- lua -e"_U=true" all.lua
#- lua all.lua
- popd
- python3 waf uninstall_clang
- python3 waf clean_clang
# clang ]
# test script
- python3 scripts/run_test.py -c gcc -c clang --simple-test
- python3 scripts/run_test.py -c gcc -c clang --simple-test --ltests
11.2.4. Travis CI¶
Travis CI is configured by the .travis.yml
file.
branches:
except:
- /^appveyor-.*$/
- /^azure.*$/
- /^cirrus-ci.*$/
env:
- NATIVE_LUA_CI_BUILD="TRUE"
addons:
apt:
update: true
packages:
- doxygen
- graphviz
cache: pip
matrix:
fast_finish: true
include:
- os: linux
dist: xenial
language: python
sudo: required
- os: linux
dist: bionic
language: python
sudo: required
# - os: linux
# arch: ppc64le
# language: python
# sudo: required
# - os: linux
# arch: s390x
# language: python
# sudo: required
# - os: linux
# arch: arm64
# language: python
# sudo: required
install:
- python3 -m pip install --upgrade --requirement requirements.txt
# - if [ "$TRAVIS_CPU_ARCH" != "amd64" ]; then sudo apt-get install python3-pip -y; fi
# - if [ "$TRAVIS_CPU_ARCH" != "amd64" ]; then sudo python3 -m pip install sphinx -q; fi
before_script:
- which gcc
- which clang
- echo $PATH
- python3 --version
- gcc --version
- clang --version
- doxygen --version
- sphinx-build --version
script:
- python3 waf configure -vv
# check documentation build
- python3 waf build_docs
- python3 waf clean_docs
- python3 waf distclean
- python3 waf configure --include-tests
# gcc [
- python3 waf build_gcc
- sudo python3 waf install_gcc
- pushd build/gcc/tests
- lua -e"_U=true" all.lua
- lua all.lua
- popd
- sudo python3 waf uninstall_gcc
- python3 waf clean_gcc
# gcc ]
# clang [
- python3 waf build_clang
- sudo python3 waf install_clang
- pushd build/clang/tests
- lua -e"_U=true" all.lua
- lua all.lua
- popd
- sudo python3 waf uninstall_clang
- python3 waf clean_clang
# clang ]
- python3 waf distclean
# including ltests
- python3 waf configure --ltests --include-tests
# gcc [
- python3 waf build_gcc
- sudo python3 waf install_gcc
- pushd build/gcc/tests
- lua -e"_U=true" all.lua
- lua all.lua
- popd
- sudo python3 waf uninstall_gcc
- python3 waf clean_gcc
# gcc ]
# clang [
- python3 waf build_clang
- sudo python3 waf install_clang
- pushd build/clang/tests
- lua -e"_U=true" all.lua
- lua all.lua
- popd
- sudo python3 waf uninstall_clang
- python3 waf clean_clang
# clang ]
- python3 waf distclean
# test script
- python3 scripts/run_test.py -c gcc -c clang --simple-test
- python3 scripts/run_test.py -c gcc -c clang
- python3 scripts/run_test.py -c gcc -c clang --simple-test --ltests
- python3 scripts/run_test.py -c gcc -c clang --ltests