try pipeline again #17
This file contains hidden or 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
| name: Build and Run Unit Tests | |
| on: | |
| push: | |
| branches: [ "main", "dane_dev" ] | |
| pull_request: | |
| branches: [ "main", "dane_dev" ] | |
| jobs: | |
| testMPI: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| compiler: [GCC, ICC, CLANG] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set-up Spack | |
| uses: spack/setup-spack@v2 | |
| with: | |
| ref: develop | |
| buildcache: true | |
| color: true | |
| path: spack | |
| - name: Install Compilers and MPI Wrappers | |
| run: | | |
| . ./spack/share/spack/setup-env.sh | |
| if [[ "${{ matrix.compiler }}" == "GCC" ]]; then | |
| spack install -j 4 openmpi | |
| elif [[ "${{ matrix.compiler }}" == "ICC" ]]; then | |
| spack install -j 4 intel-oneapi-compilers | |
| spack install -j 4 intel-oneapi-mpi | |
| elif [[ "${{ matrix.compiler }}" == "CLANG" ]]; then | |
| spack install -j 4 llvm | |
| spack install -j 4 openmpi | |
| fi | |
| - name: Configure and Make SparseBench | |
| run: | | |
| . ./spack/share/spack/setup-env.sh | |
| if [[ "${{ matrix.compiler }}" == "GCC" ]]; then | |
| eval "$(spack load --sh openmpi)" | |
| elif [[ "${{ matrix.compiler }}" == "ICC" ]]; then | |
| eval "$(spack load --sh intel-oneapi-compilers)" | |
| eval "$(spack load --sh intel-oneapi-mpi)" | |
| elif [[ "${{ matrix.compiler }}" == "CLANG" ]]; then | |
| eval "$(spack load --sh llvm)" | |
| eval "$(spack load --sh openmpi)" | |
| fi | |
| TOOLCHAIN="${{ matrix.compiler }}" | |
| sed -E -i \ | |
| -e 's/^(ENABLE_MPI[[:space:]]*\?=[[:space:]]*).*/\1true/' \ | |
| -e 's/^(ENABLE_OPENMP[[:space:]]*\?=[[:space:]]*).*/\1false/' \ | |
| -e 's/^(MTX_FMT[[:space:]]*\?=[[:space:]]*).*/\1SCS/' \ | |
| -e "s/^(TOOLCHAIN[[:space:]]*\?=[[:space:]]*).*/\1${TOOLCHAIN}/" \ | |
| config.mk | |
| make | |
| - name: Make and Run Tests | |
| run: | | |
| . ./spack/share/spack/setup-env.sh | |
| if [[ "${{ matrix.compiler }}" == "GCC" ]]; then | |
| eval "$(spack load --sh openmpi)" | |
| elif [[ "${{ matrix.compiler }}" == "ICC" ]]; then | |
| eval "$(spack load --sh intel-oneapi-compilers)" | |
| eval "$(spack load --sh intel-oneapi-mpi)" | |
| elif [[ "${{ matrix.compiler }}" == "CLANG" ]]; then | |
| eval "$(spack load --sh llvm)" | |
| eval "$(spack load --sh openmpi)" | |
| fi | |
| cd tests | |
| make | |
| ./runTests | |
| # - name: Run Tests | |
| # run: | | |
| # ./runTests | |
| # - name: Upload Executables | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: sparseBench-SCS-${{ matrix.compiler }} | |
| # path: | | |
| # ./sparseBench-SCS-${{ matrix.compiler }} | |
| # runTests: | |
| # runs-on: ubuntu-latest | |
| # needs: build | |
| # strategy: | |
| # matrix: | |
| # compiler: [GCC, ICC, CLANG] | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # - name: Download Executables | |
| # uses: actions/download-artifact@v4 | |
| # with: | |
| # name: sparseBench-SCS-${{ matrix.compiler }} | |
| # path: ./executables | |
| # - name: Set up Spack | |
| # uses: spack/setup-spack@v2 | |
| # with: | |
| # ref: develop | |
| # buildcache: true | |
| # color: true | |
| # path: spack | |
| # - name: Load Compiler and MPI | |
| # run: | | |
| # . ./spack/share/spack/setup-env.sh | |
| # if [[ "${{ matrix.compiler }}" == "GCC" ]]; then | |
| # eval "$(spack load --sh openmpi)" | |
| # elif [[ "${{ matrix.compiler }}" == "ICC" ]]; then | |
| # eval "$(spack load --sh intel-oneapi-compilers)" | |
| # eval "$(spack load --sh intel-oneapi-mpi)" | |
| # elif [[ "${{ matrix.compiler }}" == "CLANG" ]]; then | |
| # eval "$(spack load --sh llvm)" | |
| # eval "$(spack load --sh openmpi)" | |
| # fi | |
| # - name: Make Tests | |
| # run: | | |
| # cd tests | |
| # make | |
| # - name: Run Tests | |
| # run: | | |
| # ./runTests |