Skip to content

🧑‍🔬 Build and Test #12

🧑‍🔬 Build and Test

🧑‍🔬 Build and Test #12

Workflow file for this run

name: "🧑‍🔬 Build and Test"
on:
workflow_dispatch:
inputs:
force-rebuild:
required: false
default: false
type: boolean
description: "Re-build Rust binaries"
push:
branches:
- 'run-on-ci/**'
env:
RUST_TARGET_PATH: pact-reference/rust/target
BINARIES_PATH: Resources
CACHE_KEY: build-ffi-rust
CACHE_RESTORE_KEY: build-ffi-rust
jobs:
sharedInputs:
name: "👭 Shared envs"
runs-on: ubuntu-latest
outputs:
rust-target-path: ${{ env.RUST_TARGET_PATH }}
binaries-path: ${{ env.BINARIES_PATH }}
cache-key: ${{ env.CACHE_KEY }}
cache-restore-key: ${{ env.CACHE_RESTORE_KEY }}
force-rebuild: ${{ inputs.force-rebuild }}
steps:
- run: echo "Just a hacky workaround for passing envs to jobs expecting them... ¯\_(ツ)_/¯"
buildFFI:
name: "📦 Dependencies"
needs: [sharedInputs]
uses: ./.github/workflows/tmpl_build_rust_binaries.yml
with:
rust-target-path: ${{ needs.sharedInputs.outputs.rust-target-path }}
binaries-path: ${{ needs.sharedInputs.outputs.binaries-path }}
cache-key: ${{ needs.sharedInputs.outputs.cache-key }}
cache-restore-key: ${{ needs.sharedInputs.outputs.cache-restore-key }}
force-rebuild: "${{ needs.sharedInputs.outputs.force-rebuild }}"
testMacOS15:
name: "🤖 Unit tests"
needs: [sharedInputs, buildFFI]
uses: ./.github/workflows/tmpl_test_macos15.yml
secrets:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
with:
rust-target-path: ${{ needs.sharedInputs.outputs.rust-target-path }}
binaries-path: ${{ needs.sharedInputs.outputs.binaries-path }}
cache-key: ${{ needs.sharedInputs.outputs.cache-key }}
cache-restore-key: ${{ needs.sharedInputs.outputs.cache-restore-key }}
submit-coverage-report: true
testMacOS14:
name: "🤖 Unit tests"
needs: [sharedInputs, buildFFI]
uses: ./.github/workflows/tmpl_test_macos14.yml
secrets:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
with:
rust-target-path: ${{ needs.sharedInputs.outputs.rust-target-path }}
binaries-path: ${{ needs.sharedInputs.outputs.binaries-path }}
cache-key: ${{ needs.sharedInputs.outputs.cache-key }}
cache-restore-key: ${{ needs.sharedInputs.outputs.cache-restore-key }}
testMacOS13:
name: "🤖 Unit tests"
needs: [sharedInputs, buildFFI]
uses: ./.github/workflows/tmpl_test_macos13.yml
with:
rust-target-path: ${{ needs.sharedInputs.outputs.rust-target-path }}
binaries-path: ${{ needs.sharedInputs.outputs.binaries-path }}
cache-key: ${{ needs.sharedInputs.outputs.cache-key }}
cache-restore-key: ${{ needs.sharedInputs.outputs.cache-restore-key }}