-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attempt to compile and run the C++ code
- Loading branch information
1 parent
83f1a4a
commit 070a76e
Showing
2 changed files
with
49 additions
and
1 deletion.
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,49 @@ | ||
name: "Test code blocks" | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run-tests: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install poetry | ||
poetry install | ||
- name: Test with pytest | ||
run: | | ||
poetry run pytest tests/extract.py | ||
- name: Install C++ deps | ||
run: | | ||
sudo apt install libboost-math-dev | ||
- name: Compile and run C++ files | ||
run: | | ||
g++ -o my_program pdf.cpp -lboost_math | ||
g++ -o my_program logpdf.cpp -lboost_math | ||
g++ -o my_program rvs.cpp -lboost_math | ||
./pdf > pdf.out | ||
./logpdf > logpdf.out | ||
./rvs > rvs.out | ||
cat rvs.out | ||
working-directory: tests/normal/cpp |
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