Skip to content

Commit 51b7b6e

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
1 parent 87b9f3b commit 51b7b6e

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: [g, clang]
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Install dependencies
19+
run: |
20+
sudo apt-get update
21+
sudo apt-get install -y \
22+
build-essential \
23+
cmake \
24+
make \
25+
clang \
26+
lld \
27+
gcc g++ \
28+
tree \
29+
python3 python3-pip
30+
pip install .
31+
32+
- name: Configure CMake
33+
run: |
34+
tree /home/runner/.local/lib/python3.12/site-packages/peakrdl_halcpp/
35+
cmake -S tests -B build \
36+
-DCMAKE_C_COMPILER=${{ matrix.compiler }} \
37+
-DCMAKE_CXX_COMPILER=${{ matrix.compiler }}++
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/test_utils/CMakeLists.txt renamed to src/peakrdl_halcpp/test_generator_data/test_utils/CMakeLists.txt

File renamed without changes.

src/peakrdl_halcpp/test_generator_data/test_utils/__init__.py

Whitespace-only changes.

src/peakrdl_halcpp/test_generator/test_utils/field_test_utils.h renamed to src/peakrdl_halcpp/test_generator_data/test_utils/field_test_utils.h

File renamed without changes.

src/peakrdl_halcpp/test_generator/test_utils/mock_io.h renamed to src/peakrdl_halcpp/test_generator_data/test_utils/mock_io.h

File renamed without changes.

src/peakrdl_halcpp/test_generator/test_utils/reg_test_utils.h renamed to src/peakrdl_halcpp/test_generator_data/test_utils/reg_test_utils.h

File renamed without changes.

src/peakrdl_halcpp/test_generator/test_utils/test_utils.h renamed to src/peakrdl_halcpp/test_generator_data/test_utils/test_utils.h

File renamed without changes.

0 commit comments

Comments
 (0)