mirror of
https://github.com/guillaume-be/rust-bert.git
synced 2024-11-11 00:54:34 +03:00
147 lines
3.5 KiB
YAML
147 lines
3.5 KiB
YAML
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
name: Build
|
|
|
|
jobs:
|
|
build:
|
|
name: Build Linux
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: build
|
|
|
|
build-windows:
|
|
name: Build Windows
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: build
|
|
|
|
build-mac-os:
|
|
name: Build macOS
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: build
|
|
|
|
test-batch-0:
|
|
name: Integration tests (batch 0)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --package rust-bert
|
|
--test albert
|
|
--test bart
|
|
--test bert
|
|
--test distilbert
|
|
--test distilgpt2
|
|
--test electra
|
|
--test gpt2
|
|
--test marian
|
|
|
|
test-batch-1:
|
|
name: Integration tests (batch 1)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --package rust-bert
|
|
--test mobilebert
|
|
--test openai_gpt
|
|
--test prophetnet
|
|
--test reformer
|
|
--test roberta
|
|
--test t5
|
|
--test xlnet
|
|
--test longformer
|
|
--test pegasus
|
|
--test gpt_neo
|
|
|
|
convert-model:
|
|
name: Model conversion test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.7'
|
|
- run: |
|
|
pip install -r requirements.txt --progress-bar off
|
|
python ./utils/download-dependencies_distilbert.py
|
|
|
|
fmt:
|
|
name: Rustfmt
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
- run: rustup component add rustfmt
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fmt
|
|
args: --all -- --check
|
|
|
|
clippy:
|
|
name: Clippy
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
profile: minimal
|
|
toolchain: stable
|
|
override: true
|
|
- run: rustup component add clippy
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: clippy
|
|
args: --all-targets --all-features -- -D warnings -A clippy::assign_op_pattern -A clippy::upper-case-acronyms |