-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding a worfklow for each component and the counter analysis toolkit.
- Loading branch information
Treece Burgess
committed
Nov 14, 2024
1 parent
f4a8b19
commit 8f7fd17
Showing
21 changed files
with
538 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
As of now, the GitHub CI is designed to run in three instances: | ||
1. A per component basis, meaning if a component's codebase is updated then we only will run CI tests for that component. As an example, if we update `cupti_profiler.c` in `src/components/cuda` then we will only run CI tests for that component. | ||
2. A change in the PAPI framework i.e. in the `src/` directory. If this occurs then we will run a full test suite. | ||
3. A weekly test which builds PAPI with multiple components. This is currently programmed to run weekly on Sundays at 5:00PM eastern time. This is being done to simulate users' behavior of compiling in multiple components for a PAPI build. | ||
|
||
|
||
# Per Component Basis | ||
All per component basis tests have a `.yml` that is structured with `componentName_component.yml`. As | ||
an example for the `cuda` component we would have a `.yml` of `cuda_component.yml`. Therefore, | ||
if a new component is added to PAPI, you will need to create a `.yml` based on the aforementioned structure. | ||
|
||
Along with creating the `.yml` file, you will need to add an associated workflow. Below is a skeleton that can | ||
be used as a starting point. As a reminder, make sure to change the necessary fields out for your component. | ||
|
||
``` | ||
name: cuda # replace cuda with your component name | ||
on: | ||
pull_request: | ||
paths: | ||
- 'src/components/cuda/**' # replace the cuda path with your component | ||
jobs: | ||
component_tests: | ||
strategy: | ||
matrix: | ||
component: [cuda] # replace cuda with your component name | ||
debug: [yes, no] | ||
shlib: [with, without] | ||
fail-fast: false | ||
runs-on: [self-hosted, nvidia_gpu] | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: cuda component tests # replace cuda with your component name | ||
run: .github/workflows/ci_per_component.sh ${{matrix.component}} ${{matrix.debug}} ${{matrix.shlib}} | ||
```` | ||
# PAPI Framework | ||
# Weekly Test | ||
For the weekly test, we utilize the files `weekly_papi_build.yml` and the script `ci_weekly_papi_build.sh`. Any changes for the weekly test need to be done to these two files. | ||
As a reminder this weekly test is ran on Sunday's at 5:00PM eastern time. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: appio | ||
|
||
on: | ||
pull_request: | ||
# run CI only if appio directory or appio sub-directories receive updates | ||
# run CI if framework receives an update | ||
paths: | ||
- 'src/components/appio/**' | ||
- 'src/*' | ||
|
||
jobs: | ||
component_tests: | ||
strategy: | ||
matrix: | ||
component: [appio] | ||
debug: [yes, no] | ||
shlib: [with, without] | ||
fail-fast: false | ||
runs-on: [self-hosted, cpu_intel] | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: appio component tests | ||
run: .github/workflows/ci_per_component.sh ${{matrix.component}} ${{matrix.debug}} ${{matrix.shlib}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: counter analysis toolkit | ||
|
||
on: | ||
pull_request: | ||
# run CI for updates to counter analysis toolkit | ||
paths: | ||
- 'src/counter_analysis_toolkit/**' | ||
jobs: | ||
component_tests: | ||
strategy: | ||
matrix: | ||
debug: [yes, no] | ||
shlib: [with, without] | ||
fail-fast: false | ||
runs-on: [self-hosted, cpu_intel] | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: counter analysis toolkit tests | ||
run: .github/workflows/ci_cat.sh ${{matrix.debug}} ${{matrix.shlib}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/bash -e | ||
|
||
DEBUG=$1 | ||
SHLIB=$2 | ||
COMPILER=$3 | ||
|
||
[ -z "$COMPILER" ] && COMPILER=gcc@11 | ||
|
||
source /etc/profile | ||
set +x | ||
set -e | ||
trap 'echo "# $BASH_COMMAND"' DEBUG | ||
shopt -s expand_aliases | ||
|
||
module load $COMPILER | ||
|
||
# configuring and install PAPI | ||
if [ "$SHLIB" = "with" ]; then | ||
./configure --prefix=$PWD/cat-ci --with-debug=$DEBUG --enable-warnings --with-shlib-tools | ||
else | ||
./configure --prefix=$PWD/cat-ci --with-debug=$DEBUG --enable-warnings | ||
fi | ||
make -j4 && make install | ||
|
||
# set PAPI_DIR for CAT | ||
export PAPI_DIR=$PWD/cat-ci | ||
|
||
cd counter_analysis_toolkit | ||
|
||
# check detected architecture was correct | ||
DETECTED_ARCH=$(make | head -n 1 | grep -o 'ARCH.*') | ||
if [ "$DETECTED_ARCH" != "ARCH=X86" ]; then | ||
echo "Failed to detect appropriate architecture." | ||
exit 1 | ||
fi | ||
|
||
make -j4 | ||
|
||
rm -rf OUT_DIR; mkdir OUT_DIR | ||
echo "BR_INST_RETIRED 0" > event_list.txt | ||
./cat_collect -in event_list.txt -out OUT_DIR -branch | ||
|
||
# check cat ran successfully | ||
FILENAME=$(cd OUT_DIR && ls) | ||
if [ "$FILENAME" != "BR_INST_RETIRED.branch" ]; then | ||
echo "Expected output file is not matched." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: coretemp | ||
|
||
on: | ||
pull_request: | ||
# run CI only if coretemp directory or coretemp sub-directories receive updates | ||
# run CI if framework receives an update | ||
paths: | ||
- 'src/components/coretemp/**' | ||
- 'src/*' | ||
|
||
jobs: | ||
component_tests: | ||
strategy: | ||
matrix: | ||
component: [coretemp] | ||
debug: [yes, no] | ||
shlib: [with, without] | ||
fail-fast: false | ||
runs-on: [self-hosted, cpu_intel] | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: coretemp component tests | ||
run: .github/workflows/ci_per_component.sh ${{matrix.component}} ${{matrix.debug}} ${{matrix.shlib}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: cuda | ||
|
||
on: | ||
pull_request: | ||
# run CI only if cuda directory or cuda sub-directories receive updates | ||
# run CI if framework receives an update | ||
paths: | ||
- 'src/components/cuda/**' | ||
- 'src/*' | ||
|
||
jobs: | ||
component_tests: | ||
strategy: | ||
matrix: | ||
component: [cuda] | ||
debug: [yes, no] | ||
shlib: [with, without] | ||
fail-fast: false | ||
runs-on: [self-hosted, gpu_nvidia] | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: cuda component tests | ||
run: .github/workflows/ci_per_component.sh ${{matrix.component}} ${{matrix.debug}} ${{matrix.shlib}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: example | ||
|
||
on: | ||
pull_request: | ||
# run CI only if example directory or example sub-directories receive updates | ||
# run CI if framework receives an update | ||
paths: | ||
- 'src/components/example/**' | ||
- 'src/*' | ||
|
||
jobs: | ||
component_tests: | ||
strategy: | ||
matrix: | ||
component: [example] | ||
debug: [yes, no] | ||
shlib: [with, without] | ||
fail-fast: false | ||
runs-on: [self-hosted, cpu_intel] | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: example component tests | ||
run: .github/workflows/ci_per_component.sh ${{matrix.component}} ${{matrix.debug}} ${{matrix.shlib}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: intel_gpu | ||
|
||
on: | ||
pull_request: | ||
# run CI only if intel_gpu directory or intel_gpu sub-directories receive updates | ||
# run CI if framework receives an update | ||
paths: | ||
- 'src/components/intel_gpu/**' | ||
- 'src/*' | ||
|
||
jobs: | ||
component_tests: | ||
strategy: | ||
matrix: | ||
component: [intel_gpu] | ||
debug: [yes, no] | ||
shlib: [with, without] | ||
fail-fast: false | ||
runs-on: [self-hosted, gpu_intel] | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: intel_gpu component tests | ||
run: .github/workflows/ci_per_component.sh ${{matrix.component}} ${{matrix.debug}} ${{matrix.shlib}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: io | ||
|
||
on: | ||
pull_request: | ||
# run CI only if io directory or io sub-directories receive updates | ||
# run CI if framework receives an update | ||
paths: | ||
- 'src/components/io/**' | ||
- 'src/*' | ||
|
||
jobs: | ||
component_tests: | ||
strategy: | ||
matrix: | ||
component: [io] | ||
debug: [yes, no] | ||
shlib: [with, without] | ||
fail-fast: false | ||
runs-on: [self-hosted, cpu_intel] | ||
timeout-minutes: 60 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: io component tests | ||
run: .github/workflows/ci_per_component.sh ${{matrix.component}} ${{matrix.debug}} ${{matrix.shlib}} |
Oops, something went wrong.