Qinglei/trmm gpu #335
Workflow file for this run
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: CI Build | |
| # Triggers on push and branches on the master | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| # Allows to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| all: | |
| timeout-minutes: 60 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| build_type : [ Debug, Release ] | |
| shared_type : [ OFF, ON ] | |
| device: [ cpu, gpu_nvidia, gpu_amd ] | |
| exclude: | |
| - build_type: Release | |
| shared_type: OFF | |
| name: "${{matrix.build_type}} Shared=${{matrix.shared_type}} ${{matrix.device}}" | |
| runs-on: [ "${{matrix.device}}", self-hosted ] | |
| env: | |
| BUILD_TYPE: ${{matrix.build_type}} | |
| SHARED_TYPE: ${{matrix.shared_type}} | |
| DEVICE: ${{matrix.device}} | |
| BUILD_DIRECTORY: build | |
| INSTALL_DIRECTORY: install | |
| SETUP: ${{github.workspace}}/.github/workflows/env_setup.sh | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Setup Build Environment ${{ runner.os }} | |
| id: setup | |
| # Create a separate build directory and use it for all subsequent commands | |
| run: | | |
| source $SETUP | |
| cmake -E make_directory ${{ env.BUILD_DIRECTORY }} | |
| - name: Configure CMake | |
| id: configure | |
| working-directory: ${{ env.BUILD_DIRECTORY }} | |
| # Note the current convention is to use the -S and -B options here to specify source | |
| # and build directories, but this is only available with CMake 3.13 and higher. | |
| # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 | |
| run: | | |
| source $SETUP | |
| CC=gcc CXX=g++ FC=gfortran cmake $GITHUB_WORKSPACE $BUILD_CONFIG | |
| CC=gcc CXX=g++ FC=gfortran cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE $BUILD_CONFIG | |
| - name: Build | |
| working-directory: ${{ env.BUILD_DIRECTORY }} | |
| run: | | |
| source $SETUP | |
| cmake --build . | |
| - name: Install | |
| working-directory: ${{ env.BUILD_DIRECTORY }} | |
| run: | | |
| source $SETUP | |
| cmake --build . --target install | |
| - name: Test | |
| if: ${{ startsWith(matrix.build_type, 'Release') }} | |
| working-directory: ${{ env.BUILD_DIRECTORY }} | |
| # Execute tests defined by the CMake configuration. | |
| # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | |
| # run: ctest -C $BUILD_TYPE | |
| run: | | |
| source $SETUP | |
| ctest --output-on-failure -R 'launcher|dplasma' -E lowmem # lowmem tests are busted atm | |
| - name: Save Artifact | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: CMake-error-log | |
| path: ${{ env.BUILD_DIRECTORY }}/CMakeFiles/CMakeError.log |