Skip to content

Commit c672d01

Browse files
committed
chore(ci): use new C examples
Signed-off-by: JP-Ellis <josh@jpellis.me>
1 parent 701c230 commit c672d01

1 file changed

Lines changed: 38 additions & 34 deletions

File tree

.github/workflows/build-ffi.yml

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -8,53 +8,57 @@ on:
88
branches:
99
- master
1010

11+
env:
12+
# Generic
13+
FORCE_COLOR: '1'
14+
CLICOLOR: '1'
15+
# Rust
16+
CARGO_TERM_COLOR: always
17+
RUST_BACKTRACE: '1'
18+
1119
jobs:
1220
build:
1321
runs-on: ${{ matrix.operating-system }}
1422
strategy:
1523
fail-fast: false
1624
matrix:
1725
operating-system: [ ubuntu-latest, windows-latest, macos-15, macos-15-intel ]
18-
rust: [ stable ]
26+
rust: [ nightly ]
1927
env:
2028
pact_do_not_track: true
2129
steps:
22-
- uses: actions/checkout@v3
23-
- run: rustc --version || true
24-
shell: bash
25-
- uses: dtolnay/rust-toolchain@stable
30+
- name: Checkout code
31+
uses: actions/checkout@v5
32+
33+
- name: Install Conan
34+
uses: conan-io/setup-conan@09566912d661de90608308897a4d513e850c04e8 # v1.2.0
2635
with:
27-
toolchain: stable
28-
- name: Install shared mime info DB
29-
if: runner.os == 'macOS'
30-
run: brew install shared-mime-info
31-
- uses: dtolnay/rust-toolchain@nightly
36+
cache_packages: true
37+
38+
- name: Install Rust
39+
uses: dtolnay/rust-toolchain@stable
40+
with:
41+
toolchain: ${{ matrix.rust }}
42+
43+
- name: Install cbindgen and just
44+
uses: taiki-e/install-action@main
3245
with:
33-
toolchain: nightly
34-
components: rustfmt
35-
- name: Install doxygen
36-
if: runner.os == 'Linux'
37-
run: sudo apt-get install -y doxygen
38-
- name: Build pact_ffi with CMake
39-
run: ./ci-build.sh
40-
working-directory: rust/pact_ffi
41-
shell: bash
42-
- name: Run the C FFI tests
43-
if: runner.os == 'Linux'
44-
working-directory: c/consumer-verification
46+
tool: cbindgen,just
47+
48+
- name: Install macOS dependencies
49+
if: runner.os == 'macOS'
4550
run: |
46-
sudo apt update
47-
sudo apt install libcurl4-openssl-dev
48-
/usr/bin/aclocal
49-
autoconf
50-
automake --add-missing
51-
./configure
52-
make
53-
src/consumer-verification basic ../../rust/target/debug/libpact_ffi.so
54-
src/consumer-verification error ../../rust/target/debug/libpact_ffi.so
51+
brew install \
52+
shared-mime-info
53+
54+
- name: Run C consumer examples
55+
working-directory: c/consumer
56+
run: just run
57+
58+
- name: Run C provider verification
59+
working-directory: c/provider
60+
run: just run
61+
5562
- name: Run mock_server_logs test
5663
run: cargo test -p pact_ffi returns_mock_server_logs -- --nocapture --include-ignored
5764
working-directory: rust
58-
env:
59-
RUST_LOG: debug
60-
RUST_BACKTRACE: 1

0 commit comments

Comments
 (0)