2019-10-07 15:15:41 +03:00
|
|
|
name: Build (MacOS, Linux, Windows)
|
|
|
|
|
|
|
|
on: [push]
|
|
|
|
|
2019-10-07 19:59:19 +03:00
|
|
|
# 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
|
2019-10-07 19:31:07 +03:00
|
|
|
|
2019-10-07 15:15:41 +03:00
|
|
|
jobs:
|
2020-03-05 08:25:00 +03:00
|
|
|
|
|
|
|
|
2019-10-07 15:15:41 +03:00
|
|
|
build:
|
2019-10-07 20:36:42 +03:00
|
|
|
name: Build
|
2019-10-07 15:15:41 +03:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
2020-02-06 13:13:07 +03:00
|
|
|
matrix:
|
2019-10-07 15:15:41 +03:00
|
|
|
os: [windows-latest, macOS-latest, ubuntu-latest]
|
|
|
|
steps:
|
2019-10-07 17:19:06 +03:00
|
|
|
- uses: actions/checkout@v1
|
2020-03-05 08:25:00 +03:00
|
|
|
|
2019-10-07 15:45:49 +03:00
|
|
|
- name: Install Rust Nightly Toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2019-11-18 18:56:26 +03:00
|
|
|
toolchain: nightly-2019-11-04
|
2019-10-07 15:45:49 +03:00
|
|
|
override: true
|
2020-03-05 08:25:00 +03:00
|
|
|
|
2019-10-07 15:45:49 +03:00
|
|
|
- name: Run cargo check
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: check
|
2020-02-06 13:13:07 +03:00
|
|
|
|
2020-03-05 08:25:00 +03:00
|
|
|
|
2019-10-07 18:01:11 +03:00
|
|
|
test:
|
2019-10-07 20:36:42 +03:00
|
|
|
name: Tests
|
2020-01-30 17:00:58 +03:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [windows-latest,macOS-latest,ubuntu-latest]
|
2019-10-07 18:01:11 +03:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-03-05 08:25:00 +03:00
|
|
|
|
2019-10-07 18:01:11 +03:00
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2019-11-18 18:56:26 +03:00
|
|
|
toolchain: nightly-2019-11-04
|
2019-10-07 18:01:11 +03:00
|
|
|
override: true
|
2020-03-05 08:25:00 +03:00
|
|
|
|
2019-11-25 13:52:51 +03:00
|
|
|
- name: Install wasm-pack
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: install
|
2020-03-05 08:25:00 +03:00
|
|
|
args: wasm-pack --version 0.8.1
|
|
|
|
|
2019-11-25 13:52:51 +03:00
|
|
|
- name: Run tests
|
|
|
|
uses: actions-rs/cargo@v1
|
2019-10-07 18:01:11 +03:00
|
|
|
with:
|
|
|
|
command: test
|
2020-03-05 08:25:00 +03:00
|
|
|
|
2019-11-25 13:52:51 +03:00
|
|
|
- name: Run wasm-pack tests
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: run
|
|
|
|
args: >
|
2020-03-05 08:25:00 +03:00
|
|
|
--manifest-path=build/rust/Cargo.toml
|
2019-11-25 13:52:51 +03:00
|
|
|
--bin test-all
|
2020-02-06 19:09:29 +03:00
|
|
|
-- --headless --chrome
|
2019-10-07 18:01:11 +03:00
|
|
|
|
2020-03-05 08:25:00 +03:00
|
|
|
|
2020-02-06 13:13:07 +03:00
|
|
|
size:
|
|
|
|
name: Check size
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-03-05 08:25:00 +03:00
|
|
|
|
2020-02-06 13:13:07 +03:00
|
|
|
- name: Install Rust Nightly Toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: nightly-2019-11-04
|
|
|
|
override: true
|
2020-03-05 08:25:00 +03:00
|
|
|
|
2020-02-06 13:13:07 +03:00
|
|
|
- name: Install wasm-pack
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: install
|
|
|
|
args: wasm-pack --version 0.8.1
|
2020-03-10 17:33:02 +03:00
|
|
|
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: '12.16.1'
|
|
|
|
|
|
|
|
- name: check npm
|
|
|
|
run: npm --version
|
2020-03-05 08:25:00 +03:00
|
|
|
|
2020-02-06 13:13:07 +03:00
|
|
|
- name: Compile to WASM
|
2020-03-05 08:25:00 +03:00
|
|
|
run: ./run build
|
|
|
|
|
2020-02-06 13:13:07 +03:00
|
|
|
- name: Check WASM size
|
2020-03-05 08:25:00 +03:00
|
|
|
run: ./build/assert_max_wasm_size.sh
|
|
|
|
|
2019-10-07 18:01:11 +03:00
|
|
|
|
|
|
|
clippy:
|
2019-10-07 20:36:42 +03:00
|
|
|
name: Linter
|
2019-10-07 18:01:11 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-03-05 08:25:00 +03:00
|
|
|
|
2019-10-07 18:01:11 +03:00
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2019-11-18 18:56:26 +03:00
|
|
|
toolchain: nightly-2019-11-04
|
2019-10-07 18:01:11 +03:00
|
|
|
override: true
|
2020-03-05 08:25:00 +03:00
|
|
|
|
2019-10-07 18:01:11 +03:00
|
|
|
- run: rustup component add clippy
|
2020-03-05 08:25:00 +03:00
|
|
|
|
2019-10-07 18:01:11 +03:00
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: clippy
|
|
|
|
args: -- -D warnings
|
2019-10-07 17:19:06 +03:00
|
|
|
|
2020-03-05 08:25:00 +03:00
|
|
|
|
2019-10-07 17:19:06 +03:00
|
|
|
coverage:
|
2019-10-07 20:36:42 +03:00
|
|
|
name: Coverage
|
2019-10-07 17:19:06 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
2020-03-05 08:25:00 +03:00
|
|
|
|
2019-10-07 17:19:06 +03:00
|
|
|
- name: Install Rust Nightly Toolchain
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2019-11-18 18:56:26 +03:00
|
|
|
toolchain: nightly-2019-11-04
|
2019-10-07 17:19:06 +03:00
|
|
|
override: true
|
2020-03-05 08:25:00 +03:00
|
|
|
|
2019-10-07 17:19:06 +03:00
|
|
|
- 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'
|
2020-03-05 08:25:00 +03:00
|
|
|
|
2019-10-07 17:19:06 +03:00
|
|
|
- name: Generate coverage report
|
2019-10-07 20:03:52 +03:00
|
|
|
id: coverage
|
2019-10-07 17:19:06 +03:00
|
|
|
uses: actions-rs/grcov@v0.1
|
2020-03-05 08:25:00 +03:00
|
|
|
|
2019-10-07 22:03:03 +03:00
|
|
|
- name: list all /tmp files
|
2019-10-07 21:52:33 +03:00
|
|
|
run: ls -la /tmp
|
2020-03-05 08:25:00 +03:00
|
|
|
|
2019-10-07 22:03:03 +03:00
|
|
|
- name: show the coverage report
|
|
|
|
run: cat ${{ steps.coverage.outputs.report }}
|
2020-03-05 08:25:00 +03:00
|
|
|
|
2019-10-07 17:19:06 +03:00
|
|
|
- name: Upload coverage report
|
|
|
|
uses: codecov/codecov-action@v1.0.2
|
|
|
|
with:
|
2019-10-07 23:06:02 +03:00
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
file: ./lcov.info
|
2020-03-05 08:25:00 +03:00
|
|
|
|
|
|
|
|
|
|
|
package:
|
|
|
|
name: Package
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [windows-latest, macOS-latest, ubuntu-latest]
|
|
|
|
fail-fast: false
|
|
|
|
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 --version 0.8.1
|
|
|
|
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: '12.16.1'
|
|
|
|
|
|
|
|
- name: check npm
|
|
|
|
run: npm --version
|
|
|
|
|
|
|
|
- name: Build Enso IDE
|
|
|
|
run: node run dist --no-validation
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
|
name: Upload Artifacts (Ubuntu, AppImage)
|
|
|
|
with:
|
|
|
|
name: Enso IDE (Linux, AppImage)
|
|
|
|
path: app/dist/native/Enso Studio-1.0.0.AppImage
|
|
|
|
if: matrix.os == 'ubuntu-latest'
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
|
name: Upload Artifacts (Ubuntu, not packed)
|
|
|
|
with:
|
|
|
|
name: Enso IDE (Linux, not packed)
|
|
|
|
path: app/dist/native/linux-unpacked
|
|
|
|
if: matrix.os == 'ubuntu-latest'
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
|
name: Upload Artifacts (Windows, Installer)
|
|
|
|
if: matrix.os == 'windows-latest'
|
|
|
|
with:
|
|
|
|
name: Enso IDE (Windows, installer)
|
|
|
|
path: app/dist/native/Enso Studio Setup 1.0.0.exe
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
|
name: Upload Artifacts (Windows, not packed)
|
|
|
|
if: matrix.os == 'windows-latest'
|
|
|
|
with:
|
|
|
|
name: Enso IDE (Windows, not packed)
|
|
|
|
path: app/dist/native/win-unpacked
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
|
name: Upload Artifacts (macOS, dmg)
|
|
|
|
if: matrix.os == 'macos-latest'
|
|
|
|
with:
|
|
|
|
name: Enso IDE (macOS, dmg)
|
|
|
|
path: app/dist/native/Enso Studio-1.0.0.dmg
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
|
name: Upload Artifacts (macOS, app)
|
|
|
|
if: matrix.os == 'macos-latest'
|
|
|
|
with:
|
|
|
|
name: Enso IDE (macOS, app)
|
|
|
|
path: app/dist/native/mac/Enso Studio.app
|
|
|
|
|
|
|
|
|
|
|
|
package-fm:
|
|
|
|
name: Package mock File Manager Server
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [windows-latest, macOS-latest, ubuntu-latest]
|
|
|
|
fail-fast: false
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: nightly-2019-11-04
|
|
|
|
override: true
|
|
|
|
|
|
|
|
- name: Build File Manager Server
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: --release --bin file-manager-server
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
|
name: Upload Artifacts (Ubuntu)
|
|
|
|
with:
|
|
|
|
name: File Manager Server (Linux)
|
|
|
|
path: target/release/file-manager-server
|
|
|
|
if: matrix.os == 'ubuntu-latest'
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
|
name: Upload Artifacts (macOS)
|
|
|
|
with:
|
|
|
|
name: File Manager Server (macOS)
|
|
|
|
path: target/release/file-manager-server
|
|
|
|
if: matrix.os == 'macos-latest'
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
|
name: Upload Artifacts (Ubuntu)
|
|
|
|
with:
|
|
|
|
name: File Manager Server (Windows)
|
|
|
|
path: target/release/file-manager-server.exe
|
|
|
|
if: matrix.os == 'windows-latest'
|