Skip to content

Merge pull request #93 from nickbabcock/fix-shadowing #452

Merge pull request #93 from nickbabcock/fix-shadowing

Merge pull request #93 from nickbabcock/fix-shadowing #452

Workflow file for this run

name: ci
on:
pull_request:
push:
branches:
- master
schedule:
- cron: '00 01 * * *'
jobs:
test:
name: test
runs-on: ${{ matrix.os }}
env:
CARGO: cargo
TARGET:
FEATURES:
strategy:
fail-fast: false
matrix:
build:
- stable
- collectd-head
- aarch64
- regen
include:
- build: stable
os: 'ubuntu-latest'
- build: collectd-head
os: 'ubuntu-latest'
- build: aarch64
target: aarch64-unknown-linux-gnu
os: 'ubuntu-latest'
- build: regen
os: 'ubuntu-latest'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Use Cross
if: matrix.build == 'aarch64'
run: |
cargo install cross
echo "CARGO=cross" >> $GITHUB_ENV
echo "TARGET=--target ${{ matrix.target }}" >> $GITHUB_ENV
- name: regenerate-bindings
if: matrix.build == 'regen'
run: ./regenerate-bindings.sh
- name: collectd-head
if: matrix.build == 'collectd-head'
run: |
git clone https://github.com/collectd/collectd /tmp/collectd
echo "COLLECTD_PATH=/tmp/collectd" >> $GITHUB_ENV
echo "FEATURES=--features bindgen" >> $GITHUB_ENV
- name: tests
run: ${{ env.CARGO }} test $FEATURES --verbose $TARGET
- name: test benchmarks
if: matrix.build == 'stable'
run: |
cargo bench --no-run --features stub
- name: e2e test
if: matrix.build == 'stable'
run: |
sudo apt-get install collectd
sudo ./ci/test.sh