about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/.github/workflows
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2023-06-15 17:56:01 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2023-06-15 17:56:01 +0000
commit82b497286d209b50f939ecb4f16dc1e72fcfda95 (patch)
treefc39aff3da7ab89bad516b92950ce3ea1b67336f /compiler/rustc_codegen_cranelift/.github/workflows
parentf9097f87c9c094f80826fb60a1a624b5f9f1ed82 (diff)
parent8830dccd1d4c74f1f69b0d3bd982a3f1fcde5807 (diff)
Merge commit '8830dccd1d4c74f1f69b0d3bd982a3f1fcde5807' into sync_cg_clif-2023-06-15
Diffstat (limited to 'compiler/rustc_codegen_cranelift/.github/workflows')
-rw-r--r--compiler/rustc_codegen_cranelift/.github/workflows/abi-cafe.yml6
-rw-r--r--compiler/rustc_codegen_cranelift/.github/workflows/main.yml60
-rw-r--r--compiler/rustc_codegen_cranelift/.github/workflows/rustc.yml4
3 files changed, 50 insertions, 20 deletions
diff --git a/compiler/rustc_codegen_cranelift/.github/workflows/abi-cafe.yml b/compiler/rustc_codegen_cranelift/.github/workflows/abi-cafe.yml
index 3c40555669c..12aa69d3c79 100644
--- a/compiler/rustc_codegen_cranelift/.github/workflows/abi-cafe.yml
+++ b/compiler/rustc_codegen_cranelift/.github/workflows/abi-cafe.yml
@@ -46,12 +46,12 @@ jobs:
       run: rustup set default-host x86_64-pc-windows-gnu
 
     - name: Prepare dependencies
-      run: ./y.rs prepare
+      run: ./y.sh prepare
 
     - name: Build
-      run: ./y.rs build --sysroot none
+      run: ./y.sh build --sysroot none
 
     - name: Test abi-cafe
       env:
         TARGET_TRIPLE: ${{ matrix.env.TARGET_TRIPLE }}
-      run: ./y.rs abi-cafe
+      run: ./y.sh abi-cafe
diff --git a/compiler/rustc_codegen_cranelift/.github/workflows/main.yml b/compiler/rustc_codegen_cranelift/.github/workflows/main.yml
index e4af73ea644..8e6c1e8ade0 100644
--- a/compiler/rustc_codegen_cranelift/.github/workflows/main.yml
+++ b/compiler/rustc_codegen_cranelift/.github/workflows/main.yml
@@ -19,7 +19,7 @@ jobs:
     - name: Rustfmt
       run: |
         cargo fmt --check
-        rustfmt --check build_system/mod.rs
+        rustfmt --check build_system/main.rs
         rustfmt --check example/*
 
 
@@ -91,22 +91,52 @@ jobs:
         sudo apt-get install -y gcc-s390x-linux-gnu qemu-user
 
     - name: Prepare dependencies
-      run: ./y.rs prepare
+      run: ./y.sh prepare
+
+    - name: Build
+      run: ./y.sh build --sysroot none
 
-    - name: Build without unstable features
+    - name: Test
       env:
         TARGET_TRIPLE: ${{ matrix.env.TARGET_TRIPLE }}
-      # This is the config rust-lang/rust uses for builds
-      run: ./y.rs build --no-unstable-features
+      run: ./y.sh test
 
-    - name: Build
-      run: ./y.rs build --sysroot none
+    - name: Install LLVM standard library
+      run: rustup target add ${{ matrix.env.TARGET_TRIPLE }}
 
-    - name: Test
+    # This is roughly config rust-lang/rust uses for testing
+    - name: Test with LLVM sysroot
+      # Skip native x86_64-pc-windows-gnu. It is way too slow and cross-compiled
+      # x86_64-pc-windows-gnu covers at least part of the tests.
+      if: matrix.os != 'windows-latest' || matrix.env.TARGET_TRIPLE != 'x86_64-pc-windows-gnu'
       env:
         TARGET_TRIPLE: ${{ matrix.env.TARGET_TRIPLE }}
-      run: ./y.rs test
+      run: ./y.sh test --sysroot llvm --no-unstable-features
+
+
+  # This job doesn't use cg_clif in any way. It checks that all cg_clif tests work with cg_llvm too.
+  test_llvm:
+    runs-on: ubuntu-latest
+    timeout-minutes: 60
+
+    defaults:
+      run:
+        shell: bash
 
+    steps:
+    - uses: actions/checkout@v3
+
+    - name: Prepare dependencies
+      run: ./y.rs prepare
+
+    - name: Disable JIT tests
+      run: |
+        sed -i 's/jit./#jit./' config.txt
+
+    - name: Test
+      env:
+        TARGET_TRIPLE: x86_64-unknown-linux-gnu
+      run: ./y.rs test --use-backend llvm
 
   bench:
     runs-on: ubuntu-latest
@@ -135,13 +165,13 @@ jobs:
       run: cargo install hyperfine || true
 
     - name: Prepare dependencies
-      run: ./y.rs prepare
+      run: ./y.sh prepare
 
     - name: Build
-      run: CI_OPT=1 ./y.rs build --sysroot none
+      run: CI_OPT=1 ./y.sh build --sysroot none
 
     - name: Benchmark
-      run: CI_OPT=1 ./y.rs bench
+      run: CI_OPT=1 ./y.sh bench
 
 
   dist:
@@ -194,13 +224,13 @@ jobs:
         sudo apt-get install -y gcc-mingw-w64-x86-64 wine-stable
 
     - name: Prepare dependencies
-      run: ./y.rs prepare
+      run: ./y.sh prepare
 
     - name: Build backend
-      run: CI_OPT=1 ./y.rs build --sysroot none
+      run: CI_OPT=1 ./y.sh build --sysroot none
 
     - name: Build sysroot
-      run: CI_OPT=1 ./y.rs build
+      run: CI_OPT=1 ./y.sh build
 
     - name: Package prebuilt cg_clif
       run: tar cvfJ cg_clif.tar.xz dist
diff --git a/compiler/rustc_codegen_cranelift/.github/workflows/rustc.yml b/compiler/rustc_codegen_cranelift/.github/workflows/rustc.yml
index b2f772c4fc4..b49dc3aff7a 100644
--- a/compiler/rustc_codegen_cranelift/.github/workflows/rustc.yml
+++ b/compiler/rustc_codegen_cranelift/.github/workflows/rustc.yml
@@ -18,7 +18,7 @@ jobs:
         key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
 
     - name: Prepare dependencies
-      run: ./y.rs prepare
+      run: ./y.sh prepare
 
     - name: Test
       run: ./scripts/test_bootstrap.sh
@@ -38,7 +38,7 @@ jobs:
         key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
 
     - name: Prepare dependencies
-      run: ./y.rs prepare
+      run: ./y.sh prepare
 
     - name: Test
       run: ./scripts/test_rustc_tests.sh