Skip to content

Commit

Permalink
ci: Tweaking build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
surpher committed Apr 25, 2024
1 parent 328acc5 commit 6b98269
Show file tree
Hide file tree
Showing 10 changed files with 186 additions and 174 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build_rust_binaries.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Rust binaries
name: "Build"

on:
workflow_call:
Expand All @@ -18,14 +18,14 @@ on:

jobs:
buildRustBinaries:
name: "Build libpact_ffi binaries"
runs-on: macos-14
name: "🏗️ Build libpact_ffi.a"
runs-on: macos-latest
timeout-minutes: 60
strategy:
fail-fast: true

concurrency:
group: build-macos14-binaries-${{ github.ref }}
group: build-latest-binaries-${{ github.ref }}
cancel-in-progress: true

steps:
Expand All @@ -44,7 +44,7 @@ jobs:
restore-keys: |
${{ inputs.cache-restore-key }}-${{ runner.os }}
- name: "🔍 Check if binaries exist in ${{ inputs.binaries-path }}"
- name: "🔍 Check binaries in ${{ inputs.binaries-path }}"
id: check_files
uses: andstor/file-existence-action@v3
with:
Expand All @@ -57,4 +57,4 @@ jobs:
- name: "🎁 Build FFI binaries (skipping if cached)"
if: steps.check_files.outputs.files_exists == 'false'
run: |
Support/build_rust_dependencies
sh Support/build_rust_dependencies
10 changes: 5 additions & 5 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ env:

jobs:
sharedInputs:
name: "Shared envs"
name: "🔣 Shared envs"
runs-on: ubuntu-latest
outputs:
rust-target-path: ${{ env.RUST_TARGET_PATH }}
Expand All @@ -38,7 +38,7 @@ jobs:
- run: echo "Just a hacky workaround for passing envs to jobs expecting them... ¯\_(ツ)_/¯"

buildFFI:
name: "Build FFI binaries"
name: "📦 Dependencies"
needs: [sharedInputs]
uses: ./.github/workflows/build_rust_binaries.yml
with:
Expand All @@ -48,17 +48,17 @@ jobs:
cache-restore-key: ${{ needs.sharedInputs.outputs.cache-restore-key }}

testMacOS14:
name: "Test on macOS 14"
name: "🧪 Unit tests"
needs: [sharedInputs, buildFFI]
uses: ./.github/workflows/test_macos14_x86_64.yml
uses: ./.github/workflows/test_macos14_arm64.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 }}

testMacOS13:
name: "Test on macOS 13"
name: "🧪 Unit tests"
needs: [sharedInputs, buildFFI]
uses: ./.github/workflows/test_macos13_x86_64.yml
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test_macos13_x86_64.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test on macOS 13 (intel)
name: "On macOS 13 (intel)"

on:
workflow_call:
Expand All @@ -18,7 +18,7 @@ on:

jobs:
testMacOS13:
name: "Testing on macOS 13 (x86_64)"
name: "🕵️ Test"
runs-on: macos-13

strategy:
Expand Down Expand Up @@ -61,6 +61,6 @@ jobs:
run: |
sh Support/prepare_build_tools
- name: "⚗️ Run tests (Xcode)"
- name: "⚗️ Run tests"
run: |
sh Support/build_test
14 changes: 9 additions & 5 deletions .github/workflows/test_macos14_arm64.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test on macOS 14 (silicon)
name: "On macOS 14 (latest)"

on:
workflow_call:
Expand All @@ -18,8 +18,8 @@ on:

jobs:
testMacOS14:
name: "Testing on macOS 14 (arm64)"
runs-on: macos-14-arm64
name: "🕵️ Test"
runs-on: macos-latest

strategy:
fail-fast: true
Expand All @@ -35,7 +35,7 @@ jobs:
DESTINATION: ${{ matrix.destination }}

concurrency:
group: test-macos14_arm64-${{ github.ref }}-${{ matrix.scheme }}
group: test-macos14-latest-${{ github.ref }}-${{ matrix.scheme }}
cancel-in-progress: true

steps:
Expand All @@ -61,6 +61,10 @@ jobs:
run: |
sh Support/prepare_build_tools
- name: "⚗️ Run tests (Xcode)"
- name: "⚗️ Run tests"
run: |
sh Support/build_test
- name: "⬆️ Upload code coverage"
run: |
bash <(curl -s https://codecov.io/bash) -J 'PactSwiftMockServer'
70 changes: 0 additions & 70 deletions .github/workflows/test_macos14_x86_64.yml

This file was deleted.

Loading

0 comments on commit 6b98269

Please sign in to comment.