Skip to content

Commit

Permalink
Merge pull request f4pga#1806 from antmicro/move-to-gh-actions
Browse files Browse the repository at this point in the history
ci: move from travis to GH actions
  • Loading branch information
acomodi committed Nov 26, 2020
2 parents 8c499dc + 8e45658 commit 2029763
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 167 deletions.
13 changes: 0 additions & 13 deletions .github/travis/after_failure.sh

This file was deleted.

13 changes: 0 additions & 13 deletions .github/travis/after_success.sh

This file was deleted.

19 changes: 0 additions & 19 deletions .github/travis/before_cache.sh

This file was deleted.

31 changes: 0 additions & 31 deletions .github/travis/compare-files.sh

This file was deleted.

27 changes: 0 additions & 27 deletions .github/travis/git-fixup.sh

This file was deleted.

7 changes: 0 additions & 7 deletions .github/travis/install.sh

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CI tests

on: [push, pull_request]

jobs:

Run-tests:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v2

- name: Run common script
run: source ./.github/workflows/scripts/common.sh

- name: Install
run: |
sudo apt-get update
sudo apt-get install git g++-6 colordiff coreutils graphviz inkscape make cmake
- name: Execute test script
run: stdbuf -i0 -o0 -e0 ./.github/workflows/scripts/script.sh
32 changes: 16 additions & 16 deletions .github/travis/common.sh → .github/workflows/scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,30 @@ NC='\033[0m' # No Color

SPACER="echo -e ${GRAY} - ${NC}"

if ! declare -F travis_nanoseconds &>/dev/null; then
function travis_nanoseconds() {
if ! declare -F action_nanoseconds &>/dev/null; then
function action_nanoseconds() {
return 0;
}
fi
export -f travis_nanoseconds
if ! declare -F travis_fold &>/dev/null; then
function travis_fold() {
export -f action_nanoseconds
if ! declare -F action_fold &>/dev/null; then
function action_fold() {
return 0;
}
fi
export -f travis_fold
if ! declare -F travis_time_start &>/dev/null; then
function travis_time_start() {
export -f action_fold
if ! declare -F action_time_start &>/dev/null; then
function action_time_start() {
return 0;
}
fi
export -f travis_time_start
if ! declare -F travis_time_finish &>/dev/null; then
function travis_time_finish() {
export -f action_time_start
if ! declare -F action_time_finish &>/dev/null; then
function action_time_finish() {
return 0;
}
fi
export -f travis_time_finish
export -f action_time_finish
if [ -z "$DATESTR" ]; then
if [ -z "$DATESHORT" ]; then
export DATESTR=$(date -u +%Y%m%d%H%M%S)
Expand Down Expand Up @@ -84,16 +84,16 @@ function run_section() {
}

function start_section() {
travis_fold start "$1"
travis_time_start
action_fold start "$1"
action_time_start
echo -e "${PURPLE}SymbiFlow Arch Defs${NC}: - $2${NC}"
echo -e "${GRAY}-------------------------------------------------------------------${NC}"
}

function end_section() {
echo -e "${GRAY}-------------------------------------------------------------------${NC}"
travis_time_finish
travis_fold end "$1"
action_time_finish
action_fold end "$1"
}

export PATH=$PWD/env/conda/bin:$PATH
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

source .github/travis/common.sh
source .github/workflows/scripts/common.sh
set -e

$SPACER
Expand Down Expand Up @@ -40,7 +40,7 @@ make_target all_merged_arch_xmls "Build all arch XMLs"

$SPACER

echo "Suppressing all_rrgraph_xmls generation, as the 8k parts cannot be built on travis."
echo "Suppressing all_rrgraph_xmls generation, as the 8k parts cannot be built on GH actions."
start_section "symbiflow.build_all_rrgraph_xmls" "Build all rrgraph XMLs."
#make all_rrgraph_xmls
end_section "symbiflow.build_all_rrgraph_xmls"
Expand All @@ -51,7 +51,7 @@ make_target all_route_tests "Complete all routing tests"

$SPACER

echo "Suppressing some xml linting, as the 5k/8k parts cannot be built on travis."
echo "Suppressing some xml linting, as the 5k/8k parts cannot be built on GH actions."
make_target all_xml_lint "Complete all xmllint"

$SPACER
Expand All @@ -63,7 +63,7 @@ $SPACER

$SPACER

echo "Suppressing some demo bitstreams, as the 8k parts cannot be built on travis."
echo "Suppressing some demo bitstreams, as the 8k parts cannot be built on GH actions."
make_target all "Building all demo bitstreams"

$SPACER
37 changes: 0 additions & 37 deletions .travis.yml

This file was deleted.

0 comments on commit 2029763

Please sign in to comment.