Skip to content

Commit 23872be

Browse files
committed
Start adding integration tests
1 parent c0e45ed commit 23872be

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

.github/workflows/pipeline.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
jobs:
1414
lint_testing:
1515
name: Lint and test code
16-
runs-on: Windows-latest
16+
runs-on: Windows-2025
1717
strategy:
1818
matrix:
1919
py_ver: [
@@ -39,11 +39,23 @@ jobs:
3939
run: |
4040
uv run ruff check ./pymhf ./tests
4141
uv run ruff format --check ./pymhf ./tests
42+
- name: Install compiler
43+
id: install_gpp
44+
uses: rlalik/setup-cpp-compiler@master
45+
with:
46+
compiler: g++-14.2.0
47+
- name: Build test binaries
48+
run: g++ ./tests/cpp/app.cpp -Wall -o ./tests/app.exe
49+
- name: Upload exe
50+
uses: actions/upload-artifact@v4
51+
with:
52+
name: test_app
53+
path: ./tests/app.exe
4254
- name: Run unit tests
4355
run: uv run pytest ./tests
4456
build:
4557
name: Build wheel and docs
46-
runs-on: Windows-latest
58+
runs-on: Windows-2025
4759
needs:
4860
- lint_testing
4961
steps:

tests/cpp/app.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#include <iostream>
2+
#include <cstdint>
3+
4+
using namespace std;
5+
6+
extern "C" __declspec( dllexport ) int64_t multiply(long a, int64_t b) {
7+
return a * b;
8+
}
9+
10+
int main() {
11+
int64_t a;
12+
int64_t b;
13+
cout << "Enter a number: ";
14+
cin >> a;
15+
cout << "Enter another number: ";
16+
cin >> b;
17+
cout << "The product is " << multiply(a, b) << endl;
18+
return 0;
19+
}

0 commit comments

Comments
 (0)