15 RUSTFLAGS: -D warnings
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 # We need to disable the existing toolchain to avoid updating rust-docs
35 # which takes a long time. The fastest way to do this is to rename the
36 # existing folder, as deleting it takes about as much time as not doing
37 # anything and just updating rust-docs.
38 - name: Rename existing rust toolchain (Windows)
39 if: matrix.os == 'windows-latest'
40 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
42 - name: Install Rust toolchain
43 uses: actions-rs/toolchain@v1
48 components: rustfmt, rust-src
50 - name: Cache cargo directories
51 uses: actions/cache@v2
56 key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
58 - name: Cache cargo target dir
59 uses: actions/cache@v2
62 key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
65 run: cargo test --no-run --locked
71 run: cargo xtask pre-cache
73 # Weird targets to catch non-portable code
76 runs-on: ubuntu-latest
79 targets: "powerpc-unknown-linux-gnu x86_64-unknown-linux-musl"
82 - name: Checkout repository
83 uses: actions/checkout@v2
85 - name: Install Rust toolchain
86 uses: actions-rs/toolchain@v1
92 - name: Install Rust targets
93 run: rustup target add ${{ env.targets }}
95 - name: Cache cargo directories
96 uses: actions/cache@v2
101 key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
105 for target in ${{ env.targets }}; do
106 cargo check --target=$target --all-targets
114 os: [ubuntu-latest, windows-latest]
116 runs-on: ${{ matrix.os }}
119 - name: Checkout repository
120 uses: actions/checkout@v2
122 - name: Install Nodejs
123 uses: actions/setup-node@v1
128 working-directory: ./editors/code
130 # - run: npm audit || { sleep 10 && npm audit; } || { sleep 30 && npm audit; }
131 # if: runner.os == 'Linux'
132 # working-directory: ./editors/code
135 working-directory: ./editors/code
137 - name: Run vscode tests
138 uses: GabrielBB/xvfb-action@v1.2
142 run: npm --prefix ./editors/code test
143 # working-directory: ./editors/code # does not work: https://github.com/GabrielBB/xvfb-action/issues/8
145 - run: npm run package --scripts-prepend-node-path
146 working-directory: ./editors/code