|
| 1 | +name: Test nightly Cranelift |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + schedule: |
| 6 | + - cron: '1 17 * * *' # At 01:17 UTC every day. |
| 7 | + |
| 8 | +jobs: |
| 9 | + build: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + timeout-minutes: 60 |
| 12 | + |
| 13 | + steps: |
| 14 | + - uses: actions/checkout@v2 |
| 15 | + |
| 16 | + - name: Cache cargo installed crates |
| 17 | + uses: actions/cache@v2 |
| 18 | + with: |
| 19 | + path: ~/.cargo/bin |
| 20 | + key: ubuntu-latest-cargo-installed-crates |
| 21 | + |
| 22 | + - name: Prepare dependencies |
| 23 | + run: | |
| 24 | + git config --global user.email "[email protected]" |
| 25 | + git config --global user.name "User" |
| 26 | + ./y.rs prepare |
| 27 | +
|
| 28 | + - name: Patch Cranelift |
| 29 | + run: | |
| 30 | + 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 |
| 31 | + sed -i 's/cranelift-frontend = "\w*.\w*.\w*"/cranelift-frontend = { git = "https:\/\/github.com\/bytecodealliance\/wasmtime.git" }/' Cargo.toml |
| 32 | + sed -i 's/cranelift-module = "\w*.\w*.\w*"/cranelift-module = { git = "https:\/\/github.com\/bytecodealliance\/wasmtime.git" }/' Cargo.toml |
| 33 | + sed -i 's/cranelift-native = "\w*.\w*.\w*"/cranelift-native = { git = "https:\/\/github.com\/bytecodealliance\/wasmtime.git" }/' Cargo.toml |
| 34 | + sed -i 's/cranelift-jit = { version = "\w*.\w*.\w*", optional = true }/cranelift-jit = { git = "https:\/\/github.com\/bytecodealliance\/wasmtime.git", optional = true }/' Cargo.toml |
| 35 | + sed -i 's/cranelift-object = "\w*.\w*.\w*"/cranelift-object = { git = "https:\/\/github.com\/bytecodealliance\/wasmtime.git" }/' Cargo.toml |
| 36 | +
|
| 37 | + sed -i 's/gimli = { version = "0.25.0", default-features = false, features = \["write"\]}/gimli = { version = "0.26.1", default-features = false, features = ["write"] }/' Cargo.toml |
| 38 | +
|
| 39 | + cat Cargo.toml |
| 40 | +
|
| 41 | + - name: Build without unstable features |
| 42 | + # This is the config rust-lang/rust uses for builds |
| 43 | + run: ./y.rs build --no-unstable-features |
| 44 | + |
| 45 | + - name: Build |
| 46 | + run: ./y.rs build --sysroot none |
| 47 | + - name: Test |
| 48 | + run: | |
| 49 | + # Enable backtraces for easier debugging |
| 50 | + export RUST_BACKTRACE=1 |
| 51 | +
|
| 52 | + # Reduce amount of benchmark runs as they are slow |
| 53 | + export COMPILE_RUNS=2 |
| 54 | + export RUN_RUNS=2 |
| 55 | +
|
| 56 | + # Enable extra checks |
| 57 | + export CG_CLIF_ENABLE_VERIFIER=1 |
| 58 | +
|
| 59 | + ./test.sh |
0 commit comments