Skip to content

Update MaterialX

Update MaterialX #153

Workflow file for this run

name: main
on:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Windows_VS2019_x64_Python38
os: windows-2019
architecture: x64
cmake_config: -G "Visual Studio 16 2019" -A "x64"
install_file: MaterialX_Windows_VS2019_x64_Python38.zip
run_test: ON
- name: MacOS_Xcode_13_Python39
os: macos-12
compiler: xcode
compiler_version: "13.3"
python: 3.9
install_file: MaterialX_MacOS_Xcode_13_Python39.zip
run_test: ON
- name: Linux_GCC_11_Python39
os: ubuntu-20.04
compiler: gcc
compiler_version: "11"
python: 3.9
install_file: MaterialX_Linux_GCC_11_Python39.zip
run_test: ON
steps:
- name: Sync Repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install libglu1-mesa-dev xorg-dev
if [ "${{ matrix.compiler }}" = "gcc" ]; then
sudo apt-get install -y g++-${{ matrix.compiler_version }} g++-${{ matrix.compiler_version }}-multilib
echo "CC=gcc-${{ matrix.compiler_version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.compiler_version }}" >> $GITHUB_ENV
else
sudo apt-get install -y clang-${{ matrix.compiler_version }} libc++-${{ matrix.compiler_version }}-dev libc++abi-${{ matrix.compiler_version }}-dev
echo "CC=clang-${{ matrix.compiler_version }}" >> $GITHUB_ENV
echo "CXX=clang++-${{ matrix.compiler_version }}" >> $GITHUB_ENV
fi
- name: Install Dependencies (MacOS)
if: runner.os == 'macOS'
run: |
if [ "${{ matrix.compiler }}" = "gcc" ]; then
brew install gcc@${{ matrix.compiler_version }}
echo "CC=gcc-${{ matrix.compiler_version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.compiler_version }}" >> $GITHUB_ENV
else
ls -ls /Applications/
sudo xcode-select -switch /Applications/Xcode_${{ matrix.compiler_version }}.app
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV
fi
- name: Configure CMake
run: |
mkdir build
cd build
cmake -DMATERIALX_TEST_RENDER=OFF ${{matrix.cmake_config}} ..
- name: CMake Build
run: cmake --build . --target install --config Release
working-directory: build
- name: CMake Test
if: matrix.run_test == 'ON'
run: ctest -VV --output-on-failure --build-config Release -j1 -R glTF
working-directory: build
- name: Upload Installed Package
uses: actions/upload-artifact@v3
with:
name: glTF2Mtlx_${{ matrix.name }}
path: build/installed/
if-no-files-found: warn