Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 38 additions & 33 deletions .github/workflows/build-ffi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,53 +8,58 @@ on:
branches:
- master

env:
# Generic
FORCE_COLOR: '1'
CLICOLOR: '1'
# Rust
CARGO_TERM_COLOR: always
RUST_BACKTRACE: '1'

jobs:
build:
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest, windows-latest, macos-13, macos-14 ]
operating-system: [ ubuntu-latest, windows-latest, macos-13, macos-latest ]
rust: [ stable ]
env:
pact_do_not_track: true
steps:
- uses: actions/checkout@v3
- run: rustc --version || true
shell: bash
- uses: dtolnay/rust-toolchain@stable
- name: Checkout code
uses: actions/checkout@v5

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable

- name: Install cbindgen
uses: taiki-e/install-action@main
with:
toolchain: stable
- name: Install shared mime info DB
tool: cbindgen


- name: Install macOS dependencies
if: runner.os == 'macOS'
run: brew install shared-mime-info
- uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
components: rustfmt
- name: Install doxygen
if: runner.os == 'Linux'
run: sudo apt-get install -y doxygen
- name: Build pact_ffi with CMake
run: ./ci-build.sh
working-directory: rust/pact_ffi
shell: bash
- name: Run the C FFI tests
run: |
brew install shared-mime-info

- name: Install Windows dependencies
if: runner.os == 'Windows'
run: |
choco install curl --version=8.7.1
choco install openssl

- name: Install Linux dependencies
if: runner.os == 'Linux'
working-directory: c/consumer-verification
run: |
sudo apt update
sudo apt install libcurl4-openssl-dev
/usr/bin/aclocal
autoconf
automake --add-missing
./configure
make
src/consumer-verification basic ../../rust/target/debug/libpact_ffi.so
src/consumer-verification error ../../rust/target/debug/libpact_ffi.so
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev

- name: Run C consumer examples
working-directory: c/consumer
run: make run

- name: Run mock_server_logs test
run: cargo test -p pact_ffi returns_mock_server_logs -- --nocapture --include-ignored
working-directory: rust
env:
RUST_LOG: debug
RUST_BACKTRACE: 1
Loading
Loading