Skip to content

Commit

Permalink
Merge pull request #341 from PRUNERS/issue312-replace-travisci-with-g…
Browse files Browse the repository at this point in the history
…ithub-actions

Replace travis-ci with github actions

Fixes issue #341
  • Loading branch information
mikebentley15 authored Nov 11, 2021
2 parents 73020e8 + 3d50f9b commit b701c8f
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 150 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/automated-tests.yml
Original file line number Diff line number Diff line change
@@ -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
133 changes: 0 additions & 133 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
33 changes: 18 additions & 15 deletions tests/color_out.mk
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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)

0 comments on commit b701c8f

Please sign in to comment.