diff --git a/.github/workflows/Automerge.yml b/.github/workflows/Automerge.yml new file mode 100644 index 000000000..cdb61b14b --- /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 1bf940384..b38fa03d6 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 2364ad662..000000000 --- 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 diff --git a/README.md b/README.md index 9b479d6f1..5d44fc1ec 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.