From e5fb6a7b03d55fa601722224b05bfcccb427ffa5 Mon Sep 17 00:00:00 2001 From: Thomas Helfer Date: Wed, 7 Aug 2024 14:12:22 +0200 Subject: [PATCH] first test --- .github/workflows/cmake.yml | 60 +++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/cmake.yml diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml new file mode 100644 index 0000000..c7f22d4 --- /dev/null +++ b/.github/workflows/cmake.yml @@ -0,0 +1,60 @@ +name: Cmake + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Spack + uses: spack/setup-spack@v2 + with: + ref: develop # Spack version (examples: develop, releases/v0.21) + buildcache: true # Configure oci://ghcr.io/spack/github-actions-buildcache + color: true # Force color output (SPACK_COLOR=always) + path: ${{github.workspace}}/spack # Where to clone Spack + + - name: Install TFEL dependencies + run: | + sudo apt-get install cmake libboost-all-dev + sudo apt-get install g++ gfortran python3-numpy + sudo apt-get install octave default-jdk + + - name: Install TFEL + shell: spack-sh {0} + run: | + spack install tfel@master + + - name: Config MFrontGallery + shell: spack-sh {0} + run: | + spack load tfel + cmake -B ${{github.workspace}}/build \ + -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc \ + -DCMAKE_CXX_COMPILER=g++ \ + -Denable-c=ON -Denable-c++=ON -Denable-excel=ON \ + -Denable-fortran=ON -Denable-python=ON -Denable-java=ON \ + -Denable-octave=ON -Denable-generic=ON -Denable-castem=ON \ + -Denable-castem-behaviours=ON -Denable-aster=ON \ + -Denable-cyrano=ON -Denable-ansys=ON \ + -Denable-europlexus=ON -Denable-calculix=ON \ + -Denable-abaqus=ON -Denable-diana-fea=ON \ + -Denable-zmat=OFF -Denable-fortran-behaviours-wrappers=ON \ + -Denable-mfront-documentation-generation=OFF + + - name: Build MFrontGallery [coverage] + run: cmake --build ${{github.workspace}}/build --config Release + + - name: Run tests + shell: spack-sh {0} + working-directory: ${{github.workspace}}/coverage + run: | + spack load tfel + make check