15 RUSTFLAGS: -D warnings
16 RUSTUP_MAX_RETRIES: 10
20 name: Audit Rust vulnerabilities
21 runs-on: ubuntu-latest
23 - name: Install Rust toolchain
24 uses: actions-rs/toolchain@v1
30 - name: Checkout repository
31 uses: actions/checkout@v2
33 - run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/
36 uses: actions/cache@v1
39 key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
41 - run: cargo install cargo-audit
46 runs-on: ${{ matrix.os }}
53 os: [ubuntu-latest, windows-latest, macos-latest]
56 - name: Checkout repository
57 uses: actions/checkout@v2
59 # We need to disable the existing toolchain to avoid updating rust-docs
60 # which takes a long time. The fastest way to do this is to rename the
61 # existing folder, as deleting it takes about as much time as not doing
62 # anything and just updating rust-docs.
63 - name: Rename existing rust toolchain (Windows)
64 if: matrix.os == 'windows-latest'
65 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
67 - name: Install Rust toolchain
68 uses: actions-rs/toolchain@v1
73 components: rustfmt, rust-src
75 - if: matrix.os == 'ubuntu-latest'
76 run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/
78 - name: Cache cargo registry
79 uses: actions/cache@v1
81 path: ~/.cargo/registry
82 key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
84 - name: Cache cargo index
85 uses: actions/cache@v1
88 key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
90 - name: Cache cargo target dir
91 uses: actions/cache@v1
94 key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
97 run: cargo test --no-run
102 - name: Prepare cache
103 run: cargo xtask pre-cache
105 - name: Prepare cache 2
106 if: matrix.os == 'windows-latest'
107 run: Remove-Item ./target/debug/xtask.exe, ./target/debug/deps/xtask.exe
111 runs-on: ubuntu-latest
113 - name: Checkout repository
114 uses: actions/checkout@v2
116 - name: Install Nodejs
117 uses: actions/setup-node@v1
122 working-directory: ./editors/code
124 - run: npm audit || { sleep 10 && npm audit; } || { sleep 30 && npm audit; }
125 working-directory: ./editors/code
128 working-directory: ./editors/code
130 - run: npm run package --scripts-prepend-node-path
131 working-directory: ./editors/code