Compare commits
4 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f747a19f3c | ||
|
|
33dbe75e24 | ||
|
|
926a49033c | ||
|
|
02ad50b373 |
2 changed files with 63 additions and 47 deletions
108
.github/workflows/dotnet.yml
vendored
108
.github/workflows/dotnet.yml
vendored
|
|
@ -23,16 +23,28 @@ jobs:
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
run: dnf install -y cmake gcc gcc-c++
|
run: dnf install -y cmake gcc gcc-c++
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
run: cmake -B "build" -DRAGEPHOTO_C_LIBRARY=ON -DRAGEPHOTO_EXTRACT=OFF -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
run: |
|
||||||
|
cmake -B "build/shared" -DRAGEPHOTO_C_LIBRARY=ON -DRAGEPHOTO_EXTRACT=OFF -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||||
|
cmake -B "build/static" -DRAGEPHOTO_C_LIBRARY=ON -DRAGEPHOTO_EXTRACT=OFF -DRAGEPHOTO_STATIC=ON -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build "build" --config ${{env.BUILD_TYPE}}
|
run: |
|
||||||
|
cmake --build "build/shared" --config ${{env.BUILD_TYPE}}
|
||||||
|
cmake --build "build/static" --config ${{env.BUILD_TYPE}}
|
||||||
- name: Install
|
- name: Install
|
||||||
run: cmake --install "build" --config ${{env.BUILD_TYPE}} --prefix "install/"
|
run: |
|
||||||
|
cmake --install "build/shared" --config ${{env.BUILD_TYPE}} --prefix "install/shared/"
|
||||||
|
cmake --install "build/static" --config ${{env.BUILD_TYPE}} --prefix "install/static/"
|
||||||
|
- name: Preparing for Upload
|
||||||
|
run: |
|
||||||
|
mkdir "artifacts"
|
||||||
|
cp "install/shared/lib64/libragephoto.so" \
|
||||||
|
"install/static/lib64/libragephoto.a" \
|
||||||
|
"artifacts/"
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v5
|
uses: actions/upload-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: Linux ${{matrix.arch}}
|
name: Linux ${{matrix.arch}}
|
||||||
path: ${{github.workspace}}/install/lib64/libragephoto.so
|
path: ${{github.workspace}}/artifacts/
|
||||||
macOS:
|
macOS:
|
||||||
runs-on: ${{matrix.runner}}
|
runs-on: ${{matrix.runner}}
|
||||||
env:
|
env:
|
||||||
|
|
@ -49,16 +61,28 @@ jobs:
|
||||||
- name: Cloning
|
- name: Cloning
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
run: cmake -B "${{github.workspace}}/build" -DRAGEPHOTO_C_LIBRARY=ON -DRAGEPHOTO_EXTRACT=OFF -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_DEPLOYMENT_TARGET=${{env.OSX_DEPLOYMENT_TARGET}} -GNinja
|
run: |
|
||||||
|
cmake -B "${{github.workspace}}/build/shared" -DRAGEPHOTO_C_LIBRARY=ON -DRAGEPHOTO_EXTRACT=OFF -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_DEPLOYMENT_TARGET=${{env.OSX_DEPLOYMENT_TARGET}}
|
||||||
|
cmake -B "${{github.workspace}}/build/static" -DRAGEPHOTO_C_LIBRARY=ON -DRAGEPHOTO_EXTRACT=OFF -DRAGEPHOTO_STATIC=ON -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_OSX_DEPLOYMENT_TARGET=${{env.OSX_DEPLOYMENT_TARGET}}
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build "${{github.workspace}}/build" --config ${{env.BUILD_TYPE}}
|
run: |
|
||||||
|
cmake --build "${{github.workspace}}/build/shared" --config ${{env.BUILD_TYPE}}
|
||||||
|
cmake --build "${{github.workspace}}/build/static" --config ${{env.BUILD_TYPE}}
|
||||||
- name: Install
|
- name: Install
|
||||||
run: cmake --install "${{github.workspace}}/build" --config ${{env.BUILD_TYPE}} --prefix "${{github.workspace}}/install/"
|
run: |
|
||||||
|
cmake --install "${{github.workspace}}/build/shared" --config ${{env.BUILD_TYPE}} --prefix "${{github.workspace}}/install/shared/"
|
||||||
|
cmake --install "${{github.workspace}}/build/static" --config ${{env.BUILD_TYPE}} --prefix "${{github.workspace}}/install/static/"
|
||||||
|
- name: Preparing for Upload
|
||||||
|
run: |
|
||||||
|
mkdir "artifacts"
|
||||||
|
cp "install/shared/lib/libragephoto.dylib" \
|
||||||
|
"install/static/lib/libragephoto.a" \
|
||||||
|
"artifacts/"
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v5
|
uses: actions/upload-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: macOS ${{matrix.arch}}
|
name: macOS ${{matrix.arch}}
|
||||||
path: ${{github.workspace}}/install/lib/libragephoto.dylib
|
path: ${{github.workspace}}/artifacts/
|
||||||
Windows:
|
Windows:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
strategy:
|
strategy:
|
||||||
|
|
@ -79,76 +103,68 @@ jobs:
|
||||||
with:
|
with:
|
||||||
arch: ${{matrix.msvc}}
|
arch: ${{matrix.msvc}}
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
run: cmake -B "${{github.workspace}}/build" -DRAGEPHOTO_C_LIBRARY=ON -DRAGEPHOTO_EXTRACT=OFF -DRAGEPHOTO_UNICODE=wincvt -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -GNinja
|
run: |
|
||||||
|
cmake -B "${{github.workspace}}/build/shared" -DRAGEPHOTO_C_LIBRARY=ON -DRAGEPHOTO_EXTRACT=OFF -DRAGEPHOTO_UNICODE=wincvt -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||||
|
cmake -B "${{github.workspace}}/build/static" -DRAGEPHOTO_C_LIBRARY=ON -DRAGEPHOTO_EXTRACT=OFF -DRAGEPHOTO_STATIC=ON -DRAGEPHOTO_UNICODE=wincvt -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build "${{github.workspace}}/build" --config ${{env.BUILD_TYPE}}
|
run: |
|
||||||
|
cmake --build "${{github.workspace}}/build/shared" --config ${{env.BUILD_TYPE}}
|
||||||
|
cmake --build "${{github.workspace}}/build/static" --config ${{env.BUILD_TYPE}}
|
||||||
- name: Install
|
- name: Install
|
||||||
run: cmake --install "${{github.workspace}}/build" --config ${{env.BUILD_TYPE}} --prefix "${{github.workspace}}/install"
|
run: |
|
||||||
|
cmake --install "${{github.workspace}}/build/shared" --config ${{env.BUILD_TYPE}} --prefix "${{github.workspace}}/install/shared/"
|
||||||
|
cmake --install "${{github.workspace}}/build/static" --config ${{env.BUILD_TYPE}} --prefix "${{github.workspace}}/install/static/"
|
||||||
|
- name: Preparing for Upload
|
||||||
|
run: |
|
||||||
|
mkdir "artifacts"
|
||||||
|
Copy-Item "install\shared\bin\libragephoto.dll" "artifacts\"
|
||||||
|
Copy-Item "install\static\lib\ragephoto.lib" "artifacts\"
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v5
|
uses: actions/upload-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: Windows MSVC ${{matrix.arch}}
|
name: Windows MSVC ${{matrix.arch}}
|
||||||
path: ${{github.workspace}}/install/bin/libragephoto.dll
|
path: ${{github.workspace}}/artifacts/
|
||||||
Release:
|
Release:
|
||||||
needs: [Linux, macOS, Windows]
|
needs: [Linux, macOS, Windows]
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: pwsh
|
|
||||||
steps:
|
steps:
|
||||||
- name: Cloning
|
- name: Cloning
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
- name: Download Linux arm64 Assets
|
- name: Download Linux arm64 Artifacts
|
||||||
uses: actions/download-artifact@v6
|
uses: actions/download-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: Linux arm64
|
name: Linux arm64
|
||||||
path: assets/linux-arm64
|
path: ${{github.workspace}}/src/dotnet/runtimes/linux-arm64/native
|
||||||
- name: Download Linux x64 Assets
|
- name: Download Linux x64 Artifacts
|
||||||
uses: actions/download-artifact@v6
|
uses: actions/download-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: Linux x64
|
name: Linux x64
|
||||||
path: assets/linux-x64
|
path: ${{github.workspace}}/src/dotnet/runtimes/linux-x64/native
|
||||||
- name: Download macOS arm64 Assets
|
- name: Download macOS arm64 Artifacts
|
||||||
uses: actions/download-artifact@v6
|
uses: actions/download-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: macOS arm64
|
name: macOS arm64
|
||||||
path: assets/osx-arm64
|
path: ${{github.workspace}}/src/dotnet/runtimes/osx-arm64/native
|
||||||
- name: Download macOS x64 Assets
|
- name: Download macOS x64 Artifacts
|
||||||
uses: actions/download-artifact@v6
|
uses: actions/download-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: macOS x64
|
name: macOS x64
|
||||||
path: assets/osx-x64
|
path: ${{github.workspace}}/src/dotnet/runtimes/osx-x64/native
|
||||||
- name: Download Windows arm64 Assets
|
- name: Download Windows arm64 Artifacts
|
||||||
uses: actions/download-artifact@v6
|
uses: actions/download-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: Windows MSVC arm64
|
name: Windows MSVC arm64
|
||||||
path: assets/win-arm64
|
path: ${{github.workspace}}/src/dotnet/runtimes/win-arm64/native
|
||||||
- name: Download Windows x64 Assets
|
- name: Download Windows x64 Artifacts
|
||||||
uses: actions/download-artifact@v6
|
uses: actions/download-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: Windows MSVC x64
|
name: Windows MSVC x64
|
||||||
path: assets/win-x64
|
path: ${{github.workspace}}/src/dotnet/runtimes/win-x64/native
|
||||||
- name: Download Windows x86 Assets
|
- name: Download Windows x86 Artifacts
|
||||||
uses: actions/download-artifact@v6
|
uses: actions/download-artifact@v6
|
||||||
with:
|
with:
|
||||||
name: Windows MSVC x86
|
name: Windows MSVC x86
|
||||||
path: assets/win-x86
|
path: ${{github.workspace}}/src/dotnet/runtimes/win-x86/native
|
||||||
- name: Copy Assets
|
|
||||||
run: |
|
|
||||||
mkdir -p "${{github.workspace}}\src\dotnet\runtimes\linux-arm64\native"
|
|
||||||
mkdir -p "${{github.workspace}}\src\dotnet\runtimes\linux-x64\native"
|
|
||||||
mkdir -p "${{github.workspace}}\src\dotnet\runtimes\osx-arm64\native"
|
|
||||||
mkdir -p "${{github.workspace}}\src\dotnet\runtimes\osx-x64\native"
|
|
||||||
mkdir -p "${{github.workspace}}\src\dotnet\runtimes\win-arm64\native"
|
|
||||||
mkdir -p "${{github.workspace}}\src\dotnet\runtimes\win-x64\native"
|
|
||||||
mkdir -p "${{github.workspace}}\src\dotnet\runtimes\win-x86\native"
|
|
||||||
cp "${{github.workspace}}\assets\linux-arm64\libragephoto.so" "${{github.workspace}}\src\dotnet\runtimes\linux-arm64\native\libragephoto.so"
|
|
||||||
cp "${{github.workspace}}\assets\linux-x64\libragephoto.so" "${{github.workspace}}\src\dotnet\runtimes\linux-x64\native\libragephoto.so"
|
|
||||||
cp "${{github.workspace}}\assets\osx-arm64\libragephoto.dylib" "${{github.workspace}}\src\dotnet\runtimes\osx-arm64\native\libragephoto.dylib"
|
|
||||||
cp "${{github.workspace}}\assets\osx-x64\libragephoto.dylib" "${{github.workspace}}\src\dotnet\runtimes\osx-x64\native\libragephoto.dylib"
|
|
||||||
cp "${{github.workspace}}\assets\win-arm64\libragephoto.dll" "${{github.workspace}}\src\dotnet\runtimes\win-arm64\native\libragephoto.dll"
|
|
||||||
cp "${{github.workspace}}\assets\win-x64\libragephoto.dll" "${{github.workspace}}\src\dotnet\runtimes\win-x64\native\libragephoto.dll"
|
|
||||||
cp "${{github.workspace}}\assets\win-x86\libragephoto.dll" "${{github.workspace}}\src\dotnet\runtimes\win-x86\native\libragephoto.dll"
|
|
||||||
- name: Setup MSBuild
|
- name: Setup MSBuild
|
||||||
uses: microsoft/setup-msbuild@v2
|
uses: microsoft/setup-msbuild@v2
|
||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
|
|
@ -161,4 +177,4 @@ jobs:
|
||||||
uses: actions/upload-artifact@v5
|
uses: actions/upload-artifact@v5
|
||||||
with:
|
with:
|
||||||
name: NuGet Package
|
name: NuGet Package
|
||||||
path: ${{github.workspace}}\src\dotnet\bin\${{env.BUILD_TYPE}}\RagePhoto.Core.*.nupkg
|
path: ${{github.workspace}}/src/dotnet/bin/${{env.BUILD_TYPE}}/RagePhoto.Core.*.nupkg
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<NativeDlls Include="runtimes\**\libragephoto.*" />
|
<NativeDlls Include="runtimes\**\*ragephoto.*" />
|
||||||
<None Include="@(NativeDlls)" Pack="true" PackagePath="runtimes\%(RecursiveDir)%(Filename)%(Extension)">
|
<None Include="@(NativeDlls)" Pack="true" PackagePath="runtimes\%(RecursiveDir)%(Filename)%(Extension)">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue