Skip to content

Commit

Permalink
ci: run actions only on code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mspronesti committed Aug 5, 2024
1 parent 1a996d6 commit b3ec7d3
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/ci-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,26 @@ name: CI kernels
on: [push, pull_request]

jobs:
diff:
runs-on: ubuntu-latest
outputs:
sycl_changed: ${{ steps.filter.outputs.sycl_changed }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
sycl_changed:
- 'dev/sycl/**'
gpu:
needs: diff
runs-on: devcloud # self-hosted GPU runner on Intel devcloud
name: Run all kernels (GPU)
if: needs.diff.outputs.sycl_changed == 'true'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Build kernels (GPU)
run: |
Expand All @@ -20,10 +35,12 @@ jobs:
make run_all CC=icx
cpu:
needs: diff
runs-on: ubuntu-latest
name: Run all kernels (CPU)
if: needs.diff.outputs.sycl_changed == 'true'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install OneAPI
uses: rscohn2/setup-oneapi@v0
with:
Expand Down Expand Up @@ -51,4 +68,4 @@ jobs:
- name: Run kernels (CPU)
run: |
cd dev/sycl
make run_all CC=icx
make run_all CC=icx
16 changes: 16 additions & 0 deletions .github/workflows/ci-train-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,25 @@ name: GPU Train and Test
on: [push, pull_request]

jobs:
diff:
runs-on: ubuntu-latest
outputs:
train_test_changed: ${{ steps.filter.outputs.train_test_changed }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
train_test_changed:
- 'train_*'
- 'test_*'
train-and-test-gpu:
needs: diff
runs-on: devcloud # self-hosted GPU runner on Intel devcloud

if: needs.diff.outputs.train_test_changed == 'true'
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down

0 comments on commit b3ec7d3

Please sign in to comment.