Update rust reference module to 0.4.17 #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Test | |
on: | |
pull_request: | |
branches: | |
- 'main' | |
push: | |
branches: | |
- 'main' | |
- 'chore/**' | |
- 'docs/**' | |
- 'feat/**' | |
- 'feature/**' | |
- 'fix/**' | |
- 'refactor/**' | |
- 'releases/**' | |
- 'style/**' | |
- 'test/**' | |
- 'tech/**' | |
env: | |
RUST_TARGET_PATH: pact-reference/rust/target | |
BINARIES_PATH: Resources | |
jobs: | |
build: | |
name: "Prepare libpact_ffi binaries" | |
runs-on: macos-11 | |
timeout-minutes: 60 | |
strategy: | |
fail-fast: true | |
concurrency: | |
group: build-macos11-${{ github.ref }} | |
cancel-in-progress: true | |
steps: | |
- name: "♻️ Checkout repository" | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: "♼ Cache rust binaries" | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ env.RUST_TARGET_PATH }} | |
${{ env.BINARIES_PATH }} | |
key: build-${{ runner.os }}-rust-${{ hashFiles('**/libpact_ffi.version') }} | |
restore-keys: | | |
build-${{ runner.os }}-rust- | |
- name: "🔍 Check if binaries exist in ${{ env.BINARIES_PATH }}" | |
id: check_files | |
uses: andstor/file-existence-action@v1 | |
with: | |
files: "Resources/**/libpact_ffi.a" | |
- name: "🎁 Prepare binaries (if not cached)" | |
if: steps.check_files.outputs.files_exist == 'false' | |
run: | | |
Support/build_rust_dependencies | |
testMacOS11: | |
name: "Test macOS 11" | |
runs-on: macos-11 | |
needs: [build] | |
concurrency: | |
group: test-${{ github.ref }}-${{ matrix.scheme }} | |
cancel-in-progress: true | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- scheme: "PactSwiftMockServer-iOS" | |
destination: "platform=iOS Simulator,name=iPhone 12 Pro" | |
- scheme: "PactSwiftMockServer-macOS" | |
destination: "arch=x86_64" | |
env: | |
SCHEME: ${{ matrix.scheme }} | |
DESTINATION: ${{ matrix.destination }} | |
steps: | |
- name: "♻️ Checkout repository" | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: "♼ Cache rust binaries" | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ env.RUST_TARGET_PATH }} | |
${{ env.BINARIES_PATH }} | |
key: build-${{ runner.os }}-rust-${{ hashFiles('**/libpact_ffi.version') }} | |
restore-keys: | | |
build-${{ runner.os }}-rust- | |
- name: "🏗 Use Xcode 12.4" | |
run: sudo xcode-select -switch /Applications/Xcode_12.4.app | |
- name: "🛠 Prepare Tools" | |
run: | | |
sh Support/prepare_build_tools | |
- name: "⚗️ Run tests (Xcode)" | |
run: | | |
sh Support/build_test | |
testMacOS12: | |
name: "Test macOS 12" | |
runs-on: macos-12 | |
needs: [build] | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- scheme: "PactSwiftMockServer-iOS" | |
destination: "platform=iOS Simulator,name=iPhone 13 Pro" | |
- scheme: "PactSwiftMockServer-macOS" | |
destination: "arch=x86_64" | |
env: | |
SCHEME: ${{ matrix.scheme }} | |
DESTINATION: ${{ matrix.destination }} | |
concurrency: | |
group: test-${{ github.ref }}-${{ matrix.scheme }} | |
cancel-in-progress: true | |
steps: | |
- name: "♻️ Checkout repository" | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: "♼ Cache rust binaries" | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ env.RUST_TARGET_PATH }} | |
${{ env.BINARIES_PATH }} | |
key: build-${{ runner.os }}-rust-${{ hashFiles('**/libpact_ffi.version') }} | |
restore-keys: | | |
build-${{ runner.os }}-rust- | |
- name: "🏗 Use Xcode 13.4.1" | |
run: sudo xcode-select -switch /Applications/Xcode_13.4.1.app | |
- name: "🛠 Prepare Tools" | |
run: | | |
sh Support/prepare_build_tools | |
- name: "⚗️ Run tests (Xcode)" | |
run: | | |
sh Support/build_test | |
- name: "⬆️ Upload code coverage" | |
run: | | |
bash <(curl -s https://codecov.io/bash) -J 'PactSwiftMockServer' |