Skip to content

Commit 49205b1

Browse files
Add new workflow and test
1 parent 2dd5c9a commit 49205b1

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.github/workflows/diffpackages.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Check Packages Against Spack
2+
on:
3+
push:
4+
paths:
5+
- repo/**/package.py
6+
7+
jobs:
8+
diffPackages:
9+
runs-on: ubuntu-22.04
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
13+
14+
- name: Add needed Python libs
15+
run: |
16+
pip install -r ./requirements.txt
17+
18+
# Step 4: Get the list of modified files
19+
- name: Get modified files
20+
id: get_modified_files
21+
run: |
22+
echo "MODIFIED_FILES=$(git diff --name-only HEAD^ HEAD | grep '^repo/')" >> $GITHUB_ENV
23+
24+
# Step 5: Run the diffPackages.py script with modified files
25+
- name: Run diffPackages.py
26+
if: env.MODIFIED_FILES != ''
27+
run: |
28+
MODIFIED_FILES=($MODIFIED_FILES)
29+
./bin/benchpark-python lib/scripts/diffPackages.py --packages ${MODIFIED_FILES[@]}

repo/raja-perf/package.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,3 +360,7 @@ def initconfig_package_entries(self):
360360
def cmake_args(self):
361361
options = [f"-DMPI_CXX_LINK_FLAGS='{self.spec['mpi'].libs.ld_flags}'"]
362362
return options
363+
364+
365+
def _test_func():
366+
pass

0 commit comments

Comments
 (0)