Build Assimp Libraries #3
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
name: Build Assimp Libraries | |
on: [workflow_dispatch] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
arch: x86_64 | |
cmake-arch: x64 | |
- os: linux | |
arch: arm64 | |
cmake-arch: aarch64 | |
runner-label: self-hosted | |
- os: windows-latest | |
arch: x86_64 | |
triplet: x64-windows | |
cmake-arch: x64 | |
- os: windows-latest | |
arch: x86 | |
triplet: x86-windows | |
cmake-arch: win32 | |
- os: windows-latest | |
arch: arm64 | |
triplet: arm64-windows | |
cmake-arch: arm64 | |
- os: macos-latest | |
arch: x86_64 | |
cmake-arch: x86_64 | |
- os: macos-latest | |
arch: arm64 | |
cmake-arch: arm64 | |
steps: | |
- uses: actions/checkout@v4.1.7 | |
with: | |
repository: "assimp/assimp" | |
path: "assimp" | |
ref: "v5.4.3" | |
submodules: true | |
- name: Install Dependencies on Ubuntu | |
if: matrix.os == 'linux' || matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential cmake | |
- name: Configure Assimp with CMake on Linux | |
if: matrix.os == 'linux' || matrix.os == 'ubuntu-latest' | |
run: | | |
cd assimp | |
cmake -S ./ -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_SYSTEM_PROCESSOR=${{ matrix.cmake-arch }} -DBUILD_SHARED_LIBS=ON -DASSIMP_BUILD_TESTS=OFF | |
- name: Configure Assimp with CMake on Windows | |
if: matrix.os == 'windows-latest' && matrix.arch != 'arm64' | |
run: | | |
cd assimp | |
cmake -S ./ -B ./build -DCMAKE_BUILD_TYPE=Release -A ${{ matrix.cmake-arch }} -DBUILD_SHARED_LIBS=ON -DASSIMP_BUILD_TESTS=OFF | |
- name: Configure Assimp with CMake on Windows (ARM64) | |
if: matrix.os == 'windows-latest' && matrix.arch == 'arm64' | |
run: | | |
cd assimp | |
cmake -S ./ -B ./build -DCMAKE_BUILD_TYPE=Release -A ${{ matrix.cmake-arch }} -DBUILD_SHARED_LIBS=ON -DASSIMP_BUILD_TESTS=OFF -DCMAKE_SYSTEM_VERSION=10.0.26100.0 | |
- name: Configure Assimp with CMake on macOS | |
if: matrix.os == 'macos-latest' | |
run: | | |
cd assimp | |
cmake -S ./ -B ./build -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=${{ matrix.cmake-arch }} -DBUILD_SHARED_LIBS=ON -DASSIMP_BUILD_TESTS=OFF | |
- name: Build Assimp | |
run: cmake --build assimp/build --config Release | |
- name: Move Windows binaries | |
if: matrix.os == 'windows-latest' | |
run: | | |
mv assimp/build/bin/Release/*.dll assimp/build/bin/ | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4.3.4 | |
with: | |
name: assimp-${{ matrix.os }}-${{ matrix.arch }}-artifacts | |
path: | | |
assimp/build/bin/*.dll | |
assimp/build/bin/*.so | |
assimp/build/bin/*.dylib | |
if-no-files-found: ignore # 'warn' or 'ignore' or 'error' |