Skip to content

Commit

Permalink
Adjust build matrix and compilers to support msvc 2022
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaScheller committed Jul 28, 2024
1 parent f2c5a68 commit cf0a8ff
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/houdini_build.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set HFS=C:\Program Files\Side Effects Software\Houdini
set AR_DCC_NAME=HOUDINI
set AR_RESOLVER_NAME=%1
cmake . -B build -G "Visual Studio 16 2019" -A x64 -T v142
cmake . -B build -G %2 -A x64 -T %3
cmake --build build --clean-first --config Release
cmake --install build
78 changes: 62 additions & 16 deletions .github/workflows/build_houdini.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,26 +85,18 @@ jobs:
name: UsdAssetResolver-linux-${{ matrix.houdini_product_name }}-${{ matrix.houdini_product_version }}
path: artifacts/*.zip

build_windows:
build_windows_2019:
runs-on: windows-2019
environment: houdini
strategy:
matrix:
houdini_product_name: ["houdini", "houdini-py310", "houdini-py39", "houdini-py37"]
houdini_product_version: ["19.5", "20.0", "20.5"]
houdini_product_name: ["houdini", "houdini-py39", "houdini-py37"]
houdini_product_version: ["19.5", "20.0"]
exclude:
- houdini_product_name: "houdini-py39"
houdini_product_version: "19.5"
- houdini_product_name: "houdini-py310"
houdini_product_version: "19.5"
- houdini_product_name: "houdini-py37"
houdini_product_version: "20.0"
- houdini_product_name: "houdini-py310"
houdini_product_version: "20.0"
- houdini_product_name: "houdini-py37"
houdini_product_version: "20.5"
- houdini_product_name: "houdini-py39"
houdini_product_version: "20.5"
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -133,16 +125,16 @@ jobs:
python3 .github\scripts\houdini.py --install --install_houdini_product_name ${{ matrix.houdini_product_name }} --install_houdini_product_version ${{ matrix.houdini_product_version }}
- name: Build USD File Resolver
run: |
.\.github\scripts\houdini_build.bat fileResolver
.\.github\scripts\houdini_build.bat fileResolver "Visual Studio 16 2019" "v142"
- name: Build USD Python Resolver
run: |
.\.github\scripts\houdini_build.bat pythonResolver
.\.github\scripts\houdini_build.bat pythonResolver "Visual Studio 16 2019" "v142"
- name: Build USD Cached Resolver
run: |
.\.github\scripts\houdini_build.bat cachedResolver
.\.github\scripts\houdini_build.bat cachedResolver "Visual Studio 16 2019" "v142"
- name: Build USD Http Resolver
run: |
.\.github\scripts\houdini_build.bat httpResolver
.\.github\scripts\houdini_build.bat httpResolver "Visual Studio 16 2019" "v142"
- name: Create single .zip archive
run: |
& python $pwd\.github\scripts\houdini.py --artifact --artifact_src=$pwd\dist --artifact_dst=$pwd\artifacts --artifact_prefix=UsdAssetResolver --artifact_product_name ${{ matrix.houdini_product_name }}
Expand All @@ -152,11 +144,65 @@ jobs:
name: UsdAssetResolver-windows-${{ matrix.houdini_product_name }}-${{ matrix.houdini_product_version }}
path: artifacts/*.zip

build_windows_2022:
runs-on: windows-2022
environment: houdini
strategy:
matrix:
houdini_product_name: ["houdini", "houdini-py310"]
houdini_product_version: ["20.5"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Switch to latest release tag
run: |
git fetch --all --tags --force
$latest_release_tag=git tag -l --sort=-version:refname v* | select -first 1
git checkout tags/$latest_release_tag
- name: Install system packages
run: |
pip3 install requests
# - name: Cache Houdini
# id: cache-houdini-windows
# uses: actions/cache@v3
# with:
# path: "C:\\Program Files\\Side Effects Software"
# key: ${{ runner.os }}-houdini
- name: Install Houdini
# if: steps.cache-houdini-windows.outputs.cache-hit != 'true'
env:
SIDEFX_CLIENT_ID: '${{ secrets.SIDEFX_CLIENT_ID }}'
SIDEFX_CLIENT_SECRET_KEY: '${{ secrets.SIDEFX_CLIENT_SECRET_KEY }}'
run: |
python3 .github\scripts\houdini.py --install --install_houdini_product_name ${{ matrix.houdini_product_name }} --install_houdini_product_version ${{ matrix.houdini_product_version }}
- name: Build USD File Resolver
run: |
.\.github\scripts\houdini_build.bat fileResolver "Visual Studio 17 2022" "v143"
- name: Build USD Python Resolver
run: |
.\.github\scripts\houdini_build.bat pythonResolver "Visual Studio 17 2022" "v143"
- name: Build USD Cached Resolver
run: |
.\.github\scripts\houdini_build.bat cachedResolver "Visual Studio 17 2022" "v143"
- name: Build USD Http Resolver
run: |
.\.github\scripts\houdini_build.bat httpResolver "Visual Studio 17 2022" "v143"
- name: Create single .zip archive
run: |
& python $pwd\.github\scripts\houdini.py --artifact --artifact_src=$pwd\dist --artifact_dst=$pwd\artifacts --artifact_prefix=UsdAssetResolver --artifact_product_name ${{ matrix.houdini_product_name }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: UsdAssetResolver-windows-${{ matrix.houdini_product_name }}-${{ matrix.houdini_product_version }}
path: artifacts/*.zip

deploy:
runs-on: ubuntu-latest
permissions:
contents: write
needs: [build_linux, build_windows]
needs: [build_linux, build_windows_2019, build_windows_2022]
strategy:
matrix:
os: ["linux", "windows"]
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
project(${AR_PROJECT_NAME} VERSION 1.0.0 LANGUAGES CXX)

### CPP Settings ###
set(CMAKE_CXX_STANDARD 17)
set(BUILD_SHARED_LIBS ON)
# Preprocessor Defines (Same as #define)
add_compile_definitions(HBOOST_ALL_NO_LIB BOOST_ALL_NO_LIB)
Expand Down
3 changes: 2 additions & 1 deletion build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ REM set AR_DCC_NAME=HOUDINI
REM Clear existing build data and invoke cmake
rmdir /S /Q build
rmdir /S /Q dist
cmake . -B build -G "Visual Studio 16 2019" -A x64 -T v142
REM Make sure to match the correct VS version the DCC was built with
cmake . -B build -G "Visual Studio 17 2022" -A x64 -T v143
cmake --build build --clean-first --config Release
cmake --install build
5 changes: 3 additions & 2 deletions docs/src/installation/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Since the Usd Asset Resolver API changed with the AR 2.0 standard proposed in th
|------------------------|------------------------------------------------------------------------|----------------------|---------------|
| gcc | [https://gcc.gnu.org](https://gcc.gnu.org/) | 11.2.1 | 13.1.1 |
| cmake | [https://cmake.org](https://cmake.org/) | 3.26.4 | 3.26.4 |
| SideFX Houdini | [SideFX Houdini](https://www.sidefx.com) | 19.5 | 19.5 |
| SideFX Houdini | [SideFX Houdini](https://www.sidefx.com) | 19.5 | 20.5 |
| Autodesk Maya | [Autodesk Maya](https://www.autodesk.com/ca-en/products/maya/overview) | 2024 | 2024 |
| Autodesk Maya USD SDK | [Autodesk Maya USD SDK](https://github.com/Autodesk/maya-usd) | 0.27.0 | 0.27.0 |
```
Expand All @@ -26,7 +26,8 @@ Since the Usd Asset Resolver API changed with the AR 2.0 standard proposed in th
```admonish success title=""
| Software | Website | Min (Not Tested) | Max (Tested) |
|------------------------|------------------------------------------------------------------------------------|----------------------|---------------|
|Visual Studio 16 2019 | [https://visualstudio.microsoft.com/vs/](https://visualstudio.microsoft.com/vs/) | 11.2.1 | 13.1.1 |
|Visual Studio 16 2019 | [https://visualstudio.microsoft.com/vs/](https://visualstudio.microsoft.com/vs/) | - | - |
|Visual Studio 17 2022 | [https://visualstudio.microsoft.com/vs/](https://visualstudio.microsoft.com/vs/) | - | - |
| cmake | [https://cmake.org](https://cmake.org/) | 3.26.4 | 3.26.4 |
| SideFX Houdini | [SideFX Houdini](https://www.sidefx.com) | 19.5 | 19.5 |
| Autodesk Maya | [Autodesk Maya](https://www.autodesk.com/ca-en/products/maya/overview) | 2024 | 2024 |
Expand Down

0 comments on commit cf0a8ff

Please sign in to comment.