From 7f0da7c394b360d4a6b9ff6b61359329b6d0836d Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Thu, 7 Apr 2022 21:04:27 +0200 Subject: [PATCH 1/2] ci: add Automerge; combine workflows Signed-off-by: Unai Martinez-Corral --- .github/workflows/Automerge.yml | 29 +++++++++++ .../workflows/{database.yml => Pipeline.yml} | 48 ++++++++++++++++--- .github/workflows/tests.yml | 46 ------------------ 3 files changed, 71 insertions(+), 52 deletions(-) create mode 100644 .github/workflows/Automerge.yml rename .github/workflows/{database.yml => Pipeline.yml} (59%) delete mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/Automerge.yml b/.github/workflows/Automerge.yml new file mode 100644 index 00000000..cdb61b14 --- /dev/null +++ b/.github/workflows/Automerge.yml @@ -0,0 +1,29 @@ +name: Automerge + +on: + pull_request: + push: + schedule: + - cron: '0 0 * * *' + workflow_dispatch: + +jobs: + + + Pipeline: + if: ${{ !(github.event_name != 'pull_request' && github.actor == 'dependabot[bot]') }} + uses: ./.github/workflows/Pipeline.yml + + + Automerge: + needs: Pipeline + if: github.event_name == 'pull_request' && github.actor == 'dependabot[bot]' + runs-on: ubuntu-latest + name: Automerge dependabot PRs + permissions: + contents: write + + steps: + + - name: Auto-merge Dependabot PR + run: GITHUB_TOKEN='${{ github.token }}' gh pr merge '${{ github.event.pull_request.html_url }}' --squash diff --git a/.github/workflows/database.yml b/.github/workflows/Pipeline.yml similarity index 59% rename from .github/workflows/database.yml rename to .github/workflows/Pipeline.yml index 1bf94038..b38fa03d 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/Pipeline.yml @@ -1,12 +1,11 @@ -on: - pull_request: - push: - schedule: - - cron: '0 0 * * *' +name: Pipeline -name: Database +on: + workflow_call: jobs: + + BuildDatabase: container: ubuntu:bionic @@ -60,3 +59,40 @@ jobs: **/fuzzers/*.tgz **/database/${{ matrix.family }}/**" + + Tests: + container: ubuntu:bionic + + runs-on: [self-hosted, Linux, X64] + + env: + ALLOW_ROOT: true + + steps: + + - uses: actions/checkout@v2 + with: + submodules: recursive + + - name: Install + run: | + apt update + apt install -y \ + bash bison build-essential ca-certificates clang-format cmake psmisc \ + colordiff coreutils git flex python3 python3-dev python3-venv xsltproc + + - name: Build + run: make build --output-sync=target --warn-undefined-variables -j$(nproc) + + - name: Environment + run: make env --output-sync=target --warn-undefined-variables + + - name: Run Test + run: make test --output-sync=target --warn-undefined-variables + + - uses: actions/upload-artifact@v2 + if: ${{ always() }} + with: + path: | + **/results*.gz + **/plot_*.svg diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 2364ad66..00000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,46 +0,0 @@ -on: - pull_request: - push: - schedule: - - cron: '0 0 * * *' - -name: Tests - -jobs: - - Tests: - container: ubuntu:bionic - - runs-on: [self-hosted, Linux, X64] - - env: - ALLOW_ROOT: true - - steps: - - - uses: actions/checkout@v2 - with: - submodules: recursive - - - name: Install - run: | - apt update - apt install -y \ - bash bison build-essential ca-certificates clang-format cmake psmisc \ - colordiff coreutils git flex python3 python3-dev python3-venv xsltproc - - - name: Build - run: make build --output-sync=target --warn-undefined-variables -j$(nproc) - - - name: Environment - run: make env --output-sync=target --warn-undefined-variables - - - name: Run Test - run: make test --output-sync=target --warn-undefined-variables - - - uses: actions/upload-artifact@v2 - if: ${{ always() }} - with: - path: | - **/results*.gz - **/plot_*.svg From ce92a9c72b31db1e8e98a4ec41f7987ba1bc7df7 Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Thu, 7 Apr 2022 21:11:29 +0200 Subject: [PATCH 2/2] readme: update shields Signed-off-by: Unai Martinez-Corral --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9b479d6f..5d44fc1e 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,8 @@ # Project X-Ray -[![Documentation Status](https://readthedocs.org/projects/pyxray/badge/?version=latest)](http://prjxray.readthedocs.org/) -[![License](https://img.shields.io/github/license/f4pga/prjxray.svg)](https://github.com/f4pga/prjxray/blob/master/LICENSE) - -![Tests](https://github.com/f4pga/prjxray/actions/workflows/tests.yml/badge.svg) -![Database Generation](https://github.com/f4pga/prjxray/actions/workflows/database.yml/badge.svg) +[![Documentation Status](https://img.shields.io/readthedocs/prjxray?longCache=true&style=flat-square&logo=ReadTheDocs&logoColor=fff)](http://prjxray.readthedocs.org/) +[![License](https://img.shields.io/github/license/f4pga/prjxray.svg?longCache=true&style=flat-square&label=License)](https://github.com/f4pga/prjxray/blob/master/LICENSE) +![GitHub Actions](https://img.shields.io/github/workflow/status/f4pga/prjxray/Automerge/master?longCache=true&style=flat-square&label=GHA&logo=Github%20Actions&logoColor=fff) Documenting the Xilinx 7-series bit-stream format.