llvm-ir-analysis 0.4.0

Static analysis on LLVM IR
Documentation
name: CI

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  test:
    name: Test for LLVM ${{ matrix.llvm }}
    runs-on: ubuntu-20.04
    strategy:
      fail-fast: false
      matrix:
        llvm:
        - 9
        - 10
        - 11
        - 12
        - 13
        - 14
        - 15
        - 16
        - 17
    steps:
      - name: Checkout sources
        uses: actions/checkout@v3
      - name: Install LLVM ${{ matrix.llvm }}
        run: curl https://apt.llvm.org/llvm.sh | sudo bash -s -- ${{ matrix.llvm }}
      - name: Install Polly ${{ matrix.llvm }}
        run: sudo apt-get install -y libpolly-${{ matrix.llvm }}-dev
        if: matrix.llvm >= 14
      - name: Install zstd
        run: sudo apt-get install -y libzstd-dev
        if: matrix.llvm >= 16
      - name: Install Rust toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
      - name: Build and Test Debug
        uses: actions-rs/cargo@v1
        with:
          command: test
          ## LLVM 11 doesn't work with strict-versioning, see llvm-ir#53
          args: ${{ format('--features=llvm-{0}{1}', matrix.llvm, matrix.llvm != '11' && ',strict-versioning' || '') }}
      - name: Build and Test Release
        uses: actions-rs/cargo@v1
        with:
          command: test
          ## LLVM 11 doesn't work with strict-versioning, see llvm-ir#53
          args: ${{ format('--release --features=llvm-{0}{1}', matrix.llvm, matrix.llvm != '11' && ',strict-versioning' || '') }}