|
8 | 8 | branches: |
9 | 9 | - master |
10 | 10 |
|
| 11 | +env: |
| 12 | + # Generic |
| 13 | + FORCE_COLOR: '1' |
| 14 | + CLICOLOR: '1' |
| 15 | + # Rust |
| 16 | + CARGO_TERM_COLOR: always |
| 17 | + RUST_BACKTRACE: '1' |
| 18 | + |
11 | 19 | jobs: |
12 | 20 | build: |
13 | 21 | runs-on: ${{ matrix.operating-system }} |
14 | 22 | strategy: |
15 | 23 | fail-fast: false |
16 | 24 | matrix: |
17 | 25 | operating-system: [ ubuntu-latest, windows-latest, macos-15, macos-15-intel ] |
18 | | - rust: [ stable ] |
| 26 | + rust: [ nightly ] |
19 | 27 | env: |
20 | 28 | pact_do_not_track: true |
21 | 29 | 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 |
26 | 35 | 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 |
32 | 45 | 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' |
45 | 50 | 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 | + |
55 | 62 | - name: Run mock_server_logs test |
56 | 63 | run: cargo test -p pact_ffi returns_mock_server_logs -- --nocapture --include-ignored |
57 | 64 | working-directory: rust |
58 | | - env: |
59 | | - RUST_LOG: debug |
60 | | - RUST_BACKTRACE: 1 |
|
0 commit comments