diff --git a/.github/workflows/automated-tests.yml b/.github/workflows/automated-tests.yml new file mode 100644 index 00000000..9b6d69a7 --- /dev/null +++ b/.github/workflows/automated-tests.yml @@ -0,0 +1,34 @@ +name: Automated Tests + +on: + push: # all pushes, but only to the specified branches + branches: [ devel, master, main ] + pull_request: # all pull requests + workflow_dispatch: # allows manual triggering on web interface + +jobs: + automated-tests: + runs-on: ubuntu-latest + + # matrix docs: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix + strategy: + matrix: + include: + - name: openmpi + packages: libopenmpi-dev openmpi-bin + - name: mpich + packages: libmpich-dev mpich + - name: none + packages: + + steps: + - name: install dependencies + run: > + sudo apt-get update && + sudo apt-get install python3 python3-pip ${{ matrix.packages }} && + pip3 install --user setuptools toml + - uses: actions/checkout@v2 + - name: build tests + run: make -C tests -j ${{ steps.cpu-cores.outputs.count }} + - name: run tests + run: make check diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2d7b222b..00000000 --- a/.travis.yml +++ /dev/null @@ -1,133 +0,0 @@ -# -- LICENSE BEGIN -- -# -# Copyright (c) 2015-2020, Lawrence Livermore National Security, LLC. -# -# Produced at the Lawrence Livermore National Laboratory -# -# Written by -# Michael Bentley (mikebentley15@gmail.com), -# Geof Sawaya (fredricflinstone@gmail.com), -# and Ian Briggs (ian.briggs@utah.edu) -# under the direction of -# Ganesh Gopalakrishnan -# and Dong H. Ahn. -# -# LLNL-CODE-743137 -# -# All rights reserved. -# -# This file is part of FLiT. For details, see -# https://pruners.github.io/flit -# Please also read -# https://github.com/PRUNERS/FLiT/blob/master/LICENSE -# -# Redistribution and use in source and binary forms, with or -# without modification, are permitted provided that the following -# conditions are met: -# -# - Redistributions of source code must retain the above copyright -# notice, this list of conditions and the disclaimer below. -# -# - Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the disclaimer -# (as noted below) in the documentation and/or other materials -# provided with the distribution. -# -# - Neither the name of the LLNS/LLNL nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND -# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, -# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL -# SECURITY, LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -# THE POSSIBILITY OF SUCH DAMAGE. -# -# Additional BSD Notice -# -# 1. This notice is required to be provided under our contract -# with the U.S. Department of Energy (DOE). This work was -# produced at Lawrence Livermore National Laboratory under -# Contract No. DE-AC52-07NA27344 with the DOE. -# -# 2. Neither the United States Government nor Lawrence Livermore -# National Security, LLC nor any of their employees, makes any -# warranty, express or implied, or assumes any liability or -# responsibility for the accuracy, completeness, or usefulness of -# any information, apparatus, product, or process disclosed, or -# represents that its use would not infringe privately-owned -# rights. -# -# 3. Also, reference herein to any specific commercial products, -# process, or services by trade name, trademark, manufacturer or -# otherwise does not necessarily constitute or imply its -# endorsement, recommendation, or favoring by the United States -# Government or Lawrence Livermore National Security, LLC. The -# views and opinions of authors expressed herein do not -# necessarily state or reflect those of the United States -# Government or Lawrence Livermore National Security, LLC, and -# shall not be used for advertising or product endorsement -# purposes. -# -# -- LICENSE END -- - -language: cpp -os: linux -#dist: bionic -addons: - apt: - packages: &native_deps - - python3 - - python3-pip - - bash-completion - -matrix: - include: - # Job 1: OpenMPI - - env: - - mpi_type=openmpi - addons: - apt: - packages: - - *native_deps - - libopenmpi-dev - - openmpi-bin - # Job 2: MPICH - - env: - - mpi_type=mpich - addons: - apt: - packages: - - *native_deps - - libmpich-dev - - mpich - # Job 3: No MPI - - env: - - mpi_type=none - addons: - apt: - packages: - - *native_deps - -before_install: - - pip3 install --user setuptools - - pip3 install --user toml - -script: dpkg --list | grep binutil && make -j4 && make -j4 -C tests && make check - -#notifications: -# email: false -# slack: -# rooms: -# - pruners:aXHVdiVFtqtMfzNW4IutZNDW -# on_success: always -# on_failure: always diff --git a/README.md b/README.md index a8d0fc4c..1ee0217b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ | branch | status | |---------|---------| -| master | [![Build Status](https://travis-ci.org/PRUNERS/FLiT.svg?branch=master)](https://travis-ci.org/PRUNERS/FLiT) | -| devel | [![Build Status](https://travis-ci.org/PRUNERS/FLiT.svg?branch=devel)](https://travis-ci.org/PRUNERS/FLiT) | +| master | ![Build Status](https://github.com/PRUNERS/FLiT/actions/workflows/automated-tests.yml/badge.svg?branch=master) | +| devel | ![Build Status](https://github.com/PRUNERS/FLiT/actions/workflows/automated-tests.yml/badge.svg) | ![PyPI - License](https://img.shields.io/pypi/l/Django.svg) ![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg) diff --git a/tests/color_out.mk b/tests/color_out.mk index e1955fe7..1aebe461 100644 --- a/tests/color_out.mk +++ b/tests/color_out.mk @@ -1,6 +1,9 @@ ECHO := printf "%s" ECHO_NEWLINE := printf "%s\n" -NCOLORS := $(shell tput colors) + +# Call TPUT in the shell for one argument ($1) +TPUT = $(shell tput $1 2>/dev/null) +NCOLORS := $(call TPUT,colors) # A Makefile function # @param 1: color (e.g., BLUE or GREEN) @@ -21,21 +24,21 @@ print_impl = \ $1 "$3"; \ fi -BASH_CLEAR := $(shell tput sgr0) -BASH_BOLD := $(shell tput bold) -BASH_BLACK := $(shell tput setaf 0) -BASH_RED := $(shell tput setaf 1) -BASH_GREEN := $(shell tput setaf 2) -BASH_YELLOW := $(shell tput setaf 3) -BASH_BLUE := $(shell tput setaf 4) -BASH_PURPLE := $(shell tput setaf 5) -BASH_CYAN := $(shell tput setaf 6) -BASH_WHITE := $(shell tput setaf 7) -BASH_BROWN := $(shell tput setaf 94) -BASH_GRAY := $(shell tput setaf 245) +BASH_CLEAR := $(call TPUT,sgr0) +BASH_BOLD := $(call TPUT,bold) +BASH_BLACK := $(call TPUT,setaf 0) +BASH_RED := $(call TPUT,setaf 1) +BASH_GREEN := $(call TPUT,setaf 2) +BASH_YELLOW := $(call TPUT,setaf 3) +BASH_BLUE := $(call TPUT,setaf 4) +BASH_PURPLE := $(call TPUT,setaf 5) +BASH_CYAN := $(call TPUT,setaf 6) +BASH_WHITE := $(call TPUT,setaf 7) +BASH_BROWN := $(call TPUT,setaf 94) +BASH_GRAY := $(call TPUT,setaf 245) BASH_GREY := $(BASH_GRAY) -BASH_DARKGRAY := $(shell tput setaf 240) +BASH_DARKGRAY := $(call TPUT,setaf 240) BASH_DARKGREY := $(BASH_DARKGRAY) -BASH_LIGHTGRAY:= $(shell tput setaf 250) +BASH_LIGHTGRAY:= $(call TPUT,setaf 250) BASH_LIGHTGREY:= $(BASH_LIGHTGRAY)