-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Github action to run tests on commit and PR (#5)
Add github action for running tests on each PR and commit to main
- Loading branch information
1 parent
8161660
commit ca2d16b
Showing
3 changed files
with
146 additions
and
15 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,72 @@ | ||
name: Compile and Run | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [main] | ||
push: | ||
branches: [main] | ||
|
||
permissions: | ||
actions: read | ||
security-events: write | ||
|
||
jobs: | ||
CI_test_run: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python 3.10 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install system packages | ||
run: | | ||
sudo add-apt-repository ppa:deadsnakes/ppa | ||
sudo apt-get install libpython3.9 libtinfo5 | ||
- name: Activate vcpkg | ||
uses: ARM-software/cmsis-actions/vcpkg@v1 | ||
|
||
- name: Activate Arm tool license | ||
uses: ARM-software/cmsis-actions/armlm@v1 | ||
|
||
- name: Prepare framework | ||
run: | | ||
cd Testing/board | ||
echo "Install missing python packages" | ||
pip install -r requirements.txt | ||
echo "Generate reference patterns" | ||
python runall.py --gen --norun --nobuild | ||
echo "Load missing pack" | ||
csolution list packs -s cmsiscv.csolution.yml -m > required_packs.txt | ||
cat required_packs.txt | ||
cpackget add -a -f required_packs.txt | ||
- name: Execute | ||
run: | | ||
cd Testing/board | ||
echo "Running tests" | ||
python runall.py -avh $AVH_FVP_PLUGINS/../bin | ||
- name: Upload test report | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: test-report | ||
path: Testing/board/summary.html | ||
|
||
|
||
- name: Check error | ||
run: | | ||
cd Testing/board | ||
echo "Checking output..." | ||
test "$(grep "Error" summary.html | wc -l)" -eq 0 |
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,19 @@ | ||
{ | ||
"registries": [ | ||
{ | ||
"name": "arm", | ||
"kind": "artifact", | ||
"location": "https://artifacts.tools.arm.com/vcpkg-registry" | ||
} | ||
], | ||
"requires": { | ||
"arm:tools/open-cmsis-pack/cmsis-toolbox": "2.4.0", | ||
"arm:tools/kitware/cmake": "3.28.4", | ||
"arm:tools/ninja-build/ninja": "1.12.0", | ||
"arm:compilers/arm/armclang": "6.22.0", | ||
"arm:compilers/arm/arm-none-eabi-gcc": "^13.2.1", | ||
"arm:models/arm/avh-fvp": "^11.22.39", | ||
"arm:debuggers/arm/armdbg": "6.1.2" | ||
} | ||
} | ||
|