]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_codegen_cranelift/.github/workflows/rustc.yml
drive-by: Fix path spans
[rust.git] / compiler / rustc_codegen_cranelift / .github / workflows / rustc.yml
1 name: Various rustc tests
2
3 on:
4   - push
5
6 jobs:
7   bootstrap_rustc:
8     runs-on: ubuntu-latest
9
10     steps:
11     - uses: actions/checkout@v3
12
13     - name: Cache cargo installed crates
14       uses: actions/cache@v2
15       with:
16         path: ~/.cargo/bin
17         key: ${{ runner.os }}-cargo-installed-crates
18
19     - name: Cache cargo registry and index
20       uses: actions/cache@v2
21       with:
22         path: |
23             ~/.cargo/registry
24             ~/.cargo/git
25         key: ${{ runner.os }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }}
26
27     - name: Cache cargo target dir
28       uses: actions/cache@v2
29       with:
30         path: target
31         key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
32
33     - name: Prepare dependencies
34       run: |
35         git config --global user.email "user@example.com"
36         git config --global user.name "User"
37         ./y.rs prepare
38
39     - name: Test
40       run: |
41         # Enable backtraces for easier debugging
42         export RUST_BACKTRACE=1
43
44         ./scripts/test_bootstrap.sh
45   rustc_test_suite:
46     runs-on: ubuntu-latest
47
48     steps:
49     - uses: actions/checkout@v3
50
51     - name: Cache cargo installed crates
52       uses: actions/cache@v2
53       with:
54         path: ~/.cargo/bin
55         key: ${{ runner.os }}-cargo-installed-crates
56
57     - name: Cache cargo registry and index
58       uses: actions/cache@v2
59       with:
60         path: |
61             ~/.cargo/registry
62             ~/.cargo/git
63         key: ${{ runner.os }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }}
64
65     - name: Cache cargo target dir
66       uses: actions/cache@v2
67       with:
68         path: target
69         key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
70
71     - name: Prepare dependencies
72       run: |
73         git config --global user.email "user@example.com"
74         git config --global user.name "User"
75         ./y.rs prepare
76
77     - name: Test
78       run: |
79         # Enable backtraces for easier debugging
80         export RUST_BACKTRACE=1
81
82         ./scripts/test_rustc_tests.sh