name: ci on: [push, pull_request] jobs: build: name: ${{ matrix.kind }} ${{ matrix.os }} runs-on: ${{ matrix.os }} timeout-minutes: 60 strategy: matrix: os: [macOS-latest, ubuntu-16.04, windows-2019] steps: - name: Configure git run: git config --global core.symlinks true - name: Clone repository uses: actions/checkout@v1 with: fetch-depth: 10 submodules: true - name: Install rust uses: hecrj/setup-rust-action@v1 with: rust-version: "1.38.0" - name: Remove unused versions of Python # Depot_tools brings its own Python and bootstraps virtualenv. The # latter fails on windows when unused versions of Python are in present # in PATH, so we remove those. # 🤯 Removing items from PATH does not seem possible on Github Actions, # not even by using `echo ::set-env name=PATH`, so we have to rename # or delete the actual Python directories. if: startsWith(matrix.os, 'windows') run: |- $env:PATH -split ";" | Where-Object { Test-Path "$_\python.exe" } | ForEach-Object { Move-Item "$_" "$_.disabled" } - name: Environment (common) run: echo ::set-env name=RUSTC_WRAPPER::sccache - name: Environment (linux) if: startsWith(matrix.os, 'ubuntu') run: | curl -LO https://github.com/mozilla/sccache/releases/download/0.2.12/sccache-0.2.12-x86_64-unknown-linux-musl.tar.gz tar -xzvf sccache-0.2.12-x86_64-unknown-linux-musl.tar.gz echo ::add-path::`pwd`/sccache-0.2.12-x86_64-unknown-linux-musl/ - name: Environment (mac) if: startsWith(matrix.os, 'macOS') run: | curl -LO https://github.com/mozilla/sccache/releases/download/0.2.12/sccache-0.2.12-x86_64-apple-darwin.tar.gz tar -xzvf sccache-0.2.12-x86_64-apple-darwin.tar.gz echo ::add-path::`pwd`/sccache-0.2.12-x86_64-apple-darwin/ - name: Environment (windows) if: startsWith(matrix.os, 'windows') run: | curl -LO https://github.com/mozilla/sccache/releases/download/0.2.12/sccache-0.2.12-x86_64-pc-windows-msvc.tar.gz tar -zxvf sccache-0.2.12-x86_64-pc-windows-msvc.tar.gz echo ::add-path::$(pwd)\sccache-0.2.12-x86_64-pc-windows-msvc\ - name: Start sccache env: AWS_ACCESS_KEY_ID: AKIA6QEJVNZDGHRMR2KF AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} SCCACHE_BUCKET: deno-sccache SCCACHE_IDLE_TIMEOUT: 0 run: sccache --start-server - name: Build run: | git --version cargo build -vv --release --locked --all-targets - name: Test run: cargo test -vv --release --locked --all-targets - name: Clippy run: | rustup component add clippy cargo clippy --all-targets --release --locked -- -D clippy::all - name: Stop sccache run: sccache --stop-server # TODO cpplint