Skip to content

Commit

Permalink
Update the release PR message
Browse files Browse the repository at this point in the history
  • Loading branch information
surpher committed Dec 18, 2024
1 parent 2a046d4 commit dac25ae
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 15 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ 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/**'
Expand All @@ -21,6 +27,7 @@ jobs:
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... ¯\_(ツ)_/¯"
Expand All @@ -34,6 +41,7 @@ jobs:
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 }}

testMacOS14:
name: "🤖 Unit tests"
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/tmpl_build_rust_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ on:
cache-restore-key:
required: true
type: string
force-rebuild:
required: false
type: boolean

jobs:
buildRustBinaries:
Expand Down Expand Up @@ -44,17 +47,18 @@ jobs:
restore-keys: |
${{ inputs.cache-restore-key }}-${{ runner.os }}
- name: "🔍 Check binaries in ${{ inputs.binaries-path }}"
- name: "🔍 Check binaries exist in ${{ inputs.binaries-path }}"
id: check_files
uses: andstor/file-existence-action@v3
with:
files: "Resources/**/libpact_ffi.a"

- name: "🛠 Prepare Tools"
if: ${{ steps.check_files.outputs.files_exists == 'false' || inputs.force-rebuild == true }}
run: |
sh Support/Scripts/prepare_build_tools
sh Support/Scripts/Config/prepare_build_tools
- name: "🎁 Build FFI binaries (skipping if cached)"
if: steps.check_files.outputs.files_exists == 'false'
if: ${{ steps.check_files.outputs.files_exists == 'false' || inputs.force-rebuild == true }}
run: |
sh Support/Scripts/build_rust_dependencies
sh Support/Scripts/CI/build_rust_dependencies
5 changes: 3 additions & 2 deletions .github/workflows/tmpl_test_macos13_x86_64.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "On macOS 13 (intel)"
name: "macOS 13"

on:
workflow_call:
Expand All @@ -15,6 +15,7 @@ on:
cache-restore-key:
required: true
type: string

env:
DEVELOPER_DIR: /Applications/Xcode_15.4.app/Contents/Developer

Expand All @@ -30,7 +31,7 @@ jobs:
- scheme: "PactSwiftMockServer-iOS"
destination: "platform=iOS Simulator,name=iPhone 14 Pro"
- scheme: "PactSwiftMockServer-macOS"
destination: "arch=x86_64"
destination: "platform=macOS,arch=x86_64"

env:
SCHEME: ${{ matrix.scheme }}
Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/tmpl_test_macos14_arm64.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "On macOS 14 (latest)"
name: "macOS 14"

on:
workflow_call:
Expand All @@ -24,12 +24,12 @@ on:
workflow_dispatch:

env:
DEVELOPER_DIR: /Applications/Xcode_15.3.app/Contents/Developer
DEVELOPER_DIR: /Applications/Xcode_16.1.app/Contents/Developer

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

strategy:
fail-fast: true
Expand All @@ -39,7 +39,7 @@ jobs:
destination: "platform=iOS Simulator,name=iPhone 15 Pro"
submit_code_coverage: true
- scheme: "PactSwiftMockServer-macOS"
destination: "arch=arm64"
destination: "platform=macOS,arch=arm64"
submit_code_coverage: true

env:
Expand All @@ -51,6 +51,13 @@ jobs:
cancel-in-progress: true

steps:
- name: "🏛️ Check runner architecture"
run: |
if [ "$(uname -m)" != "arm64" ]; then
echo -e "🚨 \033[31mThis runner is \033[1mnot arm64\033[0;31m. Failing the job.\033[0m"
exit 1
fi
- name: "♻️ Checkout repository"
uses: actions/checkout@v4
with:
Expand All @@ -69,7 +76,7 @@ jobs:
- name: "⚗️ Run tests"
run: |
sh Support/Scripts/Config/prepare_build_tools
sh Support/Scrips/test
sh Support/Scripts/test
- name: "⬆️ Upload coverage reports"
if: ${{ matrix.submit_code_coverage && inputs.submit-coverage-report }}
Expand Down
4 changes: 2 additions & 2 deletions Support/Scripts/Config/prepare_build_tools
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
set -euo pipefail

# "import"
sourc "${BASH_SOURCE[0]%/*}/../utils.sh"
source "${BASH_SOURCE[0]%/*}/../utils.sh"

brew update

Expand All @@ -32,7 +32,7 @@ function brew_install {
echo -e "🍺 Installing $YELLOW$tool$NOCOLOR via Homebrew..."
executeCommand "brew install $tool"
else
echo -e "👍 $LIGHT_BLUE$tool$NOCOLOR is already installed."
echo -e "🍻 $LIGHT_BLUE$tool$NOCOLOR is already installed."
fi
}

Expand Down
2 changes: 1 addition & 1 deletion Support/Scripts/release
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ function github_create_release_for {
function github_create_pull_request_for_new_version {
local version_tag="$1"
local version_branch="$2"
local pr_message="Release: $version_tag ($REPO_OWNER/$RELEASE_REPO_NAME/releases/tag/$version_tag)"
local pr_message="Release: [$version_tag](https://github.com/$REPO_OWNER/$RELEASE_REPO_NAME/releases/tag/$version_tag)"
local dry_run=; dry_run=$([ "$DRY_RUN" = true ] && echo "--dry-run" || echo "")
local open_pr_cmd="gh pr create --draft --base main --head \"$version_branch\" $dry_run --title \"$version_tag\" --body \"$pr_message\" --repo $REPO_OWNER/$XCPRODUCT_NAME"

Expand Down

0 comments on commit dac25ae

Please sign in to comment.