From b510f0ea03bc88cbf375ce13c29e97941b561a72 Mon Sep 17 00:00:00 2001 From: eine Date: Sun, 26 Jul 2020 07:16:48 +0200 Subject: ci: deprecate Travis in favour of GitHub Actions --- .github/workflows/doc.yml | 48 ----------------------- .github/workflows/push.yml | 90 ++++++++++++++++++++++++++++++++++++++++--- .travis.yml | 63 ------------------------------ README.md | 17 +++----- appveyor.yml | 16 -------- scripts/macosx/install-ada.sh | 1 - scripts/man.sh | 15 -------- 7 files changed, 89 insertions(+), 161 deletions(-) delete mode 100644 .github/workflows/doc.yml delete mode 100644 .travis.yml delete mode 100755 scripts/man.sh diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml deleted file mode 100644 index 3e6ef9104..000000000 --- a/.github/workflows/doc.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: 'doc' - -on: - push: - -jobs: - linux: - runs-on: ubuntu-latest - name: '📓 Docs' - steps: - - - name: '🧰 Checkout' - uses: actions/checkout@v2 - - - name: Build ghdl/doc - run: | - docker build -t ghdl/doc - <<-EOF - FROM ghdl/vunit:llvm - ENV PYTHONPATH=/src/pyGHDL - RUN apt update -qq && apt install -y gnat-gps graphviz \ - && ln -s /usr/bin/pip3 /usr/bin/pip - EOF - - - name: Run gnatdoc - run: | - cat > run.sh <<-EOF - #!/usr/bin/env sh - ./configure - make - gnatdoc -P./ghdl - mkdir public - mv gnatdoc public - EOF - chmod +x run.sh - docker run --rm -v $(pwd):/src -w /src ghdl/doc ./run.sh - - - name: '📓 BuildTheDocs (BTD)' - uses: buildthedocs/btd@v0 - with: - token: ${{ github.token }} - - - name: '📤 Upload artifact: HTML and LaTeX' - uses: actions/upload-artifact@v2 - with: - name: doc - path: | - doc/_build/html - doc/_build/latex diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 53193dfd5..ec2d10431 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -3,6 +3,7 @@ name: 'push' on: push: pull_request: + workflow_dispatch: env: CI: true @@ -10,6 +11,64 @@ env: jobs: +# +# Doc +# + + doc: + runs-on: ubuntu-latest + name: '📓 Docs' + steps: + + - name: '🧰 Checkout' + uses: actions/checkout@v2 + + - name: Build ghdl/doc + run: | + docker build -t ghdl/doc - <<-EOF + FROM ghdl/vunit:llvm + ENV PYTHONPATH=/src/pyGHDL + RUN apt update -qq && apt install -y gnat-gps graphviz \ + && ln -s /usr/bin/pip3 /usr/bin/pip + EOF + + - name: Run gnatdoc + run: | + cat > run.sh <<-EOF + #!/usr/bin/env sh + ./configure + make + gnatdoc -P./ghdl + mkdir public + mv gnatdoc public + EOF + chmod +x run.sh + docker run --rm -v $(pwd):/src -w /src ghdl/doc ./run.sh + + - name: '📓 BuildTheDocs (BTD)' + if: github.event_name != 'pull_request' + uses: buildthedocs/btd@v0 + with: + token: ${{ github.token }} + + #- run: nroff -man doc/_build/man/ghdl.1 + + - name: '📤 Upload artifact: HTML and LaTeX' + if: github.event_name != 'pull_request' + uses: actions/upload-artifact@v2 + with: + name: doc + path: | + doc/_build/html + doc/_build/latex + doc/_build/man + + - name: '📤 Upload artifact: ghdl.1' + if: github.event_name != 'pull_request' + uses: actions/upload-artifact@v2 + with: + path: doc/_build/man/ghdl.1 + # # pyGHDL # @@ -109,10 +168,16 @@ jobs: run: | PATH=$PWD/gnat/bin:$PATH ./scripts/ci-run.sh -c + mv ghdl-*.tgz ghdl-osx-mcode.tgz env: TASK: macosx+mcode GITHUB_OS: ${{ runner.os }} + - name: '📤 Upload artifact: package' + uses: actions/upload-artifact@v2 + with: + path: ghdl-osx-mcode.tgz + # # Windows Build # @@ -231,24 +296,37 @@ jobs: run: GHDL=ghdl ./testsuite/testsuite.sh ${{ matrix.suite }} # -# NIGHTLY +# Release # - nightly: - if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' - needs: [ lin, win-test ] + Release: + if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || contains(github.ref, 'refs/tags/')) + needs: [ doc, lin, osx, win-test ] runs-on: ubuntu-latest - name: '📦 Nightly' + name: '📦 Release' steps: - name: '📥 Download artifacts' + if: "!contains(github.ref, 'refs/tags/')" uses: actions/download-artifact@v2 + # Do not upload assets to tagged releases + - name: Set list of files for uploading + id: files + run: | + case '${{ github.ref }}' in + 'refs/tags/'*) _list='none' ;; + *) _list='artifact/*' ;; + esac + echo "::set-output name=list::${_list}" + + # Tagged: create a pre-release or a release (semver) + # Untagged: update the assets of pre-release 'nightly' - uses: eine/tip@master with: token: ${{ secrets.GITHUB_TOKEN }} tag: 'nightly' - files: artifact/* + files: ${{ steps.files.outputs.list }} - run: | curl -X POST https://api.github.com/repos/ghdl/docker/dispatches \ diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8ab8fbaf3..000000000 --- a/.travis.yml +++ /dev/null @@ -1,63 +0,0 @@ -branches: - except: - - nightly - -os: linux -dist: xenial -services: docker -language: minimal -install: skip -script: ./scripts/ci-run.sh -c $TARGS - -# For each linux build, a different job/instance (with the constraints -# above) is executed in parallel in stage 'test'. -env: - matrix: - - TASK=buster+mcode - - TASK=buster+mcode - TARGS="--gpl --no-synth" - - TASK=ubuntu20+mcode - - TASK=ubuntu20+llvm-10 - - TASK=fedora33+mcode - - TASK=fedora33+llvm - -deploy: - - &dep - provider: releases - skip_cleanup: true - api_key: - secure: ji6LXOmD5V2N+ELHZr4oJsmxPhedk+8W6jfCqQdEbewQ42N+fKOq3lgqJni7ZdfpZaulB9OHPTApv3bwOjXjtN9rfBGmq//U9CwvzHmUeomdQv6WQOVevaWSXl3DNL9fk3yKynyFrsv4pvr45L8GIjaHLggKcYhNFPJ2rrnJlDoFT9MqQNpmP7Bg/LnwVQiv+ZDPkLlMWQzrXzLamdQILARPQka+kCdXl/sHH6OKvLgRvu9yvyXYSSfbyAHP+THISS5gDciizSBeWGlU75kgj/N+mkV+8NvtTTfEIgG8y49WJz6aBooTmRzk/jZW1dKMbDR6c5bpTmRvMZSzeSBuAR6WLhr6HevgCPi/1fX1y3pkVSrgBUF5KcxPgWCZp0I05QjaJOdvQDl1hH4TlVwpT18lM2+cWrui9fS7spnk/AuNKX882C5QWWRy28lIPasCVnwfeKX8a9KAwY9OqVOenoLC1yx7NJOGfH1bjuSYYxyR4XgLiGTHKALAuknCyD9QL0o378IwqxHMcsN0Gsd+GndMu0/b8GvSqfzDpV1XknqabQFwkZLs+Yydw0snfBUzXw9TfOk78IiPYEgXAxsQKBAkK7qvO36HIxLlSQXglXU1D4IDtQYDUel6vKll4pgu0WMxStQCbj51yDVJKvRhzwiBNC6Pwgzt2JTrpwM/T/U= - file: "ghdl-*.tgz" - file_glob: true - on: - repo: ghdl/ghdl - all_branches: true - tags: true - -jobs: - include: - # One additional job is described in stage 'test' for the macos build. - # The constraints above are used, except explicitly overriden. - - &osx - os: osx - language: c - osx_image: xcode10 - env: TASK=macosx+mcode - cache: - directories: - - gnat - install: ./scripts/macosx/install-ada.sh - before_script: PATH=$PWD/gnat/bin:$PATH - addons: - homebrew: - packages: - - p7zip - update: true - # Optionally, more macos jobs can be added. See list of available versions at https://docs.travis-ci.com/user/reference/osx/#macos-version -# - <<: *osx -# osx_image: xcode9.4 - - env: TASK="man" - script: ./scripts/man.sh - deploy: - - <<: *dep - file: "doc/_build/man/ghdl.1" diff --git a/README.md b/README.md index 0223be256..511eedc7f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +

+ +

+

@@ -6,22 +10,11 @@ -

- -

- -

- -

'push' workflow Status - 'doc' workflow Status - - +

This directory contains the sources of GHDL, the open-source analyzer, compiler, simulator and (experimental) synthesizer for [VHDL](https://en.wikipedia.org/wiki/VHDL), a Hardware Description Language ([HDL](https://en.wikipedia.org/wiki/Hardware_description_language)). GHDL is not an interpreter: it allows you to analyse and elaborate sources to generate machine code from your design. Native program execution is the only way for high speed simulation. diff --git a/appveyor.yml b/appveyor.yml index f3ffa1d3b..60662c348 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -52,19 +52,3 @@ build_script: # test scripts to run test_script: - ps: .\scripts\windows\appveyor\test.ps1 - - -# ============================================================================= -# Deployment configuration -# ============================================================================= -deploy: - - provider: GitHub - release: $(APPVEYOR_REPO_TAG_NAME) - description: 'Release' - draft: true - prerelease: false - artifact: /.*\.zip/ - on: - appveyor_repo_tag: true - auth_token: - secure: Qli1B9/I6B1uTMeyGolw8N/zh/PRhLdT8fjUUTcd4Vp14UQki+YTjxKjAe+65Oqv diff --git a/scripts/macosx/install-ada.sh b/scripts/macosx/install-ada.sh index 760be908b..2e2862824 100755 --- a/scripts/macosx/install-ada.sh +++ b/scripts/macosx/install-ada.sh @@ -7,7 +7,6 @@ if [ -e gnat/etc/install_ok ] && [ "x$(cat gnat/etc/install_ok)" = "x2019" ]; th exit 0 fi -echo "Download and install gnat-gpl" set -x # Remove old gnat directory diff --git a/scripts/man.sh b/scripts/man.sh deleted file mode 100755 index 4c5316ddb..000000000 --- a/scripts/man.sh +++ /dev/null @@ -1,15 +0,0 @@ -#! /bin/bash - -cd $(dirname $0)/.. - -rm -rf doc/_build/man/* - -set -e - -docker run --rm -it \ - -v /$(pwd):/src \ - -w //src/doc \ - btdi/sphinx:featured \ - sh -c "sphinx-build -T -b man . ./_build/man" - -nroff -man doc/_build/man/ghdl.1 -- cgit v1.2.3