15 RUSTFLAGS: -D warnings
16 RUSTUP_MAX_RETRIES: 10
20 name: Audit Rust vulnerabilities
21 runs-on: ubuntu-latest
23 - name: Checkout repository
24 uses: actions/checkout@v2
26 - uses: actions-rs/install@v0.1
35 runs-on: ${{ matrix.os }}
42 os: [ubuntu-latest, windows-latest, macos-latest]
45 - name: Checkout repository
46 uses: actions/checkout@v2
48 # We need to disable the existing toolchain to avoid updating rust-docs
49 # which takes a long time. The fastest way to do this is to rename the
50 # existing folder, as deleting it takes about as much time as not doing
51 # anything and just updating rust-docs.
52 - name: Rename existing rust toolchain (Windows)
53 if: matrix.os == 'windows-latest'
54 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
56 - name: Install Rust toolchain
57 uses: actions-rs/toolchain@v1
62 components: rustfmt, rust-src
64 - if: matrix.os == 'ubuntu-latest'
65 run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/
67 - name: Cache cargo directories
68 uses: actions/cache@v2
73 key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
75 - name: Cache cargo target dir
76 uses: actions/cache@v2
79 key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
82 run: cargo test --no-run --locked
88 run: cargo xtask pre-cache
90 - name: Prepare cache 2
91 if: matrix.os == 'windows-latest'
92 run: Remove-Item ./target/debug/xtask.exe, ./target/debug/deps/xtask.exe
94 # Weird target to catch non-portable code
97 runs-on: ubuntu-latest
100 - name: Checkout repository
101 uses: actions/checkout@v2
103 - name: Install Rust toolchain
104 uses: actions-rs/toolchain@v1
109 target: 'powerpc-unknown-linux-gnu'
111 - run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/
113 - name: Cache cargo directories
114 uses: actions/cache@v2
119 key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
122 run: cargo check --target=powerpc-unknown-linux-gnu --all-targets
129 os: [ubuntu-latest, windows-latest, macos-latest]
131 runs-on: ${{ matrix.os }}
134 - name: Checkout repository
135 uses: actions/checkout@v2
137 - name: Install Nodejs
138 uses: actions/setup-node@v1
143 working-directory: ./editors/code
145 # - run: npm audit || { sleep 10 && npm audit; } || { sleep 30 && npm audit; }
146 # if: runner.os == 'Linux'
147 # working-directory: ./editors/code
150 working-directory: ./editors/code
152 - name: Run vscode tests
153 uses: GabrielBB/xvfb-action@v1.2
157 run: npm --prefix ./editors/code test
158 # working-directory: ./editors/code # does not work: https://github.com/GabrielBB/xvfb-action/issues/8
160 - run: npm run package --scripts-prepend-node-path
161 working-directory: ./editors/code