2022-01-31 09:20:15 +00:00
|
|
|
name: Rust
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [master]
|
|
|
|
pull_request:
|
|
|
|
branches: [master]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
2022-06-13 07:02:05 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-06-13 16:28:00 +00:00
|
|
|
debug: ['--disable-debug', '--enable-debug']
|
2022-06-13 07:02:05 +00:00
|
|
|
packages:
|
2022-06-13 08:35:23 +00:00
|
|
|
- configure: ''
|
2022-06-13 07:02:05 +00:00
|
|
|
- configure: '--without-all'
|
|
|
|
cargo: '--no-default-features'
|
2022-06-13 08:35:23 +00:00
|
|
|
- configure: '--without-all --with-ntoa'
|
|
|
|
cargo: '--no-default-features --features ntoa'
|
2022-01-31 09:20:15 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
components: rustfmt, clippy
|
|
|
|
- name: autogen
|
|
|
|
run: ./autogen.sh
|
|
|
|
- name: configure
|
2022-06-13 16:28:00 +00:00
|
|
|
run: ./configure ${{matrix.debug}} ${{matrix.packages.configure}} CFLAGS='-O3'
|
2022-01-31 09:20:15 +00:00
|
|
|
- name: make
|
|
|
|
run: make
|
|
|
|
- name: install
|
|
|
|
run: sudo make install
|
2022-06-13 07:02:05 +00:00
|
|
|
- working-directory: bindings/rust
|
|
|
|
name: test
|
2022-06-13 08:29:52 +00:00
|
|
|
run: cargo test ${{matrix.packages.cargo}}
|
2022-06-09 01:25:27 +00:00
|
|
|
- working-directory: bindings/rust
|
2022-01-31 09:20:15 +00:00
|
|
|
name: clippy
|
|
|
|
run: cargo clippy
|
2022-06-09 01:25:27 +00:00
|
|
|
- working-directory: bindings/rust
|
2022-02-01 03:08:56 +00:00
|
|
|
name: fmt
|
|
|
|
run: cargo fmt --check
|