-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #357 from rust-lang/fix/gcc-12
Fix for the libgccjit 12 CI
- Loading branch information
Showing
9 changed files
with
167 additions
and
69 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,16 +19,33 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
libgccjit_version: | ||
- { gcc: "libgccjit.so", artifacts_branch: "master" } | ||
- { gcc: "libgccjit_without_int128.so", artifacts_branch: "master-without-128bit-integers" } | ||
- gcc: "libgccjit.so" | ||
artifacts_branch: "master" | ||
- gcc: "libgccjit_without_int128.so" | ||
artifacts_branch: "master-without-128bit-integers" | ||
- gcc: "libgccjit12.so" | ||
artifacts_branch: "gcc12" | ||
extra: "--no-default-features" | ||
# FIXME(antoyo): we need to set GCC_EXEC_PREFIX so that the linker can find the linker plugin. | ||
# Not sure why it's not found otherwise. | ||
env_extra: "TEST_FLAGS='-Cpanic=abort -Zpanic-abort-tests' GCC_EXEC_PREFIX=/usr/lib/gcc/" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install packages | ||
run: sudo apt-get install ninja-build ripgrep | ||
|
||
- name: Install libgccjit12 | ||
if: matrix.libgccjit_version.gcc == 'libgccjit12.so' | ||
run: sudo apt-get install libgccjit-12-dev | ||
|
||
- name: Setup path to libgccjit | ||
if: matrix.libgccjit_version.gcc == 'libgccjit12.so' | ||
run: echo /usr/lib/gcc/x86_64-linux-gnu/12 > gcc_path | ||
|
||
- name: Download artifact | ||
if: matrix.libgccjit_version.gcc != 'libgccjit12.so' | ||
uses: dawidd6/action-download-artifact@v2 | ||
with: | ||
workflow: main.yml | ||
|
@@ -40,6 +57,7 @@ jobs: | |
search_artifacts: true # Because, instead, the action only check the last job ran and that won't work since we want multiple artifacts. | ||
|
||
- name: Setup path to libgccjit | ||
if: matrix.libgccjit_version.gcc != 'libgccjit12.so' | ||
run: | | ||
sudo dpkg --force-overwrite -i gcc-13/gcc-13.deb | ||
echo /usr/lib/ > gcc_path | ||
|
@@ -81,18 +99,18 @@ jobs: | |
#path: rust | ||
#key: ${{ runner.os }}-packages-${{ hashFiles('rust/.git/HEAD') }} | ||
|
||
- name: Build | ||
run: | | ||
./y.sh prepare --only-libcore | ||
./y.sh build | ||
cargo test | ||
./clean_all.sh | ||
- name: Prepare dependencies | ||
- name: Git config | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "User" | ||
./y.sh prepare | ||
- name: Prepare dependencies | ||
if: matrix.libgccjit_version.gcc == 'libgccjit12.so' | ||
run: ./y.sh prepare --libgccjit12-patches | ||
|
||
- name: Prepare dependencies | ||
if: matrix.libgccjit_version.gcc != 'libgccjit12.so' | ||
run: ./y.sh prepare | ||
|
||
# Compile is a separate step, as the actions-rs/cargo action supports error annotations | ||
- name: Compile | ||
|
@@ -107,5 +125,5 @@ jobs: | |
- name: Run tests | ||
id: tests | ||
run: | | ||
./test.sh --release --clean --build-sysroot --test-failing-rustc | tee output_log | ||
rg "test result" output_log >> $GITHUB_STEP_SUMMARY | ||
${{ matrix.libgccjit_version.env_extra }} ./test.sh --release --clean --build-sysroot --test-failing-rustc ${{ matrix.libgccjit_version.extra }} | tee output_log | ||
rg --text "test result" output_log >> $GITHUB_STEP_SUMMARY |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,9 @@ env: | |
# Enable backtraces for easier debugging | ||
RUST_BACKTRACE: 1 | ||
TEST_FLAGS: "-Cpanic=abort -Zpanic-abort-tests" | ||
# FIXME(antoyo): we need to set GCC_EXEC_PREFIX so that the linker can find the linker plugin. | ||
# Not sure why it's not found otherwise. | ||
GCC_EXEC_PREFIX: /usr/lib/gcc/ | ||
|
||
jobs: | ||
build: | ||
|
@@ -21,17 +24,15 @@ jobs: | |
matrix: | ||
commands: [ | ||
"--mini-tests", | ||
# TODO(antoyo): re-enable those commands when the build with libgccjit 12 is fixed. | ||
#"--std-tests", | ||
"--std-tests", | ||
# FIXME: re-enable asm tests when GCC can emit in the right syntax. | ||
# "--asm-tests", | ||
#"--test-libcore", | ||
#"--extended-rand-tests", | ||
#"--extended-regex-example-tests", | ||
#"--extended-regex-tests", | ||
#"--test-successful-rustc --nb-parts 2 --current-part 0", | ||
#"--test-successful-rustc --nb-parts 2 --current-part 1", | ||
#"--test-failing-rustc", | ||
"--test-libcore", | ||
"--extended-rand-tests", | ||
"--extended-regex-example-tests", | ||
"--extended-regex-tests", | ||
"--test-successful-rustc --nb-parts 2 --current-part 0", | ||
"--test-successful-rustc --nb-parts 2 --current-part 1", | ||
] | ||
|
||
steps: | ||
|
@@ -85,18 +86,16 @@ jobs: | |
|
||
- name: Build | ||
run: | | ||
./y.sh prepare --only-libcore | ||
# TODO(antoyo): build the sysroot when the build with libgccjit 12 is fixed. | ||
#./y.sh build --no-default-features | ||
# TODO(antoyo): run the tests when we can build the sysroot with libgccjit 12. | ||
#cargo test --no-default-features | ||
./y.sh prepare --only-libcore --libgccjit12-patches | ||
./y.sh build --no-default-features --sysroot-panic-abort | ||
cargo test --no-default-features | ||
./clean_all.sh | ||
- name: Prepare dependencies | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "User" | ||
./y.sh prepare | ||
./y.sh prepare --libgccjit12-patches | ||
# Compile is a separate step, as the actions-rs/cargo action supports error annotations | ||
- name: Compile | ||
|
@@ -108,9 +107,9 @@ jobs: | |
- name: Add more failing tests for GCC 12 | ||
run: cat failing-ui-tests12.txt >> failing-ui-tests.txt | ||
|
||
- name: Add more failing tests because the sysroot is not compiled with LTO | ||
run: cat failing-non-lto-tests.txt >> failing-ui-tests.txt | ||
|
||
- name: Run tests | ||
run: | | ||
# TODO(antoyo): add --build-sysroot when the build with libgccjit 12 is fixed. | ||
# FIXME(antoyo): we need to set GCC_EXEC_PREFIX so that the linker can find the linker plugin. | ||
# Not sure why it's not found otherwise. | ||
GCC_EXEC_PREFIX=/usr/lib/gcc/ ./test.sh --release --clean ${{ matrix.commands }} --no-default-features | ||
./test.sh --release --clean --build-sysroot ${{ matrix.commands }} --no-default-features |
This file contains 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
This file contains 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
This file contains 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
32 changes: 32 additions & 0 deletions
32
patches/libgccjit12/0001-core-Disable-portable-simd-test.patch
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
From 7bcd24ec6d4a96121874cb1ae5a23ea274aeff34 Mon Sep 17 00:00:00 2001 | ||
From: None <[email protected]> | ||
Date: Thu, 19 Oct 2023 13:12:51 -0400 | ||
Subject: [PATCH] [core] Disable portable-simd test | ||
|
||
--- | ||
library/core/tests/lib.rs | 2 -- | ||
1 file changed, 2 deletions(-) | ||
|
||
diff --git a/library/core/tests/lib.rs b/library/core/tests/lib.rs | ||
index 5814ed4..194ad4c 100644 | ||
--- a/library/core/tests/lib.rs | ||
+++ b/library/core/tests/lib.rs | ||
@@ -90,7 +90,6 @@ | ||
#![feature(unwrap_infallible)] | ||
#![feature(pointer_byte_offsets)] | ||
#![feature(pointer_is_aligned)] | ||
-#![feature(portable_simd)] | ||
#![feature(ptr_metadata)] | ||
#![feature(lazy_cell)] | ||
#![feature(unsized_tuple_coercion)] | ||
@@ -157,7 +156,6 @@ mod pin; | ||
mod pin_macro; | ||
mod ptr; | ||
mod result; | ||
-mod simd; | ||
mod slice; | ||
mod str; | ||
mod str_lossy; | ||
-- | ||
2.42.0 | ||
|
This file contains 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
Oops, something went wrong.