From 82d91156430db6f28438a852a2ece55c58f0a4bb Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sat, 10 Aug 2024 17:00:21 +0200 Subject: [PATCH] github workflow: update * use git instead of hg repo of Etherlab * build with MSRV/stable/nightly --- .github/workflows/build.yml | 42 +++++++++++++++++++------------------ ethercat-sys/Cargo.toml | 2 ++ 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d15cbab..9506b1b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,9 +1,8 @@ -name: Build +name: CI on: push: - branches: - - master + branches: [master] pull_request: env: @@ -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 diff --git a/ethercat-sys/Cargo.toml b/ethercat-sys/Cargo.toml index d9b120b..b4e7612 100644 --- a/ethercat-sys/Cargo.toml +++ b/ethercat-sys/Cargo.toml @@ -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 = []