Skip to content

✨ Place c ffi behind feature flag #85

✨ Place c ffi behind feature flag

✨ Place c ffi behind feature flag #85

Workflow file for this run

name: Rust
on: [push]
env:
CARGO_TERM_COLOR: always
jobs:
stable:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install minimal stable with clippy and rustfmt
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- name: Build
run: cargo build --verbose --release
- name: Run tests
run: cargo test --verbose
- name: Run clippy
run: cargo clippy --verbose
if: matrix.os == 'ubuntu-latest'
- name: Run rustfmt
run: cargo fmt --check --verbose
if: matrix.os == 'ubuntu-latest'
- run: |
if [ "$RUNNER_OS" == "Linux" ]; then
echo "artifactName=libhuman_name.so" >> $GITHUB_ENV
elif [ "$RUNNER_OS" == "Windows" ]; then
echo "artifactName=human_name.dll" >> $GITHUB_ENV
elif [ "$RUNNER_OS" == "macOS" ]; then
echo "artifactName=libhuman_name.dylib" >> $GITHUB_ENV
else
echo "Unrecognized OS: $RUNNER_OS"
exit 1
fi
shell: bash
- run: |
echo "$RUNNER_OS"
ls target/release
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.artifactName }}
path: target/release/${{ env.artifactName }}
if-no-files-found: error
msrv:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install minimum supported Rust version
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.52.1
- name: Typecheck
run: cargo check --verbose