Added missing dependency. #1448
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| packages: read | |
| name: main | |
| jobs: | |
| version: | |
| name: Set version | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| version: ${{steps.version.outputs.version}} | |
| commit: ${{steps.version.outputs.commit}} | |
| publish: ${{steps.version.outputs.publish}} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-tags: true | |
| persist-credentials: false | |
| - name: Set version | |
| id: version | |
| run: | | |
| version=$(git describe --exact-match --tags HEAD 2> /dev/null || true) | |
| publish=false | |
| if [ -z "$version" ]; then | |
| version=$(git log -1 --date=format:"0.%Y.%m%d.%H%M" --format="%ad") | |
| else | |
| publish=true | |
| fi | |
| commit=$(git rev-parse HEAD) | |
| echo "version=$version" >> $GITHUB_OUTPUT | |
| echo "version=$version" | |
| echo "commit=$commit" >> $GITHUB_OUTPUT | |
| echo "commit=$commit" | |
| echo "publish=$publish" >> $GITHUB_OUTPUT | |
| echo "publish=$publish" | |
| linux_x64: | |
| name: Linux (Q8/Q16/Q16-HDRI, x64) | |
| container: | |
| image: mcr.microsoft.com/dotnet/sdk:9.0 | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install dependencies | |
| run: build/linux-x64/install.dependencies.sh | |
| - uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 8.x | |
| - name: Install Magick.Native | |
| run: build/shared/install.Magick.Native.sh "dlemstra" "${{ secrets.GITHUB_TOKEN }}" linux x64 | |
| - name: Build | |
| run: build/shared/build.Magick.NET.sh x64 | |
| - name: Test | |
| run: build/shared/test.Magick.NET.sh x64 | |
| - name: Build OpenMP | |
| run: build/shared/build.Magick.NET.sh x64 OpenMP | |
| - name: Test OpenMP | |
| run: build/shared/test.Magick.NET.sh x64 OpenMP | |
| linux_musl_x64: | |
| name: Linux musl (Q8/Q16/Q16-HDRI, x64) | |
| container: | |
| image: mcr.microsoft.com/dotnet/sdk:9.0-alpine | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install dependencies | |
| run: build/linux-musl-x64/install.dependencies.sh | |
| - uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 8.x | |
| - name: Install Magick.Native | |
| run: build/shared/install.Magick.Native.sh "dlemstra" "${{ secrets.GITHUB_TOKEN }}" linux-musl x64 | |
| - name: Build | |
| run: build/shared/build.Magick.NET.sh x64 | |
| - name: Test | |
| run: build/shared/test.Magick.NET.sh x64 | |
| - name: Build OpenMP | |
| run: build/shared/build.Magick.NET.sh x64 OpenMP | |
| - name: Test OpenMP | |
| run: build/shared/test.Magick.NET.sh x64 OpenMP | |
| linux_arm64: | |
| name: Linux (Q8/Q16/Q16-HDRI, arm64) | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install dependencies | |
| run: build/linux-arm64/install.dependencies.sh | |
| - uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: | | |
| 8.x | |
| 9.x | |
| - name: Install Magick.Native | |
| run: build/shared/install.Magick.Native.sh "dlemstra" "${{ secrets.GITHUB_TOKEN }}" linux arm64 | |
| - name: Build | |
| run: build/shared/build.Magick.NET.sh arm64 | |
| - name: Test | |
| run: build/shared/test.Magick.NET.sh arm64 | |
| - name: Build OpenMP | |
| run: build/shared/build.Magick.NET.sh arm64 OpenMP | |
| - name: Test OpenMP | |
| run: build/shared/test.Magick.NET.sh arm64 OpenMP | |
| macos_x64: | |
| name: MacOS (Q8/Q16/Q16-HDRI) | |
| runs-on: macos-15-intel | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install dependencies | |
| run: build/macos-x64/install.dependencies.sh | |
| - uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 8.x | |
| - name: Install Magick.Native | |
| run: build/shared/install.Magick.Native.sh "dlemstra" "${{ secrets.GITHUB_TOKEN }}" macos x64 | |
| - name: Build | |
| run: build/shared/build.Magick.NET.sh x64 | |
| - name: Test | |
| run: build/shared/test.Magick.NET.sh x64 | |
| macos_arm64: | |
| name: MacOS (Q8/Q16/Q16-HDRI, arm64) | |
| runs-on: macos-14 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install dependencies | |
| run: build/macos-arm64/install.dependencies.sh | |
| - uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 8.x | |
| - 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 arm64 | |
| - name: Test | |
| run: build/shared/test.Magick.NET.sh arm64 | |
| windows_x64: | |
| name: Windows (${{matrix.quantumName}}, ${{matrix.platformName}}) | |
| runs-on: windows-2022 | |
| needs: | |
| - version | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| quantumName: [Q8, Q8-OpenMP, Q16, Q16-OpenMP, Q16-HDRI, Q16-HDRI-OpenMP] | |
| platformName: [x86, x64, Any CPU] | |
| exclude: | |
| - quantumName: Q8-OpenMP | |
| platformName: x86 | |
| - quantumName: Q16-OpenMP | |
| platformName: x86 | |
| - quantumName: Q16-HDRI-OpenMP | |
| platformName: x86 | |
| - quantumName: Q8-OpenMP | |
| platformName: Any CPU | |
| - quantumName: Q16-OpenMP | |
| platformName: Any CPU | |
| - quantumName: Q16-HDRI-OpenMP | |
| platformName: Any CPU | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install dependencies | |
| run: ./install.dependencies.cmd | |
| working-directory: build/windows | |
| - name: Install NuGet | |
| run: ./install.nuget.cmd | |
| working-directory: build/windows | |
| - name: Create nuget.config | |
| run: ./create-nuget-config.cmd "dlemstra" "${{ secrets.GITHUB_TOKEN }}" | |
| working-directory: src/Magick.Native | |
| - name: Install Magick.Native | |
| run: ./install.cmd | |
| working-directory: src/Magick.Native | |
| - name: Build Magick.NET (Test) | |
| run: ./build.Magick.NET.cmd ${{ matrix.quantumName }} "${{ matrix.platformName }}" Test | |
| working-directory: build/windows | |
| - name: Test Magick.NET | |
| run: ./test.Magick.NET.cmd ${{ matrix.quantumName }} "${{ matrix.platformName }}" | |
| working-directory: build/windows | |
| - name: Build Magick.NET (Release) | |
| run: ./build.Magick.NET.cmd ${{ matrix.quantumName }} "${{ matrix.platformName }}" Release | |
| working-directory: build/windows | |
| - name: Create NuGet package | |
| run: ./publish.cmd ${{ matrix.quantumName }} "${{ matrix.platformName }}" "${{ needs.version.outputs.version }}" "${{ needs.version.outputs.commit }}" | |
| working-directory: publish | |
| - name: Upload library | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: Magick.NET-${{ matrix.quantumName }}-${{ matrix.platformName }} | |
| path: publish/output | |
| windows_arm64: | |
| name: Windows (${{matrix.quantumName}}, ${{matrix.platformName}}) | |
| #runs-on: windows-11-arm | |
| runs-on: windows-2022 | |
| needs: | |
| - version | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| quantumName: [Q8, Q8-OpenMP, Q16, Q16-OpenMP, Q16-HDRI, Q16-HDRI-OpenMP] | |
| platformName: [arm64] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install dependencies | |
| run: ./install.dependencies.cmd | |
| working-directory: build/windows | |
| - name: Install NuGet | |
| run: ./install.nuget.cmd | |
| working-directory: build/windows | |
| - name: Create nuget.config | |
| run: ./create-nuget-config.cmd "dlemstra" "${{ secrets.GITHUB_TOKEN }}" | |
| working-directory: src/Magick.Native | |
| - name: Install Magick.Native | |
| run: ./install.cmd | |
| working-directory: src/Magick.Native | |
| # - name: Build Magick.NET (Test) | |
| # run: ./build.Magick.NET.cmd ${{ matrix.quantumName }} "${{ matrix.platformName }}" Test | |
| # working-directory: build/windows | |
| # - name: Test Magick.NET | |
| # run: ./test.Magick.NET.cmd ${{ matrix.quantumName }} "${{ matrix.platformName }}" | |
| # working-directory: build/windows | |
| - name: Build Magick.NET (Release) | |
| run: ./build.Magick.NET.cmd ${{ matrix.quantumName }} "${{ matrix.platformName }}" Release | |
| working-directory: build/windows | |
| - name: Create NuGet package | |
| run: ./publish.cmd ${{ matrix.quantumName }} "${{ matrix.platformName }}" "${{ needs.version.outputs.version }}" "${{ needs.version.outputs.commit }}" | |
| working-directory: publish | |
| - name: Upload library | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: Magick.NET-${{ matrix.quantumName }}-${{ matrix.platformName }} | |
| path: publish/output | |
| libraries: | |
| name: Library | |
| runs-on: windows-2022 | |
| needs: | |
| - version | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| libraryName: [Core, AvaloniaMediaImaging, SystemDrawing, SystemWindowsMedia] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install dependencies | |
| run: ./install.dependencies.cmd | |
| working-directory: build/windows | |
| - name: Install NuGet | |
| run: ./install.nuget.cmd | |
| working-directory: build/windows | |
| - name: Create nuget.config | |
| run: ./create-nuget-config.cmd "dlemstra" "${{ secrets.GITHUB_TOKEN }}" | |
| working-directory: src/Magick.Native | |
| - name: Install Magick.Native | |
| run: ./install.cmd | |
| working-directory: src/Magick.Native | |
| - name: Build Magick.NET.${{ matrix.libraryName }} (Release) | |
| run: ./build.Magick.NET.cmd "Q8" "Any CPU" Release | |
| working-directory: build/windows | |
| - name: Create NuGet package | |
| run: ./publish.library.cmd "Magick.NET.${{ matrix.libraryName }}" "${{ needs.version.outputs.version }}" "${{ needs.version.outputs.commit }}" | |
| working-directory: publish | |
| - name: Upload library | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: Magick.NET.${{ matrix.libraryName }} | |
| path: publish/output | |
| sign: | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| name: Sign NuGet packages | |
| runs-on: windows-2022 | |
| environment: nuget | |
| needs: | |
| - libraries | |
| - linux_arm64 | |
| - linux_musl_x64 | |
| - linux_x64 | |
| - macos_arm64 | |
| - macos_x64 | |
| - version | |
| - windows_arm64 | |
| - windows_x64 | |
| permissions: | |
| id-token: write | |
| contents: read | |
| packages: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Install NuGet | |
| run: ./install.nuget.cmd | |
| working-directory: build/windows | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v6 | |
| with: | |
| path: packages | |
| merge-multiple: true | |
| - name: Install dotnet sign | |
| run: dotnet tool install --global sign --prerelease | |
| - name: Azure CLI login with federated credential | |
| uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0 | |
| with: | |
| client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
| tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
| subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
| - name: Sign NuGet package | |
| run: sign code trusted-signing ` | |
| --trusted-signing-account ImageMagick ` | |
| --trusted-signing-certificate-profile ImageMagick ` | |
| --trusted-signing-endpoint https://eus.codesigning.azure.net ` | |
| --azure-credential-type azure-cli ` | |
| --verbosity information ` | |
| *.nupkg | |
| working-directory: packages | |
| - name: Print cerificate | |
| run: | | |
| pip3 install asn1crypto | |
| python3 ./build/windows/print.publickey.py | |
| - name: NuGet login | |
| uses: NuGet/login@d22cc5f58ff5b88bf9bd452535b4335137e24544 # v1 | |
| id: login | |
| with: | |
| user: dlemstra | |
| - name: Publish NuGet packages | |
| if: needs.version.outputs.publish == 'true' | |
| env: | |
| NUGET_API_KEY: ${{ steps.login.outputs.NUGET_API_KEY }} | |
| run: ../publish/push.cmd | |
| working-directory: packages |