diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d5c776e0091792f8929842c6dc73d218c333252f..b5fb549d97e88e9e66ae71f60a452c23b05c7d76 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,6 +2,7 @@ image: eicweb.phy.anl.gov:4567/containers/eic_container/jug_dev:testing
 
 stages:
   - build
+  - test
   - container
   - deploy
 
@@ -25,10 +26,24 @@ compile:
   artifacts:
     when: always
     paths:
+      - install/
       - build/test_result_*.xml
     reports:
       junit: build/test_result_*.xml
 
+test_npsim:
+  extends: .eicweb
+  needs: ["compile"]
+  stage: test
+  script:
+    - mkdir -p test_files/
+    - LD_LIBRARY_PATH=install/lib:$LD_LIBRARY_PATH install/bin/npsim --compactFile examples/gem_tracker_disc.xml --enableGun --numberOfEvents 10 --outputFile test_files/test_npsim.root
+    - rootls -t test_files/test_npsim.root
+  artifacts:
+    expire_in: 3 days
+    paths: 
+      - test_files/
+
 docker_image:
   image: eicweb.phy.anl.gov:4567/containers/image_recipes/ubuntu_dind:latest
   stage: container
diff --git a/bin/do_build b/bin/do_build
index 882b7ebfea32013431ceb04d40179f9776f22743..a744dece804f037062444049dbcb6e743b332d1c 100755
--- a/bin/do_build
+++ b/bin/do_build
@@ -1,6 +1,5 @@
 #!/bin/bash
-mkdir build 
-cd build
-cmake -DCMAKE_CXX_STANDARD=17 .. 
-make -j30
-make test
+cmake -Bbuild -S. -DCMAKE_CXX_STANDARD=17 -DCMAKE_INSTALL_PREFIX=install
+cmake --build build -j30
+cmake --build build --target test
+cmake --install build