]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_codegen_cranelift/.github/workflows/main.yml
Rollup merge of #80193 - zseri:stabilize-osstring-ascii, r=m-ou-se
[rust.git] / compiler / rustc_codegen_cranelift / .github / workflows / main.yml
1 name: CI
2
3 on:
4   - push
5   - pull_request
6
7 jobs:
8   build:
9     runs-on: ${{ matrix.os }}
10
11     strategy:
12       fail-fast: false
13       matrix:
14         os: [ubuntu-latest, macos-latest]
15
16     steps:
17     - uses: actions/checkout@v2
18
19     - name: Cache cargo installed crates
20       uses: actions/cache@v2
21       with:
22         path: ~/.cargo/bin
23         key: ${{ runner.os }}-cargo-installed-crates
24
25     - name: Cache cargo registry and index
26       uses: actions/cache@v2
27       with:
28         path: |
29             ~/.cargo/registry
30             ~/.cargo/git
31         key: ${{ runner.os }}-cargo-registry-and-index-${{ hashFiles('**/Cargo.lock') }}
32
33     - name: Cache cargo target dir
34       uses: actions/cache@v2
35       with:
36         path: target
37         key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain', '**/Cargo.lock') }}
38
39     - name: Prepare dependencies
40       run: |
41         git config --global user.email "user@example.com"
42         git config --global user.name "User"
43         ./prepare.sh
44
45     - name: Test
46       run: |
47         # Enable backtraces for easier debugging
48         export RUST_BACKTRACE=1
49
50         # Reduce amount of benchmark runs as they are slow
51         export COMPILE_RUNS=2
52         export RUN_RUNS=2
53
54         ./test.sh
55
56     - name: Package prebuilt cg_clif
57       run: tar cvfJ cg_clif.tar.xz build
58
59     - name: Upload prebuilt cg_clif
60       uses: actions/upload-artifact@v2
61       with:
62         name: cg_clif-${{ runner.os }}
63         path: cg_clif.tar.xz