From b8797646b7dda659793ce5747bce053fcb96c822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kl=C3=B6tzke?= Date: Thu, 17 Jun 2021 19:32:43 +0200 Subject: [PATCH] Move to GitHub actions Travis-CI shut off their .org service and the migration was not working. Move to something else... --- .github/workflows/workflow.yaml | 49 ++++++++++++++++++++++++++++++ .travis.yml | 54 --------------------------------- README.md | 2 +- 3 files changed, 50 insertions(+), 55 deletions(-) create mode 100644 .github/workflows/workflow.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml new file mode 100644 index 000000000..ca3a27248 --- /dev/null +++ b/.github/workflows/workflow.yaml @@ -0,0 +1,49 @@ +name: CI/CD + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.6, 3.7, 3.8, 3.9] + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install PyYAML codecov schema python-magic pyparsing sphinx wheel + sudo apt-get update + sudo apt-get install cvs + + - name: Run unit tests + run: | + git config --global init.defaultBranch master # keep the old name + eatmydata ./test/run-tests.sh + + - name: Build Python package + run: | + python3 setup.py sdist bdist_wheel --plat-name manylinux1_x86_64 + + - name: Upload coverage to Codecov + # Coverage is not complete on Python <3.7 (see pym/bob/utils.py) + if: matrix.python-version != '3.6' + uses: codecov/codecov-action@v1 + + - name: Publish package + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} + skip_existing: true + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 04f4e5bb3..000000000 --- a/.travis.yml +++ /dev/null @@ -1,54 +0,0 @@ -language: python -python: - - "3.6" - - "3.7" - - "3.8" - - "3.9" - -# Define build environment and install additonally required packages. -dist: xenial -addons: - apt: - sources: - - sourceline: "deb [arch=amd64] https://packages.microsoft.com/ubuntu/16.04/prod xenial main" - key_url: "https://packages.microsoft.com/keys/microsoft.asc" - packages: - - cvs - - parallel - - eatmydata - - powershell - -# Shallow clones break the build because the right Bob version cannot be -# inferred due to missing tags. -git: - depth: false - -install: - - pip install PyYAML - - pip install codecov - - pip install schema - - pip install python-magic - - pip install pyparsing - - pip install sphinx - -script: - - eatmydata ./test/run-tests.sh - - python3 setup.py bdist_wheel --plat-name manylinux1_x86_64 - -after_success: - - codecov - -deploy: - provider: pypi - user: "__token__" - password: - secure: "br+Sl2c86C/T2E0fhCx3XP4OSa8oVsKWiahvpBmAhSr6LReOj4mCbTVYn8NKRyj2tMwCnhxPuiL2ejinTcxSUownmPZfKRvpQtMrzeTO3HFtVMvJtkFLu4Div2CT7mvenj8LxU4Lo2JKj4j3Bb7PARxXgPorTf3oqiTk2nxHH2v4Jn4IaukIKAAPB40fS8vj1IMrBWF0YLDH8YrPMMqI59sUKoV6/aPRAsTsgwhYXd1OIlLyg2MdpE2Jq41ZEkWeQgNBSumvCPCRT73oTb0NkyCPJ5ZpeQVr5rs2K8gECVHWO1GwAGZYqhUGSvgQUbRNBDQgA0v/o0py5NjzJQZY6q0SXSvpLjcfzI1DOp7P9yovvCmPmdgfrQRjPvh7aVeaczwnMK3yLNQ3JvSrWjx+Dd5SOsLzq2jcZ9KXt70trlK5oTeeQH35ChEb84sdB95DOS8SRcEQPGj8ROmUHeD3KdDbs3HZKLueCmTRnslnmUB2eOX+ri4ZMLm9rHbj5Lhcu4XxM2z1Y/kOZB4AKwaaWwUmUCqtxn+rA6zQzxA+QSsMGNfbd1pB+YL0g9QvefH619KVIxmlW9Go3oU5MXdCc9DT4XuTxMDdRQ7WDYdzGMfP9cRPgrIjxP+wwf+0TaEw7e3s/zo3T4ihBrYjW4GH/VKEaDTizpPxL3v5+/foaZ4=" - on: - tags: true - skip_existing: true - - # Do not add "bdist_wheel" to "distributions" because we have to set - # --plat-name explicitly. Instead we build it ourself in "script" and - # let it ride for free in the "sdist" upload... - skip_cleanup: true - distributions: "sdist" diff --git a/README.md b/README.md index b3549176c..0fa693877 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ for complex embedded projects and thus focuses on reproducible builds while still being nice to developers in agile environments. [![Documentation Status](http://readthedocs.org/projects/bob-build-tool/badge/?version=latest)](http://bob-build-tool.readthedocs.io/en/latest/?badge=latest) -[![Build Status](https://travis-ci.org/BobBuildTool/bob.svg?branch=master)](https://travis-ci.org/BobBuildTool/bob) +[![Build Status](https://github.com/BobBuildTool/bob/actions/workflows/workflow.yaml/badge.svg)](https://github.com/BobBuildTool/bob/actions/workflows/workflow.yaml) [![codecov.io](https://codecov.io/github/BobBuildTool/bob/coverage.svg?branch=master)](https://codecov.io/github/BobBuildTool/bob?branch=master) Installation