15 RUSTFLAGS: "-D warnings -W unreachable-pub"
16 RUSTUP_MAX_RETRIES: 10
21 runs-on: ${{ matrix.os }}
28 os: [ubuntu-latest, windows-latest, macos-latest]
31 - name: Checkout repository
32 uses: actions/checkout@v2
34 ref: ${{ github.event.pull_request.head.sha }}
37 # We need to disable the existing toolchain to avoid updating rust-docs
38 # which takes a long time. The fastest way to do this is to rename the
39 # existing folder, as deleting it takes about as much time as not doing
40 # anything and just updating rust-docs.
41 - name: Rename existing rust toolchain (Windows)
42 if: matrix.os == 'windows-latest'
43 run: Rename-Item C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc C:\Users\runneradmin\.rustup\toolchains\stable-x86_64-pc-windows-msvc.old
45 - name: Install Rust toolchain
46 uses: actions-rs/toolchain@v1
51 components: rustfmt, rust-src
53 - name: Cache Dependencies
54 uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72
57 run: cargo test --no-run --locked
60 run: cargo test -- --nocapture
62 # Weird targets to catch non-portable code
65 runs-on: ubuntu-latest
68 targets: "powerpc-unknown-linux-gnu x86_64-unknown-linux-musl"
69 # The rust-analyzer binary is not expected to compile on WASM, but the IDE
71 targets_ide: "wasm32-unknown-unknown"
74 - name: Checkout repository
75 uses: actions/checkout@v2
77 - name: Install Rust toolchain
78 uses: actions-rs/toolchain@v1
84 - name: Install Rust targets
85 run: rustup target add ${{ env.targets }} ${{ env.targets_ide }}
87 - name: Cache Dependencies
88 uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72
92 for target in ${{ env.targets }}; do
93 cargo check --target=$target --all-targets
95 for target in ${{ env.targets_ide }}; do
96 cargo check -p ide --target=$target --all-targets
104 os: [ubuntu-latest, windows-latest]
106 runs-on: ${{ matrix.os }}
109 - name: Checkout repository
110 uses: actions/checkout@v2
112 - name: Install Nodejs
113 uses: actions/setup-node@v1
118 working-directory: ./editors/code
120 # - run: npm audit || { sleep 10 && npm audit; } || { sleep 30 && npm audit; }
121 # if: runner.os == 'Linux'
122 # working-directory: ./editors/code
125 working-directory: ./editors/code
127 - name: Run vscode tests
128 uses: GabrielBB/xvfb-action@v1.2
132 run: npm --prefix ./editors/code test
133 # working-directory: ./editors/code # does not work: https://github.com/GabrielBB/xvfb-action/issues/8
135 - run: npm run package --scripts-prepend-node-path
136 working-directory: ./editors/code