Skip to content

Commit

Permalink
github workflow: update
Browse files Browse the repository at this point in the history
* use git instead of hg repo of Etherlab
* build with MSRV/stable/nightly
  • Loading branch information
birkenfeld committed Aug 10, 2024
1 parent b49f883 commit 82d9115
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 20 deletions.
42 changes: 22 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Build
name: CI

on:
push:
branches:
- master
branches: [master]
pull_request:

env:
Expand All @@ -13,34 +12,37 @@ jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
profile: minimal
components: rustfmt
- name: Check rust formatting (rustfmt)
run: cargo fmt --all -- --check
- run: cargo fmt --all -- --check

build:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- 1.63.0
- stable
- nightly
env:
ETHERCAT_PATH: ../ethercat-git
steps:
- uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
profile: minimal
toolchain: ${{ matrix.toolchain }}
components: clippy

- 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
git clone https://gitlab.com/etherlab.org/ethercat ethercat-git
cd ethercat-git
git checkout stable-1.5
./bootstrap
./configure --disable-8139too
- name: Build
run: ETHERCAT_PATH=$(pwd)/ethercat-hg cargo build
- run: cargo clippy --all-targets
- run: cargo build --all-targets
2 changes: 2 additions & 0 deletions ethercat-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ ioctl-sys = "0.5.2"
[build-dependencies]
bindgen = "0.63.0"
regex = "=1.9.6"
# for 1.63 compatibility
home = "=0.5.5"

[features]
default = []
Expand Down

0 comments on commit 82d9115

Please sign in to comment.