diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d86a8475..038635ef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,15 +21,6 @@ jobs: - uses: actions/checkout@v2 with: submodules: 'recursive' - - name: Cache cargo build - uses: actions/cache@v1 - env: - cache-name: cargo-build-target - with: - path: aw-server-rust/target - key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-${{ env.cache-name }}- - name: Set up Python uses: actions/setup-python@v1 with: @@ -38,12 +29,34 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node_version }} - - name: Install minimal Rust nightly (no clippy or rustfmt) + - name: Set up Rust nightly uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: nightly override: true + - name: Get npm cache dir + id: npm-cache-dir + run: | + echo "::set-output name=dir::$(npm config get cache)" + - uses: actions/cache@v1 + name: Cache npm + env: + cache-name: node + with: + path: ${{ steps.npm-cache-dir.outputs.dir }} + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-${{ env.cache-name }}- + - name: Cache cargo build + uses: actions/cache@v1 + env: + cache-name: cargo-build-target + with: + path: aw-server-rust/target + key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-${{ env.cache-name }}- - name: Create virtualenv shell: bash run: |