summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_codegen_cranelift/.github/workflows/nightly-cranelift.yml
blob: d0d58d2a7eacbd19a07442af167bdb0e2926274a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Test nightly Cranelift

on:
  push:
  schedule:
    - cron: '17 1 * * *' # At 01:17 UTC every day.

jobs:
  build:
    runs-on: ubuntu-latest
    timeout-minutes: 60

    steps:
    - uses: actions/checkout@v3

    - name: Cache cargo installed crates
      uses: actions/cache@v3
      with:
        path: ~/.cargo/bin
        key: ubuntu-latest-cargo-installed-crates

    - name: Prepare dependencies
      run: |
        git config --global user.email "user@example.com"
        git config --global user.name "User"
        ./y.rs prepare

    - name: Patch Cranelift
      run: |
        sed -i 's/cranelift-codegen = { version = "\w*.\w*.\w*", features = \["unwind", "all-arch"\] }/cranelift-codegen = { git = "https:\/\/github.com\/bytecodealliance\/wasmtime.git", features = ["unwind", "all-arch"] }/' Cargo.toml
        sed -i 's/cranelift-frontend = "\w*.\w*.\w*"/cranelift-frontend = { git = "https:\/\/github.com\/bytecodealliance\/wasmtime.git" }/' Cargo.toml
        sed -i 's/cranelift-module = "\w*.\w*.\w*"/cranelift-module = { git = "https:\/\/github.com\/bytecodealliance\/wasmtime.git" }/' Cargo.toml
        sed -i 's/cranelift-native = "\w*.\w*.\w*"/cranelift-native = { git = "https:\/\/github.com\/bytecodealliance\/wasmtime.git" }/' Cargo.toml
        sed -i 's/cranelift-jit = { version = "\w*.\w*.\w*", optional = true }/cranelift-jit = { git = "https:\/\/github.com\/bytecodealliance\/wasmtime.git", optional = true }/' Cargo.toml
        sed -i 's/cranelift-object = "\w*.\w*.\w*"/cranelift-object = { git = "https:\/\/github.com\/bytecodealliance\/wasmtime.git" }/' Cargo.toml

        sed -i 's/object = { version = "0.27.0"/object = { version = "0.28.0"/' Cargo.toml

        cat Cargo.toml

    - name: Build without unstable features
      # This is the config rust-lang/rust uses for builds
      run: ./y.rs build --no-unstable-features

    - name: Build
      run: ./y.rs build --sysroot none
    - name: Test
      run: |
        # Enable backtraces for easier debugging
        export RUST_BACKTRACE=1

        # Reduce amount of benchmark runs as they are slow
        export COMPILE_RUNS=2
        export RUN_RUNS=2

        # Enable extra checks
        export CG_CLIF_ENABLE_VERIFIER=1

        ./test.sh