about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume.gomez@huawei.com>2023-11-01 15:48:12 +0100
committerGuillaume Gomez <guillaume.gomez@huawei.com>2023-11-02 21:03:27 +0100
commit13f7f052d855e348cb91c1336f6d7093792912a3 (patch)
tree01099c2165ad8a5aebe3948b16d7a10ca64e3762
parent260d91bd413c1ffe6f6e7672f1d8223c34dd21bf (diff)
downloadrust-13f7f052d855e348cb91c1336f6d7093792912a3.tar.gz
rust-13f7f052d855e348cb91c1336f6d7093792912a3.zip
Run codegen tests outside if not llvm-15
-rw-r--r--.github/workflows/ci.yml3
-rwxr-xr-xsrc/ci/docker/host-x86_64/x86_64-gnu-llvm-15/script.sh12
-rwxr-xr-xsrc/ci/docker/run.sh1
-rw-r--r--src/ci/github-actions/ci.yml2
4 files changed, 15 insertions, 3 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 5f14cd36ce4..1bbf902cedd 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -57,8 +57,9 @@ jobs:
             os: ubuntu-20.04-4core-16gb
             env: {}
           - name: x86_64-gnu-llvm-15
+            env:
+              SKIP_CODEGEN_TESTS: "1"
             os: ubuntu-20.04-16core-64gb
-            env: {}
           - name: x86_64-gnu-tools
             os: ubuntu-20.04-16core-64gb
             env: {}
diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-15/script.sh b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-15/script.sh
index 72a3cbf0596..8999983e428 100755
--- a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-15/script.sh
+++ b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-15/script.sh
@@ -4,7 +4,11 @@ set -ex
 
 # Only run the stage 1 tests on merges, not on PR CI jobs.
 if [[ -z "${PR_CI_JOB}" ]]; then
-    ../x.py --stage 1 test --skip src/tools/tidy --skip tests/codegen
+    if [[ "${SKIP_CODEGEN_TESTS}" == "1" ]]; then
+        ../x.py --stage 1 test --skip src/tools/tidy --skip tests/codegen
+    else
+        ../x.py --stage 1 test --skip src/tools/tidy
+    fi
 
     # Run the `mir-opt` tests again but this time for a 32-bit target.
     # This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have
@@ -20,7 +24,11 @@ if [[ -z "${PR_CI_JOB}" ]]; then
 fi
 
 # NOTE: intentionally uses all of `x.py`, `x`, and `x.ps1` to make sure they all work on Linux.
-../x.py --stage 2 test --skip src/tools/tidy --skip tests/codegen
+if [[ "${SKIP_CODEGEN_TESTS}" == "1" ]]; then
+    ../x.py --stage 2 test --skip src/tools/tidy --skip tests/codegen
+else
+    ../x.py --stage 2 test --skip src/tools/tidy
+fi
 
 # Run the `mir-opt` tests again but this time for a 32-bit target.
 # This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have
diff --git a/src/ci/docker/run.sh b/src/ci/docker/run.sh
index 0b535532f69..5e85bd14ea3 100755
--- a/src/ci/docker/run.sh
+++ b/src/ci/docker/run.sh
@@ -271,6 +271,7 @@ docker \
   run \
   --workdir /checkout/obj \
   --env SRC=/checkout \
+  --env "SKIP_CODEGEN_TESTS=$SKIP_CODEGEN_TESTS" \
   $args \
   --env CARGO_HOME=/cargo \
   --env DEPLOY \
diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml
index 2feb51920df..f5f02ba3216 100644
--- a/src/ci/github-actions/ci.yml
+++ b/src/ci/github-actions/ci.yml
@@ -332,6 +332,8 @@ jobs:
 
           - name: x86_64-gnu-llvm-15
             <<: *job-linux-16c
+            env:
+              SKIP_CODEGEN_TESTS: "1"
 
           - name: x86_64-gnu-tools
             <<: *job-linux-16c