fix(CI): Add Mac-arm64 to build matrix (#1359)
Support for this came out in January, 2024. Explicit macos versions seem to be necessary for now, until GitHub offers "latest" labels targeting specific architectures.
This commit is contained in:
parent
9c033b9d40
commit
c456ad64d1
|
@ -9,12 +9,21 @@
|
|||
"generator": "Ninja"
|
||||
},
|
||||
{
|
||||
"os": "macos-latest",
|
||||
"comment": "Explicit macOS version 13 is required for explicit x64 CPU.",
|
||||
"os": "macos-13",
|
||||
"os_name": "osx",
|
||||
"target_arch": "x64",
|
||||
"exe_ext": "",
|
||||
"generator": "Ninja"
|
||||
},
|
||||
{
|
||||
"comment": "Explicit macOS version 14 is required for explicit arm64 CPU.",
|
||||
"os": "macos-14",
|
||||
"os_name": "osx",
|
||||
"target_arch": "arm64",
|
||||
"exe_ext": "",
|
||||
"generator": "Ninja"
|
||||
},
|
||||
{
|
||||
"os": "windows-latest",
|
||||
"os_name": "win",
|
||||
|
|
|
@ -127,6 +127,28 @@ jobs:
|
|||
run: |
|
||||
brew install ninja
|
||||
|
||||
- name: Check Mac CPU architecture
|
||||
if: runner.os == 'macOS'
|
||||
# In case we get confused about GitHub's mac VM image labels,
|
||||
# explicitly check that the CPU type matches our expectations.
|
||||
run: |
|
||||
if [[ "${{matrix.target_arch}}" == "arm64" ]]; then
|
||||
CORRECT_LABEL="arm64"
|
||||
else
|
||||
CORRECT_LABEL="x86_64"
|
||||
fi
|
||||
|
||||
LABEL=$(uname -m)
|
||||
echo "Hardware label: \"$LABEL\""
|
||||
|
||||
if [[ "$LABEL" != "$CORRECT_LABEL" ]]; then
|
||||
echo "Wrong hardware label \"$LABEL\", expecting \"$CORRECT_LABEL\"."
|
||||
echo "Full uname string: $(uname -a)"
|
||||
echo "Full sysctl CPU info:"
|
||||
sysctl machdep.cpu
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Generate build files
|
||||
run: |
|
||||
mkdir -p build/
|
||||
|
|
Loading…
Reference in New Issue