Skip to content

Commit

Permalink
refactor ci pipelines (#219)
Browse files Browse the repository at this point in the history
* bump  to 1.83 in cross ci

* deprecate actions-rs

* deprecate i686

* factor lint ci

* add cross

* add back clippy giraffate
  • Loading branch information
edgarriba authored Jan 9, 2025
1 parent 746f5fb commit ca05a79
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 44 deletions.
26 changes: 6 additions & 20 deletions .github/workflows/rust_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- run: rustup toolchain install stable --component rustfmt
- run: cargo fmt --all -- --check

clippy:
name: Clippy
Expand All @@ -44,13 +36,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: check
args: --all --all-features
use-cross: true
- run: rustup toolchain install stable
- name: Install cross
run: cargo install cross
- run: cross check --all --all-features
49 changes: 26 additions & 23 deletions .github/workflows/rust_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,40 @@ jobs:
strategy:
matrix:
target:
- i686-unknown-linux-gnu
#- i686-unknown-linux-gnu
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
target: ${{ matrix.target }}
override: true
- uses: actions-rs/cargo@v1
with:
command: test
args: --target ${{ matrix.target }} --all-features
use-cross: true

- name: Install Rust toolchain
run: |
rustup update stable
rustup target add ${{ matrix.target }}
rustup default stable
- name: Install cross-compilation tools
run: cargo install cross --locked

- name: Run tests
run: cross test --target ${{ matrix.target }} --all-features

build_examples:
name: Build Examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
target: x86_64-unknown-linux-gnu
override: true
- uses: actions-rs/cargo@v1
with:
command: build
args: --examples
use-cross: true

- name: Install Rust toolchain
run: |
rustup update stable
rustup target add x86_64-unknown-linux-gnu
rustup default stable
- name: Install cross-compilation tools
run: cargo install cross --locked

- name: Build examples
run: cross build --examples
2 changes: 1 addition & 1 deletion devel-x86_64.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:1.81
FROM rust:1.83

RUN rustup update stable

Expand Down

0 comments on commit ca05a79

Please sign in to comment.