svalinn / Cubit-plugin

Plugins and command extensions for Coreform Cubit
BSD 3-Clause "New" or "Revised" License
17 stars 14 forks source link

Test installation in CI #111

Open gonuke opened 3 years ago

gonuke commented 3 years ago

I wonder if it is possible to test the installation process in CI by installing the plugin on a fresh cubit install and running something in batch mode?

shimwell commented 3 years ago

Perhaps testing via the Cubit python API could also work :snake:

I can make a test that combines few stp files to production a h5m file using the Cubit Python API and pytest if that helps

shimwell commented 3 years ago

I'm thinking something like this can be added to the yml files

    steps:
      - name: install cubit
        shell: bash -l {0}
        run: |
          apt-get install -y curl
          dpkg -i ${CUBIT_PKG}

          tar -xzvf svalinn-plugin_${{ matrix.os }}-${{ matrix.os_version }}_cubit_${{ matrix.cubit }}.tgz -C /opt/${CUBIT_BASE_NAME}

      - name: test cubit use with python
          pip install pytest
          # py script accesses CUBIT_BASE_NAME and imports Cubit into the system python
          # then imprints, merges and facetets two stp files and outputs a h5m file
          pytest tests/test_stp_file_conversion_to_h5m.py
bam241 commented 3 years ago

do you need a cubit license to run this ?

shimwell commented 3 years ago

I think we fall into the non commercial use for students, hobbyists, researchers as mentioned described on the cubit-learn product page https://coreform.com/products/coreform-cubit/free-meshing-software/

Perhaps good to double check with Coreform

@GregVernon are we ok to make use of Cubit learn in the CI testing of the DAGMC plugin for Cubit learn?

GregVernon commented 3 years ago

@Shimwell - you're okay to use Coreform Cubit Learn as you've described. Thanks for checking!

shimwell commented 3 years ago

Just tinkering around with a docker file that downloads Cubit from where it is hosted (backblaze) and installing the plugin within a few environments. I noticed the download takes 15mins from here.

While this is not much time it will be the longest stage in the building of our docker images. We currently have 6 Docker based builds. So we would be downloading this 6 * 15 mins with the simplest setup.

We might benefit from a single download and volume mounting to the docker files which would be a more efficient but trickier CI script to create.

shimwell commented 3 years ago

Just stumbled along a not batch compatible aspect of importing Cubit via python and raised it on the Cubit forum https://forum.coreform.com/t/automatically-accepting-the-license-agreement-y-n/1208

shimwell commented 3 years ago

Thanks @GregVernon for

Just stumbled along a not batch compatible aspect of importing Cubit via python and raised it on the Cubit forum https://forum.coreform.com/t/automatically-accepting-the-license-agreement-y-n/1208

This has now be solved by Greg on the forum.