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 # Work around https://github.com/actions/cache/issues/403 by using GNU tar
47 - name: Install GNU tar
48 if: matrix.os == 'macos-latest'
51 echo PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH" >> $GITHUB_ENV
53 - name: Install Rust toolchain
54 uses: actions-rs/toolchain@v1
59 components: rustfmt, rust-src
61 - name: Cache cargo directories
62 uses: actions/cache@v2
67 key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
69 - name: Cache cargo target dir
70 uses: actions/cache@v2
73 key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
76 run: cargo test --no-run --locked
79 run: cargo test -- --nocapture
82 run: cargo xtask pre-cache
84 # Weird targets to catch non-portable code
87 runs-on: ubuntu-latest
90 targets: "powerpc-unknown-linux-gnu x86_64-unknown-linux-musl"
93 - name: Checkout repository
94 uses: actions/checkout@v2
96 - name: Install Rust toolchain
97 uses: actions-rs/toolchain@v1
103 - name: Install Rust targets
104 run: rustup target add ${{ env.targets }}
106 - name: Cache cargo directories
107 uses: actions/cache@v2
112 key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
116 for target in ${{ env.targets }}; do
117 cargo check --target=$target --all-targets
125 os: [ubuntu-latest, windows-latest]
127 runs-on: ${{ matrix.os }}
130 - name: Checkout repository
131 uses: actions/checkout@v2
133 - name: Install Nodejs
134 uses: actions/setup-node@v1
139 working-directory: ./editors/code
141 # - run: npm audit || { sleep 10 && npm audit; } || { sleep 30 && npm audit; }
142 # if: runner.os == 'Linux'
143 # working-directory: ./editors/code
146 working-directory: ./editors/code
148 - name: Run vscode tests
149 uses: GabrielBB/xvfb-action@v1.2
153 run: npm --prefix ./editors/code test
154 # working-directory: ./editors/code # does not work: https://github.com/GabrielBB/xvfb-action/issues/8
156 - run: npm run package --scripts-prepend-node-path
157 working-directory: ./editors/code