Skip to content

Commit a0ae83a

Browse files
committed
GA: add smoke tests for Windows and Linux
1 parent 3b7d4e0 commit a0ae83a

File tree

1 file changed

+73
-9
lines changed

1 file changed

+73
-9
lines changed

.github/workflows/run-tests.yml

Lines changed: 73 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ on:
1818
description: Filter (regular expression)
1919
type: string
2020

21-
env:
22-
USD_DOWNLOAD_URL: "https://github.com/pablode/USD/releases/download/v22.11-ci-release/USD22.11_Linux_x64_Python3.8.tar.gz"
23-
USD_INSTALL_PATH: /home/runner/work/USD/USD/INSTALL
24-
GUC_ARTIFACT_NAME: guc_USD22.11_Linux_x64_Python3.8.tar.gz
21+
defaults:
22+
run:
23+
shell: bash
2524

2625
jobs:
2726
build-debug:
@@ -38,12 +37,77 @@ jobs:
3837
build-config: Release
3938
extra-cmake-flags: -DCMAKE_COMPILE_WARNING_AS_ERROR=ON
4039

41-
run-tests:
42-
name: Run Tests
43-
# We require debug builds for all major os families to succeed with the
44-
# warnings-as-errors flag enabled, but only use the Linux image for tests.
45-
needs: build-debug
40+
smoke-test:
41+
name: Smoke Test ${{ matrix.os-family }} (Release)
42+
runs-on: ${{ matrix.image }}
43+
needs: build-release
44+
45+
strategy:
46+
fail-fast: false
47+
matrix:
48+
include:
49+
- os-family: Linux
50+
image: ubuntu-20.04
51+
usd-download-url: "https://github.com/pablode/USD/releases/download/v22.11-ci-release/USD22.11_Linux_x64_Python3.8.tar.gz"
52+
artifact-name: guc_USD22.11_Linux_x64_Python3.8.tar.gz
53+
executable-name: guc
54+
55+
- os-family: Windows
56+
image: windows-2019
57+
usd-download-url: "https://github.com/pablode/USD/releases/download/v22.11-ci-release/USD22.11_Windows_x64_Python3.7.tar.gz"
58+
artifact-name: guc_USD22.11_Windows_x64_Python3.7.tar.gz
59+
executable-name: guc.exe
60+
61+
steps:
62+
- name: Fetch USD binaries
63+
run: curl ${{ matrix.usd-download-url }} -L -v -o USD.tar.gz
64+
65+
- name: Install USD binaries
66+
run: mkdir -p USD_INSTALL && tar -xvf USD.tar.gz -C $PWD/USD_INSTALL
67+
68+
- name: Download guc artifacts
69+
id: download-guc
70+
uses: actions/download-artifact@v3
71+
with:
72+
name: ${{ needs.build-release.outputs.archive-name }}
73+
74+
- name: Install guc
75+
run: mkdir -p GUC_INSTALL && tar -xvf ${{ matrix.artifact-name}} -C $PWD/GUC_INSTALL
76+
77+
- name: Set up environment variables (Linux)
78+
if: matrix.os-family == 'Linux'
79+
run: echo "LD_LIBRARY_PATH=$PWD/USD_INSTALL/lib" >> $GITHUB_ENV
80+
81+
- name: Set up environment variables (Windows)
82+
if: matrix.os-family == 'Windows'
83+
run: |
84+
# We need to use real Windows paths, instead of MSYS2's auto-converted Unix paths
85+
echo "$(pwd -W)/USD_INSTALL/lib" >> $GITHUB_PATH
86+
echo "$(pwd -W)/USD_INSTALL/bin" >> $GITHUB_PATH
87+
88+
- name: Fetch example glTF file
89+
run: mkdir test && curl "https://github.com/KhronosGroup/glTF-Sample-Models/raw/db9ff67c1116cfe28eb36320916bccd8c4127cc1/2.0/ToyCar/glTF-Binary/ToyCar.glb" -L -v -o test/asset.glb
90+
91+
- name: Run test
92+
working-directory: test
93+
run: ../GUC_INSTALL/bin/${{ matrix.executable-name }} asset.glb asset.usda --emit-mtlx
94+
95+
- name: Print output info
96+
working-directory: test
97+
run: |
98+
ls -la .
99+
cat asset.mtlx
100+
cat asset.usda
101+
102+
conversion-tests:
103+
name: Conversion Tests (Debug)
46104
runs-on: ubuntu-20.04
105+
needs: build-debug
106+
107+
env:
108+
USD_DOWNLOAD_URL: "https://github.com/pablode/USD/releases/download/v22.11-ci-release/USD22.11_Linux_x64_Python3.8.tar.gz"
109+
GUC_ARTIFACT_NAME: guc_USD22.11_Linux_x64_Python3.8.tar.gz
110+
USD_INSTALL_PATH: /home/runner/work/USD/USD/INSTALL
47111

48112
steps:
49113
- name: Fetch USD binaries

0 commit comments

Comments
 (0)