ci: add Automerge; combine workflows

Signed-off-by: Unai Martinez-Corral <umartinezcorral@antmicro.com>
This commit is contained in:
Unai Martinez-Corral 2022-04-07 21:04:27 +02:00
parent 0d46012279
commit 7f0da7c394
3 changed files with 71 additions and 52 deletions

29
.github/workflows/Automerge.yml vendored Normal file
View File

@ -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

View File

@ -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

View File

@ -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