From 1b99ab533a809d5545c87e8738a5b5d1a8ff151d Mon Sep 17 00:00:00 2001 From: LraiZer Date: Mon, 3 Jul 2023 17:37:02 +0100 Subject: [PATCH] add CI workflow using Github Actions remove Travis CI as it's no longer free for open source. --- .github/workflows/autobouquetsmaker.yml | 59 +++++++++++++++++++++++++ .travis.yml | 49 -------------------- README.md | 2 +- 3 files changed, 60 insertions(+), 50 deletions(-) create mode 100644 .github/workflows/autobouquetsmaker.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/autobouquetsmaker.yml b/.github/workflows/autobouquetsmaker.yml new file mode 100644 index 00000000..6eff9a8d --- /dev/null +++ b/.github/workflows/autobouquetsmaker.yml @@ -0,0 +1,59 @@ +name: AutoBouquetsMaker + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + name: Build AutoBouquetsMaker + runs-on: ubuntu-22.04 + strategy: + matrix: + gcc: [12] + python: ['3.11'] + steps: + - name: Install prerequisites + run: | + sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test + sudo apt-get -q update + sudo apt-get install -y g++-${{ matrix.gcc }} automake build-essential gettext python${{ matrix.python }}-dev + + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + + - name: Install python packages + run: | + pip3 install six flake8 + + - name: Build AutoBouquetsMaker, gcc-${{ matrix.gcc }}, python ${{ matrix.python }} + env: + CC: "gcc-${{ matrix.gcc }}" + CXX: "g++-${{ matrix.gcc }}" + CXXFLAGS: "-g -Wall" + run: | + autoreconf -i + ./configure + make + python -m compileall -l . + + - name: Check format PEP8 + run: | + echo "Checking locale format..." + find . -type f -name "*.po" -exec msgfmt {} -o {}.mo \; + echo "Checking PEP8 validation..." + flake8 --ignore=W191,E128,E501,E722 . --exit-zero + echo "Check format PEP8 completed!" + +# PEP8 :- IGNORE CODES +# W191 : indentation contains tabs +# E128 : continuation line under-indented for visual indent +# E501 : line too long (> 79 characters) +# E722 : do not use bare 'except' diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index cff2c24f..00000000 --- a/.travis.yml +++ /dev/null @@ -1,49 +0,0 @@ -language: python -dist: bionic -os: linux - -python: - - "2.7" - - "3.8" - -compiler: - - gcc - -cache: - apt: true - -git: - depth: 10 - -branches: - only: - - master - -install: - - pip install flake8 - -addons: - apt: - packages: - - git - - build-essential - - automake - - libtool - - python-dev - - gettext - - swig - -script: - - flake8 --version - - echo compiling AutoBouquetsMaker enigma2 plugin - - python -m compileall . - - find . -type f -name "*.po" -exec msgfmt {} -o {}.mo \; - - flake8 --ignore=W191,E128,E501,E722 . --exit-zero - - echo done. - -# PEP8 :- IGNORE CODES -# W191 : indentation contains tabs -# E128 : continuation line under-indented for visual indent -# E501 : line too long (> 79 characters) -# E722 : do not use bare 'except' - diff --git a/README.md b/README.md index 29ec250f..504b94e0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -AutoBouquetsMaker [![Build Status](https://travis-ci.org/oe-alliance/AutoBouquetsMaker.svg?branch=master)](https://travis-ci.org/oe-alliance/AutoBouquetsMaker) +AutoBouquetsMaker [![Build Status](https://github.com/oe-alliance/AutoBouquetsMaker/actions/workflows/autobouquetsmaker.yml/badge.svg)](https://github.com/oe-alliance/AutoBouquetsMaker/actions/workflows/autobouquetsmaker.yml) ================ Automatically build and update bouquets from the DVB stream.