Support Intel and ARM platforms for macOS.

This commit is contained in:
Patrick Lehmann
2024-08-01 11:19:58 +02:00
parent 02d386a9e1
commit 2004711d48
4 changed files with 32 additions and 9 deletions

View File

@@ -59,6 +59,26 @@ on:
required: false required: false
default: '' default: ''
type: string type: string
ubuntu_image:
description: 'The used GitHub Action image for Ubuntu based jobs.'
required: false
default: 'ubuntu-24.04'
type: string
windows_image:
description: 'The used GitHub Action image for Windows based jobs.'
required: false
default: 'windows-latest'
type: string
macos_intel_image:
description: 'The used GitHub Action image for macOS (Intel x86-64) based jobs.'
required: false
default: 'macos-latest-large'
type: string
macos_arm_image:
description: 'The used GitHub Action image for macOS (ARM arm64) based jobs.'
required: false
default: 'macos-latest'
type: string
outputs: outputs:
python_version: python_version:
@@ -157,9 +177,10 @@ jobs:
}, },
# Runner systems (runner images) supported by GitHub Actions # Runner systems (runner images) supported by GitHub Actions
"sys": { "sys": {
"ubuntu": { "icon": "🐧", "runs-on": "ubuntu-24.04", "shell": "bash", "name": "Linux (x86-64)" }, "ubuntu": { "icon": "🐧", "runs-on": "${{ inputs.ubuntu_image }}", "shell": "bash", "name": "Linux (x86-64)" },
"windows": { "icon": "🪟", "runs-on": "windows-latest", "shell": "pwsh", "name": "Windows (x86-64)" }, "windows": { "icon": "🪟", "runs-on": "${{ inputs.windows_image }}", "shell": "pwsh", "name": "Windows (x86-64)" },
"macos": { "icon": "🍎", "runs-on": "macos-latest", "shell": "bash", "name": "MacOS (x86-64)" }, "macos": { "icon": "🍎", "runs-on": "${{ inputs.macos_intel_image }}", "shell": "bash", "name": "macOS (x86-64)" },
"macos-arm": { "icon": "🍏", "runs-on": "${{ inputs.macos_arm_image }}", "shell": "bash", "name": "macOS (arm64)" },
}, },
# Runtimes provided by MSYS2 # Runtimes provided by MSYS2
"runtime": { "runtime": {

1
.gitignore vendored
View File

@@ -13,6 +13,7 @@ coverage.xml
# pytest # pytest
/report/unit /report/unit
/tests/*.github
# setuptools # setuptools
/build/**/*.* /build/**/*.*

View File

@@ -78,10 +78,10 @@ for dependency in dependencies:
pacboyPackages.add(rewrite) pacboyPackages.add(rewrite)
# Write jobs to special file # Write jobs to special file
# github_output = Path(getenv("GITHUB_OUTPUT")) github_output = Path(getenv("GITHUB_OUTPUT"))
# print(f"GITHUB_OUTPUT: {github_output}") print(f"GITHUB_OUTPUT: {github_output}")
# with github_output.open("a+") as f: with github_output.open("a+") as f:
# f.write(f"pacboy_packages={' '.join(pacboyPackages)}\n") f.write(f"pacboy_packages={' '.join(pacboyPackages)}\n")
print(f"GITHUB_OUTPUT:") print(f"GITHUB_OUTPUT:")
print(f"pacboy_packages={' '.join(pacboyPackages)}\n") print(f"pacboy_packages={' '.join(pacboyPackages)}\n")

View File

@@ -67,9 +67,10 @@ data = {
}, },
# Runner systems (runner images) supported by GitHub Actions # Runner systems (runner images) supported by GitHub Actions
"sys": { "sys": {
"ubuntu": {"icon": "🐧", "runs-on": "ubuntu-24.04", "shell": "bash", "name": "Linux (x86-64)"}, "ubuntu": {"icon": "🐧", "runs-on": "ubuntu-2024.04", "shell": "bash", "name": "Linux (x86-64)"},
"windows": {"icon": "🪟", "runs-on": "windows-latest", "shell": "pwsh", "name": "Windows (x86-64)"}, "windows": {"icon": "🪟", "runs-on": "windows-latest", "shell": "pwsh", "name": "Windows (x86-64)"},
"macos": {"icon": "🍎", "runs-on": "macos-latest", "shell": "bash", "name": "MacOS (x86-64)"}, "macos": {"icon": "🍎", "runs-on": "macos-latest-large", "shell": "bash", "name": "macOS (x86-64)"},
"macos-arm": {"icon": "🍏", "runs-on": "macos-latest", "shell": "bash", "name": "macOS (arm64)"},
}, },
# Runtimes provided by MSYS2 # Runtimes provided by MSYS2
"runtime": { "runtime": {