Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a standalone SimpleNet example build to the CI #304

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions .github/workflows/test_suite_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,16 @@ jobs:
run: |
. ftorch/bin/activate
VN=$(python -c "import sys; print('.'.join(sys.version.split('.')[:2]))")
export Torch_DIR=${VIRTUAL_ENV}/lib/python${VN}/site-packages
export BUILD_DIR=$(pwd)/build
export Torch_DIR="${VIRTUAL_ENV}/lib/python${VN}/site-packages"
export BUILD_DIR="$(pwd)/build"
# NOTE: The pFUnit version (pinned during installation above) is used in the install path.
export PFUNIT_DIR=$(pwd)/pFUnit/build/installed/PFUNIT-4.10
mkdir ${BUILD_DIR}
cd ${BUILD_DIR}
export PFUNIT_DIR="$(pwd)/pFUnit/build/installed/PFUNIT-4.10"
mkdir "${BUILD_DIR}"
cd "${BUILD_DIR}"
cmake .. \
-DPython_EXECUTABLE="$(which python)" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=${BUILD_DIR} \
-DCMAKE_INSTALL_PREFIX="${BUILD_DIR}" \
-DCMAKE_BUILD_TESTS=TRUE \
-DCMAKE_PREFIX_PATH="${PFUNIT_DIR};${Torch_DIR}" \
-DCMAKE_Fortran_FLAGS="-std=${{ matrix.std }}"
Expand All @@ -108,3 +108,20 @@ jobs:
run: |
. ftorch/bin/activate
./run_test_suite.sh --verbose --integration-only

- name: Standalone SimpleNet example
run: |
. ftorch/bin/activate
export FTORCH_BUILD_DIR="$(pwd)/build"
cd examples/1_SimpleNet
export BUILD_DIR="$(pwd)/build"
mkdir "${BUILD_DIR}"
cd "${BUILD_DIR}"
cmake .. \
-DPython_EXECUTABLE="$(which python)" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="${FTORCH_BUILD_DIR}" \
-DCMAKE_BUILD_TESTS=TRUE \
-DCMAKE_Fortran_FLAGS="-std=${{ matrix.std }}"
cmake --build .
ctest -V
Loading