Skip to content

Testing installer on linux #16

Testing installer on linux

Testing installer on linux #16

Workflow file for this run

name: macOS Build
on:
push:
branches: [develop, main]
tags: ["*-prealpha"]
pull_request:
branches: [develop, main]
workflow_dispatch:
env:
USD_VERSION: "26.03"
PYTHON_VERSION: "3.11"
USD_INSTALL_DIR: usd-install
BUILD_TYPE: Release
jobs:
build-usd:
runs-on: macos-14
outputs:
cache-key: ${{ steps.cache-key.outputs.value }}
steps:
- name: Compute cache key
id: cache-key
run: |
XCODE_VER=$(xcodebuild -version | head -1 | awk '{print $2}')
echo "value=usd-macos-${{ env.USD_VERSION }}-xcode${XCODE_VER}-py${{ env.PYTHON_VERSION }}" >> $GITHUB_OUTPUT
- name: Cache USD
id: cache-usd
uses: actions/cache@v4
with:
path: ${{ env.USD_INSTALL_DIR }}
key: ${{ steps.cache-key.outputs.value }}
- name: Install build dependencies
if: steps.cache-usd.outputs.cache-hit != 'true'
run: brew install cmake ninja tbb glew
- name: Install Python Jinja2
if: steps.cache-usd.outputs.cache-hit != 'true'
run: |
python3 -m venv .venv
.venv/bin/pip install jinja2
echo "${{ github.workspace }}/.venv/bin" >> $GITHUB_PATH
- name: Checkout OpenUSD ${{ env.USD_VERSION }}
if: steps.cache-usd.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: PixarAnimationStudios/OpenUSD
ref: v${{ env.USD_VERSION }}
path: OpenUSD
fetch-depth: 1
- name: Build USD
if: steps.cache-usd.outputs.cache-hit != 'true'
run: |
python3 OpenUSD/build_scripts/build_usd.py \
--embree \
--no-python --no-usdview \
--no-examples --no-tutorials --no-docs \
--build-variant release \
${{ github.workspace }}/${{ env.USD_INSTALL_DIR }}
- name: Remove USD build artifacts from install dir
if: steps.cache-usd.outputs.cache-hit != 'true'
run: rm -rf ${{ github.workspace }}/${{ env.USD_INSTALL_DIR }}/build
build-usdtweak:
runs-on: macos-14
needs: build-usd
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Restore USD cache
uses: actions/cache/restore@v4
with:
path: ${{ env.USD_INSTALL_DIR }}
key: ${{ needs.build-usd.outputs.cache-key }}
- name: Install dependencies
run: brew install tbb glew
- name: Configure
run: |
cmake -G Ninja \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
"-DCMAKE_PREFIX_PATH=${{ github.workspace }}/${{ env.USD_INSTALL_DIR }};$(brew --prefix tbb);$(brew --prefix glew)" \
-Dpxr_DIR=${{ github.workspace }}/${{ env.USD_INSTALL_DIR }} \
-B build
- name: Build
run: cmake --build build
- name: Package (CPack DragNDrop)
run: cd build && cpack
- name: Upload DMG artifact
uses: actions/upload-artifact@v4
with:
name: usdtweak-macos-dmg
path: build/usdtweak-*.dmg
release:
runs-on: ubuntu-latest
needs: build-usdtweak
if: (startsWith(github.ref, 'refs/tags/') && endsWith(github.ref, '-prealpha')) || github.event_name == 'workflow_dispatch'
steps:
- name: Download DMG artifact
uses: actions/download-artifact@v4
with:
name: usdtweak-macos-dmg
- name: Upload to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: "*.dmg"
draft: true
prerelease: true