compiler/rustc_codegen_gcc/.github/workflows/failures.yml YAML 133 lines View on github.com → Search inside
1# FIXME: refactor to avoid duplication with the ci.yml file.2name: Failures34on:5  push:6    branches:7      - master8  pull_request:910permissions:11  contents: read1213env:14  # Enable backtraces for easier debugging15  RUST_BACKTRACE: 11617jobs:18  build:19    runs-on: ubuntu-24.042021    strategy:22      fail-fast: false23      matrix:24        libgccjit_version:25          - gcc: "libgccjit.so"26            artifacts_branch: "master"27          - gcc: "libgccjit_without_int128.so"28            artifacts_branch: "master-without-128bit-integers"29          - gcc: "libgccjit12.so"30            artifacts_branch: "gcc12"31            extra: "--no-default-features"32            # FIXME(antoyo): we need to set GCC_EXEC_PREFIX so that the linker can find the linker plugin.33            # Not sure why it's not found otherwise.34            env_extra: "TEST_FLAGS='-Cpanic=abort -Zpanic-abort-tests' GCC_EXEC_PREFIX=/usr/lib/gcc/"3536    steps:37    - uses: actions/checkout@v43839    # `rustup show` installs from rust-toolchain.toml40    - name: Setup rust toolchain41      run: rustup show4243    - name: Setup rust cache44      uses: Swatinem/rust-cache@v24546    - name: Install packages47      run: sudo apt-get install ninja-build ripgrep4849    - name: Install libgccjit1250      if: matrix.libgccjit_version.gcc == 'libgccjit12.so'51      run: |52        sudo apt-get update53        sudo apt-get install libgccjit-12-dev5455    - name: Setup path to libgccjit56      if: matrix.libgccjit_version.gcc == 'libgccjit12.so'57      run: |58          echo 'gcc-path = "/usr/lib/gcc/x86_64-linux-gnu/12"' > config.toml5960    - name: Download artifact61      if: matrix.libgccjit_version.gcc != 'libgccjit12.so'62      run: curl -LO https://github.com/rust-lang/gcc/releases/latest/download/gcc-15.deb6364    - name: Setup path to libgccjit65      if: matrix.libgccjit_version.gcc != 'libgccjit12.so'66      run: |67          sudo dpkg --force-overwrite -i gcc-15.deb68          echo 'gcc-path = "/usr/lib"' > config.toml69          70          7172    - name: Set env73      run: |74        echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV7576    #- name: Cache rust repository77      #uses: actions/cache@v378      #id: cache-rust-repository79      #with:80        #path: rust81        #key: ${{ runner.os }}-packages-${{ hashFiles('rust/.git/HEAD') }}8283    - name: Git config84      run: |85        git config --global user.email "user@example.com"86        git config --global user.name "User"8788    - name: Prepare dependencies89      if: matrix.libgccjit_version.gcc == 'libgccjit12.so'90      run: ./y.sh prepare --libgccjit12-patches9192    - name: Prepare dependencies93      if: matrix.libgccjit_version.gcc != 'libgccjit12.so'94      run: ./y.sh prepare9596    - name: Run tests97      # FIXME: re-enable those tests for libgccjit 12.98      if: matrix.libgccjit_version.gcc != 'libgccjit12.so'99      id: tests100      run: |101        ${{ matrix.libgccjit_version.env_extra }} ./y.sh test --release --clean --build-sysroot --test-failing-rustc ${{ matrix.libgccjit_version.extra }} 2>&1 | tee output_log102        rg --text "test result" output_log >> $GITHUB_STEP_SUMMARY103104    - name: Run failing ui pattern tests for ICE105      # FIXME: re-enable those tests for libgccjit 12.106      if: matrix.libgccjit_version.gcc != 'libgccjit12.so'107      id: ui-tests108      run: |109        ${{ matrix.libgccjit_version.env_extra }} ./y.sh test --release --test-failing-ui-pattern-tests ${{ matrix.libgccjit_version.extra }} 2>&1 | tee output_log_ui110        if grep -q "the compiler unexpectedly panicked" output_log_ui; then111          echo "Error: 'the compiler unexpectedly panicked' found in output logs. CI Error!!"112          exit 1113        fi114115  # Summary job for the merge queue.116  # ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!117  success_failures:118    needs: [build]119    # We need to ensure this job does *not* get skipped if its dependencies fail,120    # because a skipped job is considered a success by GitHub. So we have to121    # overwrite `if:`. We use `!cancelled()` to ensure the job does still not get run122    # when the workflow is canceled manually.123    if: ${{ !cancelled() }}124    runs-on: ubuntu-latest125    steps:126      # Manually check the status of all dependencies. `if: failure()` does not work.127      - name: Conclusion128        run: |129          # Print the dependent jobs to see them in the CI log130          jq -C <<< '${{ toJson(needs) }}'131          # Check if all jobs that we depend on (in the needs array) were successful.132          jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'

Findings

✓ No findings reported for this file.

Get this view in your editor

Same data, no extra tab — call code_get_file + code_get_findings over MCP from Claude/Cursor/Copilot.