mirror of
https://github.com/enso-org/enso.git
synced 2024-12-21 07:21:30 +03:00
692432e498
File size checking
Original commit: cce31b31ae
127 lines
3.5 KiB
YAML
127 lines
3.5 KiB
YAML
name: Build (MacOS, Linux, Windows)
|
|
|
|
on: [push]
|
|
|
|
# Please check if all components are available before updating the rust toolchain version.
|
|
# https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu.html
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [windows-latest, macOS-latest, ubuntu-latest]
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: Install Rust Nightly Toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: nightly-2019-11-04
|
|
override: true
|
|
- name: Run cargo check
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: check
|
|
|
|
test:
|
|
name: Tests
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [windows-latest,macOS-latest,ubuntu-latest]
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: nightly-2019-11-04
|
|
override: true
|
|
- name: Install wasm-pack
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: install
|
|
args: wasm-pack
|
|
- name: Run tests
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
- name: Install Firefox
|
|
run: brew cask install firefox
|
|
if: runner.os == 'macOS'
|
|
- name: Run wasm-pack tests
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: run
|
|
args: >
|
|
--manifest-path=script/rust/Cargo.toml
|
|
--bin test-all
|
|
-- --headless --firefox
|
|
|
|
size:
|
|
name: Check size
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: Install Rust Nightly Toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: nightly-2019-11-04
|
|
override: true
|
|
- name: Install wasm-pack
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: install
|
|
args: wasm-pack --version 0.8.1
|
|
- name: Compile to WASM
|
|
run: ./script/build.sh
|
|
- name: Minimize WASM
|
|
run: ./script/minimize_wasm.sh > file_size
|
|
- name: Check WASM size
|
|
run: ./script/assert_max_wasm_size.sh
|
|
|
|
clippy:
|
|
name: Linter
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: nightly-2019-11-04
|
|
override: true
|
|
- run: rustup component add clippy
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: clippy
|
|
args: -- -D warnings
|
|
|
|
coverage:
|
|
name: Coverage
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: Install Rust Nightly Toolchain
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: nightly-2019-11-04
|
|
override: true
|
|
- name: Generate test profile
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --all-features --no-fail-fast
|
|
env:
|
|
'CARGO_INCREMENTAL': '0'
|
|
'RUSTFLAGS': '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads'
|
|
- name: Generate coverage report
|
|
id: coverage
|
|
uses: actions-rs/grcov@v0.1
|
|
- name: list all /tmp files
|
|
run: ls -la /tmp
|
|
- name: show the coverage report
|
|
run: cat ${{ steps.coverage.outputs.report }}
|
|
- name: Upload coverage report
|
|
uses: codecov/codecov-action@v1.0.2
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
file: ./lcov.info
|