mirror of
https://github.com/denoland/rusty_v8.git
synced 2024-11-28 16:21:04 -05:00
86 lines
3 KiB
YAML
86 lines
3 KiB
YAML
name: ci
|
|
|
|
on: [pull_request] # TODO(ry) [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
name: ${{ matrix.kind }} ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 60
|
|
strategy:
|
|
matrix:
|
|
os: [macOS-10.14, windows-2019, 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 rust
|
|
uses: hecrj/setup-rust-action@v1
|
|
with:
|
|
rust-version: "1.38.0"
|
|
|
|
- name: Install python
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: "2.7.16"
|
|
|
|
- name: Environment (common)
|
|
run: |
|
|
echo ::set-env name=GH_ACTIONS::1
|
|
echo ::set-env name=RUSTC_WRAPPER::sccache
|
|
echo ::set-env name=DENO_BUILD_MODE::release
|
|
|
|
- name: Environment (linux)
|
|
if: startsWith(matrix.os, 'ubuntu')
|
|
# In order to test the installer scripts in std we need a deno
|
|
# executable in the path. See
|
|
# https://github.com/denoland/deno/blob/27cd2c97f18c0392bc04c66b786717b2bc677315/std/installer/mod.ts#L185-L193
|
|
# TODO(ry) This path modification should rather be done in "cargo test".
|
|
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/
|
|
echo ::add-path::`pwd`/third_party/sscache/linux64
|
|
echo ::add-path::`pwd`/target/release
|
|
|
|
- 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: |
|
|
# These appear unnecessary:
|
|
#choco install curl
|
|
#choco install archive
|
|
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\
|
|
echo ::add-path::$(pwd)\target\release
|
|
|
|
- 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: Build
|
|
run: cargo build -vv --release --locked --all-targets
|
|
|
|
- name: Test
|
|
if: matrix.kind == 'test'
|
|
run: cargo test -vv --release --locked --all-targets
|
|
|
|
- name: Clippy
|
|
run: cargo clippy --all-targets --release --locked -- -D clippy::all
|