-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (63 loc) · 2.12 KB
/
build_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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
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 }}
steps:
- run: echo "Just a hacky workaround for passing envs to jobs expecting them... ¯\_(ツ)_/¯"
buildFFI:
name: "📦 Dependencies"
needs: [sharedInputs]
uses: ./.github/workflows/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 }}
testMacOS14:
name: "🤖 Unit tests"
needs: [sharedInputs, buildFFI]
uses: ./.github/workflows/test_macos14_arm64.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/test_macos13_x86_64.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 }}