1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

merge build.yml and lint.yml (#3066)

Fixes #3063
This commit is contained in:
Ryan Riginding 2019-10-05 09:17:18 +02:00 committed by Ryan Dahl
parent b81e5db17a
commit 2a02107bba
2 changed files with 23 additions and 52 deletions

View file

@ -10,12 +10,16 @@ jobs:
strategy:
matrix:
os: [macOS-10.14, windows-2016, ubuntu-16.04]
kind: ['test', 'bench']
kind: ['test', 'bench', 'lint']
exclude:
- os: windows-2016
kind: 'bench'
- os: windows-2016
kind: 'lint'
- os: macOS-10.14
kind: 'bench'
- os: macOS-10.14
kind: 'lint'
steps:
- name: Configure git
run: git config --global core.symlinks true
@ -31,6 +35,12 @@ jobs:
with:
rust-version: "1.38.0"
- name: Install clippy and rustfmt
if: matrix.kind == 'lint'
run: |
rustup component add clippy
rustup component add rustfmt
- name: Install python
uses: actions/setup-python@v1
with:
@ -76,6 +86,18 @@ jobs:
SCCACHE_IDLE_TIMEOUT: 0
run: sccache --start-server
- name: lint.py
if: matrix.kind == 'lint'
run: python ./tools/lint.py
- name: test_format.py
if: matrix.kind == 'lint'
run: python ./tools/test_format.py
- name: Clippy
if: matrix.kind == 'lint'
run: cargo clippy --all-targets --release --locked -- -D clippy::all
- name: Build
run: cargo build --release --locked --all-targets

View file

@ -1,51 +0,0 @@
name: lint
on: [push, pull_request]
jobs:
clippy:
name: lint
runs-on: ubuntu-16.04
steps:
- name: Configure git
run: git config --global core.symlinks true
- name: Clone repository
uses: actions/checkout@v1
with:
fetch-depth: 1
submodules: true
- name: Install clippy and rustfmt
run: |
rustup component add clippy
rustup component add rustfmt
- name: Environment
run: |
echo ::set-env name=RUSTC_WRAPPER::sccache
echo ::set-env name=DENO_BUILD_MODE::release
echo ::add-path::`pwd`/prebuilt/linux64
- name: Run setup.py
run: python ./tools/setup.py
- name: Start sccache
env:
AWS_ACCESS_KEY_ID: AKIAIVRN52PLDBP55LBQ
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SCCACHE_BUCKET: deno-sccache
SCCACHE_IDLE_TIMEOUT: 0
run: sccache --start-server
- name: lint.py
run: python ./tools/lint.py
- name: test_format.py
run: python ./tools/test_format.py
- name: Clippy
run: cargo clippy --all-targets --release --locked -- -D clippy::all
- name: Stop sccache
run: sccache --stop-server