Skip to content

Commit

Permalink
Also run unit test on MacOS arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
dlemstra committed Feb 11, 2024
1 parent b285df9 commit 90c20b1
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 3 deletions.
23 changes: 22 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
uses: actions/checkout@v4

- name: Install dependencies
run: build/osx-x64/install.dependencies.sh
run: build/macos-x64/install.dependencies.sh

- name: Install Magick.Native
run: 'build/shared/install.Magick.Native.sh "dlemstra" "${{ secrets.GITHUB_TOKEN }}" macos x64'
Expand All @@ -110,6 +110,27 @@ jobs:
- name: Test
run: build/shared/test.Magick.NET.sh

macos_arm64:
name: 'MacOS (Q8/Q16/Q16-HDRI, arm64)'
runs-on: macos-14

steps:

- name: Checkout
uses: actions/checkout@v4

- name: Install dependencies
run: build/macos-x64/install.dependencies.sh

- name: Install Magick.Native
run: 'build/shared/install.Magick.Native.sh "dlemstra" "${{ secrets.GITHUB_TOKEN }}" macos arm64'

- name: Build
run: build/shared/build.Magick.NET.sh

- name: Test
run: build/shared/test.Magick.NET.sh

windows:
name: Windows
runs-on: windows-2022
Expand Down
10 changes: 8 additions & 2 deletions Magick.NET.sln
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{EE5A8EB5
src\Magick.Native\build\Debug-Q8-x86.cmd = src\Magick.Native\build\Debug-Q8-x86.cmd
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "osx-x64", "osx-x64", "{8BAE93F7-10BB-409F-8823-52D0F766E44D}"
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "macos-x64", "macos-x64", "{8BAE93F7-10BB-409F-8823-52D0F766E44D}"
ProjectSection(SolutionItems) = preProject
build\osx-x64\install.dependencies.sh = build\osx-x64\install.dependencies.sh
build\macos-x64\install.dependencies.sh = build\macos-x64\install.dependencies.sh
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{3A8414CC-62A7-4E38-B6AC-75ED9D276971}"
Expand Down Expand Up @@ -210,6 +210,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "linux-x64", "linux-x64", "{
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Magick.NET.SourceGenerator", "src\Magick.NET.SourceGenerator\Magick.NET.SourceGenerator.csproj", "{6179CA65-2469-492B-BFED-5B25E2E2FEF9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "macos-arm64", "macos-arm64", "{0A65931C-E3BE-4648-ACF4-3629A5AD732F}"
ProjectSection(SolutionItems) = preProject
build\macos-arm64\install.dependencies.sh = build\macos-arm64\install.dependencies.sh
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -1445,6 +1450,7 @@ Global
{3318785C-365D-49C9-AEC5-25C014B80698} = {F6E20621-E266-4314-ADE0-A899270F2312}
{CA0B3C1A-0C4D-4329-8C6F-4C097E916221} = {A5315407-FA73-469B-99BB-7DFD5E043A92}
{6179CA65-2469-492B-BFED-5B25E2E2FEF9} = {61345F8D-8813-4CA8-B037-2DE221FFB5D2}
{0A65931C-E3BE-4648-ACF4-3629A5AD732F} = {F6E20621-E266-4314-ADE0-A899270F2312}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4F6887AA-E540-48B3-BDC0-068B342ABEBE}
Expand Down
File renamed without changes.
11 changes: 11 additions & 0 deletions build/macos-x64/install.dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -e

export HOMEBREW_NO_AUTO_UPDATE=1

brew install fontconfig
fc-list

downloadUrl=$(curl 'https://evermeet.cx/ffmpeg/info/ffmpeg/6.0' -fsS| jq -rc '.download.zip.url')
curl -f -L -# --compressed -A 'https://github.com/eugeneware/ffmpeg-static binaries download script' -o "ffmpeg-darwin-x64.zip" "$downloadUrl"
unzip -o -d /usr/local/bin -j ffmpeg-darwin-x64.zip ffmpeg
4 changes: 4 additions & 0 deletions src/Magick.Native/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ copyToTestProjects() {
copyToTestProject $runtime $platform "Q16" ""
copyToTestProject $runtime $platform "Q16-HDRI" ""

if [ "$runtime" = "macos" ] && [ "$platform" = "arm64" ]; then
return
fi

copyToTestProject $runtime $platform "Q8" "-OpenMP"
copyToTestProject $runtime $platform "Q16" "-OpenMP"
copyToTestProject $runtime $platform "Q16-HDRI" "-OpenMP"
Expand Down

0 comments on commit 90c20b1

Please sign in to comment.