]> git.lizzy.rs Git - rust.git/blob - .github/workflows/nightly-cranelift.yml
Use sparse cargo registry
[rust.git] / .github / workflows / nightly-cranelift.yml
1 name: Test nightly Cranelift
2
3 on:
4   push:
5   schedule:
6     - cron: '17 1 * * *' # 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@v3
15
16     - name: Use sparse cargo registry
17       run: |
18         cat >> ~/.cargo/config.toml <<EOF
19         [unstable]
20         sparse-registry = true
21         EOF
22
23     - name: Prepare dependencies
24       run: |
25         git config --global user.email "user@example.com"
26         git config --global user.name "User"
27         ./y.rs prepare
28
29     - name: Patch Cranelift
30       run: |
31         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
32         sed -i 's/cranelift-frontend = "\w*.\w*.\w*"/cranelift-frontend = { git = "https:\/\/github.com\/bytecodealliance\/wasmtime.git" }/' Cargo.toml
33         sed -i 's/cranelift-module = "\w*.\w*.\w*"/cranelift-module = { git = "https:\/\/github.com\/bytecodealliance\/wasmtime.git" }/' Cargo.toml
34         sed -i 's/cranelift-native = "\w*.\w*.\w*"/cranelift-native = { git = "https:\/\/github.com\/bytecodealliance\/wasmtime.git" }/' Cargo.toml
35         sed -i 's/cranelift-jit = { version = "\w*.\w*.\w*", optional = true }/cranelift-jit = { git = "https:\/\/github.com\/bytecodealliance\/wasmtime.git", optional = true }/' Cargo.toml
36         sed -i 's/cranelift-object = "\w*.\w*.\w*"/cranelift-object = { git = "https:\/\/github.com\/bytecodealliance\/wasmtime.git" }/' Cargo.toml
37
38         sed -i 's/object = { version = "0.27.0"/object = { version = "0.28.0"/' Cargo.toml
39
40         cat Cargo.toml
41
42     - name: Build without unstable features
43       # This is the config rust-lang/rust uses for builds
44       run: ./y.rs build --no-unstable-features
45
46     - name: Build
47       run: ./y.rs build --sysroot none
48     - name: Test
49       run: ./test.sh