Skip to content

Commit 9c3c8e9

Browse files
committed
Add ci test
Change SoCMake commit hash fix CI fix test add __init__.py Move test_generator to test_generator_data test Fix not included test_generator_data files fix try fix fix fix again
1 parent 87b9f3b commit 9c3c8e9

File tree

11 files changed

+48
-2
lines changed

11 files changed

+48
-2
lines changed

.github/workflows/test.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: PeakRDL-halcpp test
2+
3+
on:
4+
push:
5+
branches:
6+
- "*"
7+
jobs:
8+
build-and-test:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
compiler: [ {cpp: g++, c: gcc}, {cpp: clang++, c: clang} ]
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Install dependencies
19+
run: |
20+
sudo apt-get remove --purge man-db -y
21+
sudo apt-get update
22+
sudo apt-get install -y \
23+
build-essential \
24+
cmake \
25+
make \
26+
clang \
27+
lld \
28+
gcc g++ \
29+
tree \
30+
python3 python3-pip
31+
pip install .
32+
33+
- name: Configure CMake
34+
run: |
35+
cmake -S tests -B build \
36+
-DCMAKE_C_COMPILER=${{ matrix.compiler.c }} \
37+
-DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp }}
38+
39+
- name: Build
40+
run: cmake --build build
41+
42+
- name: Run tests
43+
working-directory: build
44+
run: ctest --output-on-failure

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
recursive-include src/peakrdl_halcpp/templates *.j2
22
recursive-include src/peakrdl_halcpp/include *.h
3+
recursive-include src/peakrdl_halcpp/test_generator_data/test_utils *.h
4+
recursive-include src/peakrdl_halcpp/test_generator_data/test_utils *.txt

src/peakrdl_halcpp/test_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def process_template(self,
139139

140140
def copy_test_directory(self, outdir: str):
141141
curr_dir: Path = Path(__file__).resolve().parent
142-
src: Path = curr_dir / "test_generator"
142+
src: Path = curr_dir / "test_generator_data"
143143
dst = Path(outdir)
144144

145145
shutil.copytree(src, dst, dirs_exist_ok=True)

src/peakrdl_halcpp/test_generator_data/__init__.py

Whitespace-only changes.

src/peakrdl_halcpp/test_generator_data/test_utils/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)