diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index b3b2fe2..990a566 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -31,6 +31,25 @@ jobs: args: --all-features --tests --benches name: lint + cargo-c: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Install cargo-c + run: | + cargo install cargo-c + - name: Run cargo-c + run: | + cargo cinstall --all-features \ + --prefix=$HOME/av_metrics_deploy + - name: Run cargo-c tests + run: | + export PKG_CONFIG_PATH=$HOME/av_metrics_deploy/lib/pkgconfig + cd av_metrics/c-example + gcc `pkg-config --static --cflags --libs av_metrics` test.c -o test + ./test + + build: strategy: matrix: @@ -51,19 +70,3 @@ jobs: run: cargo test --all-features - name: Generate docs run: cargo doc --all-features --no-deps - - name: Install cargo-c - if: matrix.platform == 'ubuntu-latest' - run: | - cargo install cargo-c - - name: Run cargo-c - if: matrix.platform == 'ubuntu-latest' - run: | - rm -rf $GITHUB_WORKSPACE/target - cargo cinstall --prefix=$GITHUB_WORKSPACE/av_metrics_deploy - - name: Run cargo-c tests - if: matrix.platform == 'ubuntu-latest' - run: | - export PKG_CONFIG_PATH=$GITHUB_WORKSPACE/av_metrics_deploy/lib/pkgconfig - cd av_metrics/c-example - gcc `pkg-config --cflags --libs av_metrics` test.c -o test - ./test