|
1 |
| -name: LAGraph CI |
| 1 | +name: LAGraph CI with Builtin GraphBLAS |
2 | 2 |
|
3 | 3 | on:
|
4 |
| - workflow_dispatch: |
5 |
| - push: |
6 |
| - branches-ignore: |
7 |
| - - '**/v1.2*' |
8 |
| - - '**/*dev2' |
9 |
| - pull_request: |
| 4 | + workflow_dispatch: |
| 5 | + push: |
| 6 | + branches-ignore: |
| 7 | + - "**/*dev2" |
| 8 | + pull_request: |
10 | 9 |
|
11 | 10 | jobs:
|
12 |
| - linux: |
13 |
| - runs-on: ubuntu-22.04 |
14 |
| - strategy: |
15 |
| - matrix: |
16 |
| - config: |
17 |
| - - {grb_version: 7.4.4, conda_grb_package_hash: hcb278e6, conda_extension: conda, vanilla: 0, deploy_test_results: true} |
18 |
| - - {grb_version: 7.4.4, conda_grb_package_hash: hcb278e6, conda_extension: conda, vanilla: 1, deploy_test_results: false} |
19 |
| - steps: |
20 |
| - - name: Checkout |
21 |
| - |
22 |
| - - name: Install tools for build |
23 |
| - run: | |
24 |
| - sudo apt install -y lcov |
25 |
| - - name: Get GraphBLAS binaries |
26 |
| - run: | |
27 |
| - mkdir graphblas-binaries |
28 |
| - cd graphblas-binaries |
29 |
| - wget --quiet https://anaconda.org/conda-forge/graphblas/${{ matrix.config.grb_version }}/download/linux-64/graphblas-${{ matrix.config.grb_version }}-${{ matrix.config.conda_grb_package_hash }}_0.${{ matrix.config.conda_extension }} |
30 |
| - if [ ${{ matrix.config.conda_extension }} == "tar.bz2" ]; then |
31 |
| - tar xf graphblas-${{ matrix.config.grb_version }}-${{ matrix.config.conda_grb_package_hash }}_0.${{ matrix.config.conda_extension }} |
32 |
| - else |
33 |
| - unzip graphblas-${{ matrix.config.grb_version }}-${{ matrix.config.conda_grb_package_hash }}_0.${{ matrix.config.conda_extension }} |
34 |
| - tar xf pkg-graphblas-${{ matrix.config.grb_version }}-${{ matrix.config.conda_grb_package_hash }}_0.tar.zst |
35 |
| - fi |
36 |
| - cd .. |
37 |
| - - name: Build project |
38 |
| - run: | |
39 |
| - export GRAPHBLAS_INCLUDE_DIR=`pwd`/graphblas-binaries/include |
40 |
| - export GRAPHBLAS_LIBRARY=`pwd`/graphblas-binaries/lib/libgraphblas.so |
41 |
| - cd build |
42 |
| - cmake .. -DCOVERAGE=1 -DGRAPHBLAS_INCLUDE_DIR=${GRAPHBLAS_INCLUDE_DIR} -DGRAPHBLAS_LIBRARY=${GRAPHBLAS_LIBRARY} -DLAGRAPH_VANILLA=${{ matrix.config.vanilla }} |
43 |
| - JOBS=2 make |
44 |
| - make test_coverage |
45 |
| - - name: Deploy |
46 |
| - |
47 |
| - if: matrix.deploy_test_results && github.event_name == 'push' && github.ref == 'refs/heads/stable' |
48 |
| - with: |
49 |
| - branch: gh-pages |
50 |
| - folder: build/test_coverage/ |
51 |
| - single-commit: true |
52 |
| - - name: Save output |
53 |
| - |
54 |
| - with: |
55 |
| - name: test_coverage |
56 |
| - path: build/test_coverage/ |
57 |
| - if: github.event_name == 'push' && github.ref == 'refs/heads/stable' |
58 |
| - macos: |
59 |
| - runs-on: macos-14 |
60 |
| - strategy: |
61 |
| - matrix: |
62 |
| - config: |
63 |
| - - {grb_version: 7.4.4, conda_grb_package_hash: ha894c9a, conda_extension: conda, vanilla: 0} |
64 |
| - - {grb_version: 7.4.4, conda_grb_package_hash: ha894c9a, conda_extension: conda, vanilla: 1} |
65 |
| - steps: |
66 |
| - - name: Checkout |
67 |
| - |
68 |
| - - name: Install dependencies |
69 |
| - run: | |
70 |
| - brew tap-new libomp/cask |
71 |
| - brew extract --version=14.0.6 libomp libomp/cask |
72 |
| - |
73 |
| - - name: Get GraphBLAS binaries |
74 |
| - run: | |
75 |
| - mkdir graphblas-binaries |
76 |
| - cd graphblas-binaries |
77 |
| - wget --quiet https://anaconda.org/conda-forge/graphblas/${{ matrix.config.grb_version }}/download/osx-64/graphblas-${{ matrix.config.grb_version }}-${{ matrix.config.conda_grb_package_hash }}_0.${{ matrix.config.conda_extension }} |
78 |
| - if [ ${{ matrix.config.conda_extension }} == "tar.bz2" ]; then |
79 |
| - tar xf graphblas-${{ matrix.config.grb_version }}-${{ matrix.config.conda_grb_package_hash }}_0.${{ matrix.config.conda_extension }} |
80 |
| - else |
81 |
| - unzip graphblas-${{ matrix.config.grb_version }}-${{ matrix.config.conda_grb_package_hash }}_0.${{ matrix.config.conda_extension }} |
82 |
| - tar xf pkg-graphblas-${{ matrix.config.grb_version }}-${{ matrix.config.conda_grb_package_hash }}_0.tar.zst |
83 |
| - fi |
84 |
| - cd .. |
85 |
| - - name: Build project |
86 |
| - run: | |
87 |
| - export GRAPHBLAS_INCLUDE_DIR=`pwd`/graphblas-binaries/include |
88 |
| - export GRAPHBLAS_LIBRARY=`pwd`/graphblas-binaries/lib/libgraphblas.dylib |
89 |
| - # adding an extra line to the CMakeLists.txt file to locate the libomp instance installed by brew |
90 |
| - echo 'include_directories("/usr/local/opt/libomp/include")' | cat - CMakeLists.txt |
91 |
| - cd build |
92 |
| - CC=gcc cmake .. -DGRAPHBLAS_INCLUDE_DIR=${GRAPHBLAS_INCLUDE_DIR} -DGRAPHBLAS_LIBRARY=${GRAPHBLAS_LIBRARY} -DLAGRAPH_VANILLA=${{ matrix.config.vanilla }} |
93 |
| - JOBS=2 make |
94 |
| - make test |
| 11 | + linux: |
| 12 | + runs-on: ubuntu-22.04 |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + config: |
| 16 | + # if there are multiple items in this list, only use should |
| 17 | + # deployit=true for just one of them. |
| 18 | + - { grb_version: 9.3.1, deployit: true } |
| 19 | + steps: |
| 20 | + - name: Checkout |
| 21 | + |
| 22 | + - name: Install tools for build |
| 23 | + run: | |
| 24 | + sudo apt install -y lcov |
| 25 | + - name: Build GraphBLAS |
| 26 | + run: | |
| 27 | + git clone https://github.com/DrTimothyAldenDavis/GraphBLAS.git |
| 28 | + cd GraphBLAS |
| 29 | + git checkout tags/v${{ matrix.config.grb_version }} |
| 30 | + make compact |
| 31 | + sudo make install |
| 32 | + cd .. |
| 33 | + - name: Build project |
| 34 | + run: | |
| 35 | + export GRAPHBLAS_INCLUDE_DIR=`pwd`/GraphBLAS/include/suitesparse |
| 36 | + export GRAPHBLAS_LIBRARY=`pwd`/GraphBLAS/lib/libgraphblas.so |
| 37 | + cd build |
| 38 | + cmake .. -DCOVERAGE=1 -DGRAPHBLAS_INCLUDE_DIR=${GRAPHBLAS_INCLUDE_DIR} -DGRAPHBLAS_LIBRARY=${GRAPHBLAS_LIBRARY} |
| 39 | + JOBS=2 make |
| 40 | + make test_coverage |
| 41 | + - name: Deploy |
| 42 | + |
| 43 | + if: matrix.config.deployit && github.event_name == 'push' && github.ref == 'refs/heads/stable' |
| 44 | + with: |
| 45 | + branch: gh-pages |
| 46 | + folder: build/test_coverage/ |
| 47 | + single-commit: true |
| 48 | + - name: Save output |
| 49 | + |
| 50 | + with: |
| 51 | + name: test_coverage |
| 52 | + path: build/test_coverage/ |
| 53 | + macos: |
| 54 | + runs-on: macos-14 |
| 55 | + strategy: |
| 56 | + matrix: |
| 57 | + config: |
| 58 | + - { grb_version: 9.3.1 } |
| 59 | + steps: |
| 60 | + - name: Checkout |
| 61 | + |
| 62 | + - name: Install dependencies |
| 63 | + run: | |
| 64 | + brew tap-new libomp/cask |
| 65 | + brew extract --version=14.0.6 libomp libomp/cask |
| 66 | + |
| 67 | + - name: Build GraphBLAS |
| 68 | + run: | |
| 69 | + git clone https://github.com/DrTimothyAldenDavis/GraphBLAS.git |
| 70 | + cd GraphBLAS |
| 71 | + git checkout tags/v${{ matrix.config.grb_version }} |
| 72 | + make compact |
| 73 | + sudo make install |
| 74 | + cd .. |
| 75 | + - name: Build project |
| 76 | + run: | |
| 77 | + export GRAPHBLAS_INCLUDE_DIR=`pwd`/GraphBLAS/include/suitesparse |
| 78 | + export GRAPHBLAS_LIBRARY=`pwd`/GraphBLAS/lib/libgraphblas.dylib |
| 79 | + # adding an extra line to the CMakeLists.txt file to locate the libomp instance installed by brew |
| 80 | + echo 'include_directories("/usr/local/opt/libomp/include")' | cat - CMakeLists.txt |
| 81 | + cd build |
| 82 | + CC=gcc cmake .. -DGRAPHBLAS_INCLUDE_DIR=${GRAPHBLAS_INCLUDE_DIR} -DGRAPHBLAS_LIBRARY=${GRAPHBLAS_LIBRARY} |
| 83 | + JOBS=2 make |
| 84 | + make test |
0 commit comments