mirror of
git://git.yoctoproject.org/meta-raspberrypi.git
synced 2025-07-05 05:04:45 +02:00
ci: Don't run yocto builds on PRs that don't affect them
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
This commit is contained in:
parent
05cafd056a
commit
70191d3c87
24
.github/workflows/yocto-builds.yml
vendored
24
.github/workflows/yocto-builds.yml
vendored
|
@ -2,6 +2,8 @@
|
|||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
---
|
||||
|
||||
name: Builds
|
||||
|
||||
on:
|
||||
|
@ -30,18 +32,35 @@ jobs:
|
|||
runs-on: [self-hosted, Linux]
|
||||
name: ${{ matrix.machine }}/${{ matrix.image }}/poky/systemd
|
||||
env:
|
||||
DL_DIR: /var/lib/ci/yocto/downloads
|
||||
SSTATE_DIR: /var/lib/ci/yocto/sstate
|
||||
DL_DIR: /var/lib/ci/yocto/downloads
|
||||
SSTATE_DIR: /var/lib/ci/yocto/sstate
|
||||
steps:
|
||||
- name: Checkout the code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Define Yocto build files
|
||||
id: changed-files-specific
|
||||
uses: tj-actions/changed-files@v24
|
||||
with:
|
||||
files: |
|
||||
.github/actions/**
|
||||
.github/workflows/docker-images/yocto-builder/**
|
||||
.github/workflows/docker-images/*.sh
|
||||
.github/workflows/yocto-builds.yml
|
||||
classes/**'
|
||||
conf/**
|
||||
dynamic-layers/**
|
||||
files/**
|
||||
lib/**
|
||||
recipes-**
|
||||
wic/**
|
||||
- name: Build a temporary yocto-builder image
|
||||
uses: ./.github/actions/docker-build
|
||||
with:
|
||||
docker_image: yocto-builder
|
||||
id: ${{ github.event.number }}
|
||||
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
||||
- name: Build the image
|
||||
run: |
|
||||
docker run --rm \
|
||||
|
@ -56,6 +75,7 @@ jobs:
|
|||
--env "SSTATE_DIR=$SSTATE_DIR" \
|
||||
"yocto-builder-${{ github.event.number }}" \
|
||||
/entrypoint-build.sh
|
||||
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
||||
- name: Cleanup temporary docker image
|
||||
uses: ./.github/actions/docker-clean-image
|
||||
with:
|
||||
|
|
66
.github/workflows/yocto-layer.yml
vendored
66
.github/workflows/yocto-layer.yml
vendored
|
@ -2,6 +2,8 @@
|
|||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
---
|
||||
|
||||
name: Yocto Compatible
|
||||
|
||||
on:
|
||||
|
@ -12,26 +14,44 @@ jobs:
|
|||
name: Validate with yocto-check-layer
|
||||
runs-on: [self-hosted, Linux]
|
||||
steps:
|
||||
- name: Checkout the code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Build a temporary yocto-builder image
|
||||
uses: ./.github/actions/docker-build
|
||||
with:
|
||||
docker_image: yocto-builder
|
||||
id: ${{ github.event.number }}
|
||||
- name: Run yocto-check-layer
|
||||
run: |
|
||||
docker run --rm -v "$GITHUB_WORKSPACE:/work:ro" \
|
||||
--env "BASE_REF=$GITHUB_BASE_REF" \
|
||||
"yocto-builder-${{ github.event.number }}" \
|
||||
/entrypoint-yocto-check-layer.sh
|
||||
- name: Cleanup temporary docker image
|
||||
uses: ./.github/actions/docker-clean-image
|
||||
with:
|
||||
docker_image: yocto-builder-${{ github.event.number }}
|
||||
if: always()
|
||||
- name: Cleanup dangling docker images
|
||||
uses: ./.github/actions/docker-clean-dangling
|
||||
if: always()
|
||||
- name: Checkout the code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Define Yocto build files
|
||||
id: changed-files-specific
|
||||
uses: tj-actions/changed-files@v24
|
||||
with:
|
||||
files: |
|
||||
.github/actions/**
|
||||
.github/workflows/docker-images/yocto-builder/**
|
||||
.github/workflows/docker-images/*.sh
|
||||
.github/workflows/yocto-builds.yml
|
||||
classes/**'
|
||||
conf/**
|
||||
dynamic-layers/**
|
||||
files/**
|
||||
lib/**
|
||||
recipes-**
|
||||
wic/**
|
||||
- name: Build a temporary yocto-builder image
|
||||
uses: ./.github/actions/docker-build
|
||||
with:
|
||||
docker_image: yocto-builder
|
||||
id: ${{ github.event.number }}
|
||||
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
||||
- name: Run yocto-check-layer
|
||||
run: |
|
||||
docker run --rm -v "$GITHUB_WORKSPACE:/work:ro" \
|
||||
--env "BASE_REF=$GITHUB_BASE_REF" \
|
||||
"yocto-builder-${{ github.event.number }}" \
|
||||
/entrypoint-yocto-check-layer.sh
|
||||
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
||||
- name: Cleanup temporary docker image
|
||||
uses: ./.github/actions/docker-clean-image
|
||||
with:
|
||||
docker_image: yocto-builder-${{ github.event.number }}
|
||||
if: always()
|
||||
- name: Cleanup dangling docker images
|
||||
uses: ./.github/actions/docker-clean-dangling
|
||||
if: always()
|
||||
|
|
Loading…
Reference in New Issue
Block a user