Skip to content

Workflow file for this run

name: Rust Lint And Test
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Deps
run: |
sudo apt-get update
sudo apt install -y libudev-dev
- name: Setup Rust Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Toolchain in nightly mode
run: |
rustup component add rustfmt --toolchain nightly
rustup component add clippy --toolchain nightly
- name: Install protc
run: sudo apt install -y protobuf-compiler libprotobuf-dev
- name: Install Mercurial
run: sudo apt-get install -y mercurial
- name: Set up IgH repo
run: |
hg clone http://hg.code.sf.net/p/etherlabmaster/code ethercat-hg
cd ethercat-hg
hg update stable-1.5
./bootstrap
./configure --disable-8139too
- name: Check
run: ETHERCAT_PATH=$(pwd)/ethercat-hg cargo check --all --tests
- name: Build
run: ETHERCAT_PATH=$(pwd)/ethercat-hg cargo build --verbose
- name: Run tests
run: ETHERCAT_PATH=$(pwd)/ethercat-hg cargo test --verbose
- name: Format
run: ETHERCAT_PATH=$(pwd)/ethercat-hg cargo fmt --all -- --check
- name: Lint
run: ETHERCAT_PATH=$(pwd)/ethercat-hg cargo clippy --all-targets --all-features -- -D warnings