Skip to content

Commit

Permalink
18748: Adds macOS arm64 tests (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
calebwherry authored Dec 21, 2023
1 parent 220afd9 commit 96a25b9
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 8 deletions.
60 changes: 55 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ jobs:
echo -n "$f: " && "./$f" --version
done
# Uses GitHub default macos runner (amd64)
smoke-test-macos-amd64:
needs: ['build-macos']
runs-on: macos-latest
Expand All @@ -269,7 +270,55 @@ jobs:
mkdir ./amalgam
tar -xvf ./amalgam-${{ inputs.version }}-darwin-amd64.tar.gz -C ./amalgam
# GitHub macOS runner does not support AVX
- name: Smoke test
run: |
set -e
cd ./amalgam/bin
for f in *; do
echo -n "$f: " && "./$f" --version
done
# Uses GitHub large macos runner (amd64)
smoke-test-macos-amd64-large:
needs: ['build-macos']
runs-on: macos-latest-large
steps:
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: amalgam-${{ inputs.version }}-darwin-amd64

- name: Extract Amalgam
run: |
mkdir ./amalgam
tar -xvf ./amalgam-${{ inputs.version }}-darwin-amd64.tar.gz -C ./amalgam
- name: Smoke test
run: |
set -e
cd ./amalgam/bin
for f in *; do
echo -n "$f: " && "./$f" --version
done
# Uses macOS arm64 xlarge runner (arm64) but execute amd64 binaries
# Notes:
# 1) this is supported by Apple through emulator Rossetta 2
# 2) Rossetta 2 does support AVX+ instructions so only run noavx binaries
smoke-test-macos-amd64-on-arm64:
needs: ['build-macos']
runs-on: macos-latest-xlarge
steps:
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: amalgam-${{ inputs.version }}-darwin-amd64

- name: Extract Amalgam
run: |
mkdir ./amalgam
tar -xvf ./amalgam-${{ inputs.version }}-darwin-amd64.tar.gz -C ./amalgam
- name: Smoke test
run: |
set -e
Expand All @@ -278,16 +327,15 @@ jobs:
echo -n "$f: " && "./$f" --version
done
# Turned off until GitHub runners support arm64 macOS
# Uses macOS arm64 xlarge runner (arm64)
smoke-test-macos-arm64:
if: false
needs: ['build-macos']
runs-on: macos-latest
runs-on: macos-latest-xlarge
steps:
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: amalgam-${{ inputs.version }}-darwin-amd64
name: amalgam-${{ inputs.version }}-darwin-arm64

- name: Extract Amalgam
run: |
Expand Down Expand Up @@ -355,6 +403,8 @@ jobs:
- smoke-test-linux-arm64
- smoke-test-linux-arm64_8a
- smoke-test-macos-amd64
- smoke-test-macos-amd64-on-arm64
- smoke-test-macos-arm64
- smoke-test-windows-amd64
- smoke-test-wasm64
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ An interpreter application and shared library (dll/so/dylib) are built for each

| Platform | Variants <sup>1</sup> | Automated Testing | Notes |
|------------------------------|-------------------------------|:------------------:|-------|
| Windows amd64 | MT, ST, OMP, MT-NoAVX | :heavy_check_mark: | |
| Windows amd64 | MT, ST, OMP, MT-NoAVX | :heavy_check_mark: | |
| Linux amd64 | MT, ST, OMP, MT-NoAVX, ST-PGC | :heavy_check_mark: | ST-PGC is for testing only, not packaged for release |
| Linux arm64: 8.2-a+simd+rcpc | MT, ST, OMP | :heavy_check_mark: | Tested with [qemu](https://www.qemu.org/) |
| Linux arm64: 8-a+simd | ST | :heavy_check_mark: | Tested with [qemu](https://www.qemu.org/) |
| macOS amd64 | MT, ST, OMP, MT-NoAVX | :heavy_check_mark: | Only **MT-NoAVX** tested currently |
| macOS arm64: 8.4-a+simd | MT, ST, OMP | :x: | Manually tested, M1 and newer supported |
| macOS amd64 | MT, ST, OMP, MT-NoAVX | :heavy_check_mark: | |
| macOS arm64: 8.4-a+simd | MT, ST, OMP | :heavy_check_mark: | M1 and newer supported (amd64 NoAVX also tested w/ emulation) |
| WASM 64-bit | ST | :heavy_check_mark: | Built on linux using emscripten, headless test with node:18 + jest |

* <sup>1</sup> Variant meanings:
Expand Down

0 comments on commit 96a25b9

Please sign in to comment.