Implement Display trait for all types to produce valid LLVM IR text #87
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| test: | |
| name: Test for LLVM ${{ matrix.llvm }} | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| llvm: | |
| - 9 | |
| - 10 | |
| - 11 | |
| - 12 | |
| - 13 | |
| - 14 | |
| - 15 | |
| - 16 | |
| - 17 | |
| - 18 | |
| - 19 | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v3 | |
| - name: Install libtinfo | |
| run: sudo apt-get update && sudo apt-get install -y libtinfo5 | |
| - name: Install LLVM ${{ matrix.llvm }} (via Github Action) | |
| uses: KyleMayes/install-llvm-action@v2 | |
| with: | |
| version: ${{ matrix.llvm }} | |
| if: matrix.llvm < 19 | |
| # As of LLVM 19, the official LLVM binaries (which the install-llvm-action action uses), are built with LTO enabled | |
| # To avoid breaking on non-LLVM linkers in CI, we can install the official apt binaries for LLVM 19 and above | |
| - name: Install LLVM ${{ matrix.llvm }} (via official install script) | |
| if: matrix.llvm >= 19 | |
| run: curl https://apt.llvm.org/llvm.sh | sudo bash -s -- ${{ matrix.llvm }} | |
| # Polly only needs explicit installation if we are installing LLVM via the apt packages | |
| - name: Install Polly ${{ matrix.llvm }} | |
| run: sudo apt-get install -y libpolly-${{ matrix.llvm }}-dev | |
| if: matrix.llvm >= 19 | |
| - name: llvm-config | |
| run: llvm-config --version --bindir --libdir | |
| if: matrix.llvm < 19 | |
| # The apt packages install with a version suffix | |
| - name: llvm-config | |
| run: llvm-config-${{ matrix.llvm }} --version --bindir --libdir | |
| if: matrix.llvm >= 19 | |
| - 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 Debug | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: build | |
| # LLVM 11 doesn't work with strict-versioning, see #53 | |
| args: ${{ format('--features=llvm-{0}{1}', matrix.llvm, matrix.llvm != '11' && ',strict-versioning' || '') }} | |
| - name: Build Release | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: build | |
| # LLVM 11 doesn't work with strict-versioning, see #53 | |
| args: ${{ format('--release --features=llvm-{0}{1}', matrix.llvm, matrix.llvm != '11' && ',strict-versioning' || '') }} | |
| - name: Test Release | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: test | |
| args: ${{ format('--release --features=llvm-{0}{1}', matrix.llvm, matrix.llvm != '11' && ',strict-versioning' || '') }} | |
| # LLVM 19 tests should pass with a debug build, now that https://github.com/llvm/llvm-project/issues/65227 | |
| # and https://github.com/llvm/llvm-project/pull/87163 have landed in a release | |
| - name: Test Debug | |
| uses: actions-rs/cargo@v1 | |
| with: | |
| command: test | |
| args: --features=llvm-${{ matrix.llvm }} | |
| if: matrix.llvm >= 19 |