Merge pull request #18 from SparseLinearAlgebra/clang-format #205
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: Ubuntu | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| workflow_dispatch: | |
| env: | |
| build_dir: "build" | |
| artifact: "cubool-ubuntu-build.tar.xz" | |
| jobs: | |
| build: | |
| name: Build ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-22.04 | |
| env: | |
| config: "Release" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Configure CMake build | |
| run: | | |
| cmake . -B ${{ env.build_dir }} -DCMAKE_BUILD_TYPE=${{ env.config }} -DCUBOOL_BUILD_TESTS=ON -DCUBOOL_WITH_CUDA=OFF | |
| - name: Build library sources | |
| run: | | |
| cmake --build ${{ env.build_dir }} --target all --verbose -j `nproc` | |
| - name: Prepare upload binary | |
| run: | | |
| tar cfz ${{ env.artifact }} ${{ env.build_dir }} | |
| - name: Upload binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.artifact }} | |
| path: ${{ env.artifact }} | |
| test: | |
| name: Test CPU ${{ matrix.cpu }} | |
| needs: build | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-22.04 | |
| cpu: AMD-EPYC-7763 | |
| env: | |
| unit-test-file: cpu_test_all.log | |
| regression-test-file: cpu_test_regression.log | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ env.artifact }} | |
| - name: Unarchive artifact | |
| run: | | |
| tar xzf ${{ env.artifact }} | |
| rm ${{ env.artifact }} | |
| - name: Run unit-tests | |
| working-directory: ${{ env.build_dir }} | |
| run: | | |
| bash scripts/run_tests_all.sh | tee ${{ env.unit-test-file }} | |
| - name: Upload unit tests resutls | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.unit-test-file }} | |
| path: ${{ env.build_dir }}/${{ env.unit-test-file }} | |
| - name: Check for unit tests results | |
| working-directory: ${{ env.build_dir }} | |
| run: | | |
| ! grep -q "FAILED" ${{ env.unit-test-file }} | |
| - name: Run regression-tests | |
| working-directory: ${{ env.build_dir }}/python | |
| run: | | |
| bash run_tests.sh 2>&1 | tee ${{ env.regression-test-file }} | |
| - name: Upload regression tests resutls | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.regression-test-file }} | |
| path: ${{ env.build_dir }}/python/${{ env.regression-test-file }} | |
| - name: Check for regression tests results | |
| working-directory: ${{ env.build_dir }}/python | |
| run: | | |
| ! grep -q "FAILED" ${{ env.regression-test-file }} |