mpi 0.6.0

Message Passing Interface bindings for Rust
Documentation
name: Test
on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - '*'
defaults:
  run:
    shell: bash
jobs:
  test:
    name: rsmpi
    runs-on: ${{ matrix.os }}
    continue-on-error: ${{ matrix.rust == 'nightly' }}
    strategy:
      fail-fast: true
      matrix:
        include:
          - os: ubuntu-latest
            rust: nightly
            mpi_package: libmpich-dev
            cargo_flags: --all-features
          - os: ubuntu-latest
            rust: stable
            mpi_package: libmpich-dev
            cargo_flags: --all-features
          - os: ubuntu-latest
            rust: 1.54.0
            mpi_package: libmpich-dev
            cargo_flags: --all-features
          - os: macos-latest
            rust: stable
            mpi_package: open-mpi
            cargo_flags: --all-features
          - os: ubuntu-latest
            rust: stable
            mpi_package: libopenmpi-dev
            cargo_flags: --all-features
          - os: windows-2022
            rust: stable
            cargo_flags: --features derive
    steps:
      - uses: actions/checkout@v2
      - name: Install (Linux)
        if: runner.os == 'Linux'
        run: |
          sudo apt-get update
          sudo apt-get install -y llvm-dev libclang-dev pkgconf ${{ matrix.mpi_package }}
      - name: Install (MacOS)
        if: runner.os == 'macOS'
        # Workaround for intermittent failures with OMPI https://github.com/open-mpi/ompi/issues/7393
        run: |
          brew install llvm@13 ${{ matrix.mpi_package }}
          echo TMPDIR=/tmp | tee -a $GITHUB_ENV
          env
      - name: Install (Windows)
        if: runner.os == 'Windows'
        run: |
          choco install llvm --version 14.0.6 -y
          sh ci/install-mpi-windows.sh
          echo MSMPI_INC="C:\\Program Files (x86)\\Microsoft SDKs\\MPI\\Include\\" | tee -a $GITHUB_ENV
          echo MSMPI_LIB32="C:\\Program Files (x86)\\Microsoft SDKs\\MPI\\Lib\\x86\\" | tee -a $GITHUB_ENV
          echo MSMPI_LIB64="C:\\Program Files (x86)\\Microsoft SDKs\\MPI\\Lib\\x64\\" | tee -a $GITHUB_ENV
          env
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{matrix.rust}}
      - name: Cargo Test ${{ matrix.cargo_flags }}
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: ${{ matrix.cargo_flags }}
      - name: Parallel Examples
        run: |
          cargo install --force cargo-mpirun
          export PATH="/c/Program Files/Microsoft MPI/Bin:${PATH}"
          ci/run-examples.sh ${{ matrix.cargo_flags }}