ci: add realease workflow #101
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: Cargo Build & Test | |
| on: | |
| push: | |
| pull_request: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| lint: | |
| name: Lint (fmt + clippy) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| lfs: true | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake libclang-dev clang | |
| - name: Build and install SuiteSparse:GraphBLAS | |
| run: | | |
| git clone --depth 1 https://github.com/DrTimothyAldenDavis/GraphBLAS.git | |
| cd GraphBLAS | |
| make compact | |
| sudo make install | |
| - name: Build and install LAGraph | |
| run: | | |
| cd deps/LAGraph | |
| make | |
| sudo make install | |
| - name: Install Rust toolchain (stable) | |
| run: | | |
| rustup update stable | |
| rustup default stable | |
| rustup component add rustfmt clippy | |
| - name: cargo fmt | |
| run: cargo fmt --all -- --check | |
| - name: cargo clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| build_and_test: | |
| name: Rust project - latest | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| toolchain: | |
| - stable | |
| - beta | |
| - nightly | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| lfs: true | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake libclang-dev clang | |
| - name: Build and install SuiteSparse:GraphBLAS | |
| run: | | |
| git clone --depth 1 https://github.com/DrTimothyAldenDavis/GraphBLAS.git | |
| cd GraphBLAS | |
| make compact | |
| sudo make install | |
| - name: Build and install LAGraph | |
| run: | | |
| cd deps/LAGraph | |
| make | |
| sudo make install | |
| - name: Install Rust toolchain | |
| run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | |
| - name: Build (with regenerated bindings) | |
| run: cargo build --features regenerate-bindings --verbose | |
| - name: Test | |
| run: LD_LIBRARY_PATH=/usr/local/lib cargo test --verbose |