TAU nightly testing #785
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
# Unfortunately, there is a lot of duplicated code that could be simplified/eliminated with YAML anchors and aliases, | |
# but GitHub Actions does not yet support YAML anchors and aliases. | |
# Clever use of global environment variables could help eliminate some of it, but the best options would be to just use | |
# aliases and anchors | |
name: TAU nightly testing | |
on: | |
schedule: | |
- cron: '18 10 * * *' # 10:18 UTC daily, 3:18 Pacific | |
env: | |
__TAUCMDR_PROGRESS_BARS__: "disabled" | |
__TAUCMDR_SYSTEM_PREFIX__: "system" | |
CI: "ON" | |
INSTALLDIR: "taucmdr" | |
PIP_NO_CLEAN: "ON" | |
PIP_PREFER_BINARY: "ON" | |
TZ: "UTC" | |
jobs: | |
Install-taucmdr-minimal: | |
name: Install and Test TAU Commander | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-18.04] #, ubuntu-20.04 | |
python_version: ['3.7'] | |
env: | |
OS: ${{ matrix.os }} | |
PY_VER: ${{ matrix.python_version }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 9999 | |
- name: Install system packages | |
run: | | |
# Ensure that we have default system compilers and MPI for testing | |
sudo apt-get update -qq || true | |
sudo apt-get install -y --no-install-recommends gcc g++ gfortran mpi-default-bin mpi-default-dev | |
- name: System info | |
id: info | |
run: | | |
# Get info for debugging and set some environment variables to use later | |
uname -a | |
mount | |
df -h | |
gcc --version | |
echo "github.event_name: ${{ github.event_name }}" | |
echo "github.ref: ${{ github.ref }}" | |
echo "matrix.os: ${{ matrix.os }}" | |
echo "Pythons found:" | |
type -a python | |
while read -r line ; do "${line##* is }" --version; done <<< $(type -a python) | |
export INSTALLDIR="${HOME}/${INSTALLDIR}" | |
echo "::set-output name=install_dir::${INSTALLDIR}" | |
echo "INSTALLDIR=${INSTALLDIR}" >> "${GITHUB_ENV}" | |
echo "::set-output name=home_dir::${HOME}" | |
echo "::set-output name=taucmdr_system::${INSTALLDIR}/${__TAUCMDR_SYSTEM_PREFIX__}" | |
echo "__TAUCMDR_SYSTEM_PREFIX__=${INSTALLDIR}/${__TAUCMDR_SYSTEM_PREFIX__}" >> "${GITHUB_ENV}" | |
echo "::set-output name=branch::${GITHUB_REF#refs/*/}" | |
echo "BRANCH=${GITHUB_REF#refs/*/}" >> "${GITHUB_ENV}" | |
echo "BRANCH: ${GITHUB_REF#refs/*/}" | |
# No caching available for cron jobs | |
- name: Install TAU Commander | |
run: | | |
make INSTALLDIR="${INSTALLDIR}" install | |
echo "${INSTALLDIR}/conda/bin" >> $GITHUB_PATH | |
export PATH="${INSTALLDIR}/conda/bin:${PATH}" | |
which python | |
which pip | |
python -m pip install -U pip | |
python -m pip install -U --prefix "${INSTALLDIR}/conda" -r requirements-dev.txt | |
cd "${HOME}" | |
zip -vr taucmdr-nightly.zip ${INSTALLDIR##*/} -x "taucmdr/system/src/*" -x "taucmdr/conda/*" | |
type -a python | |
while read -r line ; do "${line##* is }" --version; done <<< $(type -a python) | |
- name: Upload TAU Commander install log | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: taucmdr-tau-minimal-debug-log-${{ matrix.os }} | |
path: ${{ steps.info.outputs.home_dir }}/.local/taucmdr/debug_log | |
- name: Upload TAU Commander minimal install | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: taucmdr-installation-${{ matrix.os }} | |
path: ${{ steps.info.outputs.home_dir }}/taucmdr-nightly.zip | |
- name: Install Full TAU | |
run: | | |
rm ~/.local/taucmdr/debug_log || true | |
TAU=full ${{ steps.info.outputs.taucmdr_system }}/configure | |
- name: Upload TAU Commander full-TAU install log | |
if: always() | |
uses: actions/upload-artifact@v1 | |
with: | |
name: taucmdr-full-tau-debug-log-${{ matrix.os }} | |
path: ${{ steps.info.outputs.home_dir }}/.local/taucmdr/debug_log | |
- name: Test TAU Commander with TinyDB backend | |
run: | | |
rm ~/.local/taucmdr/debug_log || true | |
export __TAUCMDR_DB_BACKEND__=tinydb | |
rm -f ./coverage.xml || true | |
coverage run setup.py test | |
coverage xml | |
- name: Test TAU Commander with SQLite backend | |
run: | | |
export __TAUCMDR_DB_BACKEND__=sqlite | |
coverage run setup.py test | |
coverage xml | |
- name: Build sphinx docs | |
run: python setup.py build_sphinx | |
- name: Upload TAU Commander unit test log | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: taucmdr-unit-test-debug-log-${{ matrix.os }} | |
path: ${{ steps.info.outputs.home_dir }}/.local/taucmdr/debug_log | |
- name: tau_validate-nightly | |
if: always() | |
run: | | |
cd ${{ steps.info.outputs.taucmdr_system }}/tau/tau-2* | |
printf '#!/bin/bash\nmpirun -np 2 ./simple\n' > parallel.sh | |
export TAU_VALIDATE_PARALLEL="$(pwd)/parallel.sh" | |
./tau_validate -v --html --table table.html --timeout 180 x86_64 &> results.html || true | |
mkdir "${HOME}/tau-tests-validate" | |
cp table.html results.html "${HOME}/tau-tests-validate" | |
- name: Upload nightly TAU validate | |
if: always() | |
uses: actions/upload-artifact@v2 | |
with: | |
name: taucmdr-full-tau-validate-${{ matrix.os }}-${{ github.sha }} | |
path: ${{ steps.info.outputs.home_dir }}/tau-tests-validate |