Skip to content

Commit

Permalink
Improvements to GitHub CI (AcademySoftwareFoundation#2244)
Browse files Browse the repository at this point in the history
- Move JavaScript builds into their own CI job, improving parallelism between the builds in our main workflow.
- Add Python 3.13 builds for GCC and Clang on Linux.
  • Loading branch information
jstone-lucasfilm authored Feb 23, 2025
1 parent 3a7b6e5 commit 224c3f6
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,17 @@ jobs:
python: 3.7
cmake_config: -DMATERIALX_BUILD_SHARED_LIBS=ON -DMATERIALX_BUILD_MONOLITHIC=ON

- name: Linux_GCC_13_Python311
- name: Linux_GCC_14_Python312
os: ubuntu-24.04
compiler: gcc
compiler_version: "13"
python: 3.11
build_javascript: ON
compiler_version: "14"
python: 3.12

- name: Linux_GCC_14_Python312
- name: Linux_GCC_14_Python313
os: ubuntu-24.04
compiler: gcc
compiler_version: "14"
python: 3.12
python: 3.13

- name: Linux_GCC_CoverageAnalysis
os: ubuntu-24.04
Expand All @@ -53,11 +52,11 @@ jobs:
python: 3.7
cmake_config: -DMATERIALX_BUILD_SHARED_LIBS=ON

- name: Linux_Clang_18_Python312
- name: Linux_Clang_18_Python313
os: ubuntu-24.04
compiler: clang
compiler_version: "18"
python: 3.12
python: 3.13
test_render: ON
clang_format: ON

Expand Down Expand Up @@ -177,22 +176,6 @@ jobs:
if: matrix.python != 'None'
run: pip install setuptools

- name: Install Emscripten
if: matrix.build_javascript == 'ON'
run: |
git clone https://github.com/emscripten-core/emsdk --recursive
cd emsdk
./emsdk install 2.0.20
./emsdk activate 2.0.20
source ./emsdk_env.sh
echo "EMSDK=$EMSDK" >> $GITHUB_ENV
- name: Install Node
if: matrix.build_javascript == 'ON'
uses: actions/setup-node@v4
with:
node-version: '16'

- name: Run Clang Format
if: matrix.clang_format == 'ON'
run: find source \( -name *.h -o -name *.cpp -o -name *.mm -o -name *.inl \) ! -path "*/External/*" ! -path "*/NanoGUI/*" | xargs clang-format -i --verbose
Expand Down Expand Up @@ -313,43 +296,60 @@ jobs:
name: MaterialX_Coverage
path: build/coverage

javascript:
name: JavaScript
runs-on: ubuntu-latest

steps:
- name: Sync Repository
uses: actions/checkout@v4

- name: Install Emscripten
run: |
git clone https://github.com/emscripten-core/emsdk --recursive
cd emsdk
./emsdk install 2.0.20
./emsdk activate 2.0.20
source ./emsdk_env.sh
echo "EMSDK=$EMSDK" >> $GITHUB_ENV
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: '16'

- name: JavaScript CMake Generate
if: matrix.build_javascript == 'ON'
run: cmake -S . -B javascript/build -DMATERIALX_BUILD_JS=ON -DMATERIALX_EMSDK_PATH=${{ env.EMSDK }}

- name: JavaScript CMake Build
if: matrix.build_javascript == 'ON'
run: cmake --build javascript/build --target install --config Release --parallel 2

- name: JavaScript Unit Tests
if: matrix.build_javascript == 'ON'
run: |
npm install
npm run test
npm run test:browser
working-directory: javascript/MaterialXTest

- name: Build Web Viewer
if: matrix.build_javascript == 'ON'
run: |
npm install
npm run build
working-directory: javascript/MaterialXView

- name: Deploy Web Viewer
if: matrix.build_javascript == 'ON' && github.event_name != 'pull_request'
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.6.4
with:
branch: gh-pages
folder: javascript/MaterialXView/dist
single-commit: true

- name: Upload JavaScript Package
if: matrix.build_javascript == 'ON'
uses: actions/upload-artifact@v4
with:
name: MaterialX_JavaScript
path: javascript/build/installed/JavaScript/MaterialX
path: javascript/build/installed/JavaScript/MaterialX

sdist:
name: Python SDist
Expand Down

0 comments on commit 224c3f6

Please sign in to comment.