Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow to test building changed recipes #121

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build Changed Recipes

on:
push:
paths:
- "**.lwr"
pull_request:
paths:
- "**.lwr"

jobs:
build:
runs-on: ubuntu-latest
container:
image: igorfreire/pybombs-dev:gnuradio310-ubuntu-jammy
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up local recipe repository
env:
HOME: /root/
run: |
git config --global --add safe.directory $PWD
pybombs recipes list-repos
pybombs recipes remove gr-etcetera
pybombs recipes add local .
pybombs recipes update
- name: Build new/updated recipes (PR)
env:
HOME: /root/
if: ${{ github.event_name == 'pull_request' }}
run: |
git --no-pager diff --name-only ${{ github.head_ref }} $(git merge-base ${{ github.head_ref }} ${{ github.base_ref }}) | \
grep .lwr | cut -d'.' -f 1 | \
xargs pybombs install
- name: Build new/updated recipes (push)
env:
HOME: /root/
if: ${{ github.event_name != 'pull_request' }}
run: |
git --no-pager diff --name-only ${{ github.ref_name }} $(git merge-base ${{ github.ref_name }} origin/master)
git --no-pager diff --name-only ${{ github.ref_name }} $(git merge-base ${{ github.ref_name }} origin/master) | \
grep .lwr | cut -d'.' -f 1 | \
xargs pybombs install