Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b215beb

Browse files
committedJul 10, 2024
Auto merge of #127566 - GuillaumeGomez:sync-cg_gcc, r=GuillaumeGomez
Sync rustc_codegen_gcc Follow-up of rust-lang/rustc_codegen_gcc#535. cc `@antoyo`
2 parents d819876 + 8bf65c6 commit b215beb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+2681
-1138
lines changed
 

‎compiler/rustc_codegen_gcc/.github/workflows/ci.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ jobs:
4949
# `llvm-14-tools` is needed to install the `FileCheck` binary which is used for asm tests.
5050
run: sudo apt-get install ninja-build ripgrep llvm-14-tools
5151

52-
- name: Install rustfmt
53-
run: rustup component add rustfmt
52+
- name: Install rustfmt & clippy
53+
run: rustup component add rustfmt clippy
5454

5555
- name: Download artifact
56-
run: curl -LO https://github.com/antoyo/gcc/releases/latest/download/${{ matrix.libgccjit_version.gcc }}
56+
run: curl -LO https://github.com/rust-lang/gcc/releases/latest/download/${{ matrix.libgccjit_version.gcc }}
5757

5858
- name: Setup path to libgccjit
5959
run: |
@@ -78,9 +78,16 @@ jobs:
7878
- name: Build
7979
run: |
8080
./y.sh prepare --only-libcore
81-
./y.sh build
81+
./y.sh build --sysroot
8282
cargo test
83-
./y.sh clean all
83+
84+
- name: Run y.sh cargo build
85+
run: |
86+
./y.sh cargo build --manifest-path tests/hello-world/Cargo.toml
87+
88+
- name: Clean
89+
run: |
90+
./y.sh clean all
8491
8592
- name: Prepare dependencies
8693
run: |
@@ -96,7 +103,12 @@ jobs:
96103
./y.sh test --release --clean --build-sysroot ${{ matrix.commands }}
97104
98105
- name: Check formatting
99-
run: cargo fmt -- --check
106+
run: ./y.sh fmt --check
107+
108+
- name: clippy
109+
run: |
110+
cargo clippy --all-targets -- -D warnings
111+
cargo clippy --all-targets --features master -- -D warnings
100112
101113
duplicates:
102114
runs-on: ubuntu-latest

‎compiler/rustc_codegen_gcc/.github/workflows/failures.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
5757
- name: Download artifact
5858
if: matrix.libgccjit_version.gcc != 'libgccjit12.so'
59-
run: curl -LO https://github.com/antoyo/gcc/releases/latest/download/gcc-13.deb
59+
run: curl -LO https://github.com/rust-lang/gcc/releases/latest/download/gcc-13.deb
6060

6161
- name: Setup path to libgccjit
6262
if: matrix.libgccjit_version.gcc != 'libgccjit12.so'
@@ -94,7 +94,20 @@ jobs:
9494
run: cat tests/failing-non-lto-tests.txt >> tests/failing-ui-tests.txt
9595

9696
- name: Run tests
97+
# TODO: re-enable those tests for libgccjit 12.
98+
if: matrix.libgccjit_version.gcc != 'libgccjit12.so'
9799
id: tests
98100
run: |
99101
${{ matrix.libgccjit_version.env_extra }} ./y.sh test --release --clean --build-sysroot --test-failing-rustc ${{ matrix.libgccjit_version.extra }} | tee output_log
100102
rg --text "test result" output_log >> $GITHUB_STEP_SUMMARY
103+
104+
- name: Run failing ui pattern tests for ICE
105+
# TODO: re-enable those tests for libgccjit 12.
106+
if: matrix.libgccjit_version.gcc != 'libgccjit12.so'
107+
id: ui-tests
108+
run: |
109+
${{ matrix.libgccjit_version.env_extra }} ./y.sh test --release --test-failing-ui-pattern-tests ${{ matrix.libgccjit_version.extra }} | tee output_log_ui
110+
if grep -q "the compiler unexpectedly panicked" output_log_ui; then
111+
echo "Error: 'the compiler unexpectedly panicked' found in output logs. CI Error!!"
112+
exit 1
113+
fi

0 commit comments

Comments
 (0)
Please sign in to comment.