Skip to content

Commit

Permalink
Merge pull request #736 from CesiumGS/fix-ci
Browse files Browse the repository at this point in the history
Fix CI
  • Loading branch information
lilleyse authored Oct 1, 2024
2 parents 60aa7b2 + c69d516 commit c8daba3
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 144 deletions.
23 changes: 8 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:
name: "Ubuntu - GCC",
artifact: "linux-gcc.tar.xz",
os: ubuntu-latest,
cc: "gcc-11",
cxx: "g++-11",
cc: "gcc-13",
cxx: "g++-13",
build-type: "Release",
build-code: "Ubuntu",
cache-type: "Linux",
Expand All @@ -46,8 +46,8 @@ jobs:
name: "AlmaLinux 8 - GCC",
artifact: "linux-gcc.tar.xz",
os: ubuntu-latest,
cc: "gcc-11",
cxx: "g++-11",
cc: "gcc-13",
cxx: "g++-13",
build-type: "Release",
build-code: "AlmaLinux8",
cache-type: "Linux",
Expand All @@ -56,13 +56,6 @@ jobs:
}

steps:
- name: Removed unneeded packages to gain disk space (Unix)
if: runner.os != 'Windows'
run: |
df -h
sudo apt-get update
sudo apt remove google-chrome-stable x11-common xserver-common aspnetcore-runtime-6.0 aspnetcore-runtime-7.0 aspnetcore-runtime-8.0 aspnetcore-targeting-pack-6.0 aspnetcore-targeting-pack-7.0 aspnetcore-targeting-pack-8.0 dotnet-apphost-pack-6.0 dotnet-apphost-pack-7.0 dotnet-apphost-pack-8.0 dotnet-host dotnet-hostfxr-6.0 dotnet-hostfxr-7.0 dotnet-hostfxr-8.0 dotnet-runtime-6.0 dotnet-runtime-7.0 dotnet-runtime-8.0 dotnet-runtime-deps-6.0 dotnet-runtime-deps-7.0 dotnet-runtime-deps-8.0 dotnet-sdk-6.0 dotnet-sdk-7.0 dotnet-sdk-8.0 dotnet-targeting-pack-6.0 dotnet-targeting-pack-7.0 dotnet-targeting-pack-8.0 eatmydata emacsen-common firebird3.0-common-doc firebird3.0-common firefox kubectl mercurial-common mercurial microsoft-edge-stable mssql-tools mysql-client-8.0 mysql-client-core-8.0 mysql-client mysql-common mysql-server-8.0 php8.1 postgresql-14
df -h
- uses: actions/checkout@v3
with:
submodules: recursive
Expand Down Expand Up @@ -94,7 +87,7 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ env.CONAN_USER_HOME }}/.conan
key: conan-${{ matrix.config.name }}-${{ hashFiles('cmake/AddConanDependencies.cmake') }}-v3
key: conan-${{ matrix.config.name }}-${{ hashFiles('cmake/AddConanDependencies.cmake') }}-v4

# Tell ezvcpkg to look for or create its build folder (.ezvcpkg) in the repository's root directory
# This is partly done to make the directory easily accessible to Docker builds
Expand Down Expand Up @@ -145,8 +138,8 @@ jobs:
if: ${{ runner.os == 'Linux' && matrix.config.name != 'AlmaLinux 8 - GCC' }}
run: |
sudo apt update
sudo apt install -y doxygen clang-tidy-15 gcovr nvidia-driver-535
sudo pip3 install conan==1.63.0 black==23.1.0 flake8==6.0.0
sudo apt install -y doxygen clang-tidy-15 gcovr
sudo pip3 install conan==1.63.0 black==23.1.0 flake8==7.1.1 --break-system-packages --ignore-installed
# Could not figure out how to add Chocolatey libraries to the PATH automatically with refreshenv, so
# hardcoding their locations instead. Followed these instructions for adding to the PATH on PowerShell:
Expand All @@ -158,7 +151,7 @@ jobs:
run: |
choco install -y conan --version 1.63.0
choco install -y llvm --version=15.0.7 --allow-downgrade
pip3 install black==23.1.0 flake8==6.0.0 requests
pip3 install black==23.1.0 flake8==7.1.1 requests
echo "C:/Program Files/conan/conan" >> $env:GITHUB_PATH
# Note: CMAKE_BUILD_TYPE is only used by Linux. It is ignored for Windows.
Expand Down
5 changes: 1 addition & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -572,12 +572,9 @@ execute_process(COMMAND "${Python3_EXECUTABLE}" "${SCRIPTS_DIRECTORY}/update_cer
get_property(INSTALL_SEARCH_PATHS GLOBAL PROPERTY NVIDIA_ADDITIONAL_SEARCH_PATHS_PROPERTY)

# Skip system libraries when running install
set(INSTALL_PRE_EXCLUDE_REGEXES "api-ms-*" "ext-ms-*" "cuda")
set(INSTALL_PRE_EXCLUDE_REGEXES "api-ms-*" "ext-ms-*")
set(INSTALL_POST_EXCLUDE_REGEXES "system32" "^\/lib")

# Skip all runtime dependencies except nvrtc when installing to exts/cesium-omniverse/bin
set(INSTALL_PRE_INCLUDE_REGEXES "nvrtc")

install(
TARGETS CesiumUsdSchemas
ARCHIVE DESTINATION ${KIT_PLUGIN_EXTENSION_BIN_PATH} COMPONENT install
Expand Down
14 changes: 4 additions & 10 deletions docker/AlmaLinux8.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
FROM almalinux:8

RUN dnf upgrade -y --refresh
RUN dnf install -y 'dnf-command(config-manager)'

RUN dnf config-manager --add-repo=https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo

# Extra repositories that have newer versions of some packages
RUN dnf install -y -q epel-release
Expand All @@ -15,8 +12,8 @@ RUN dnf install -y -q \
git \
git-lfs \
wget \
gcc-toolset-11 \
gcc-toolset-11-libubsan-devel \
gcc-toolset-13 \
gcc-toolset-13-libubsan-devel \
make \
doxygen \
curl-devel \
Expand All @@ -32,11 +29,8 @@ RUN dnf install -y -q \
sqlite-devel \
xz-devel

# Install the nvidia driver.
RUN dnf module install -y -q nvidia-driver:535-dkms

# Enables gcc 11 for use within the docker image.
RUN echo "source /opt/rh/gcc-toolset-11/enable" >> /etc/bashrc
# Enables gcc 13 for use within the docker image.
RUN echo "source /opt/rh/gcc-toolset-13/enable" >> /etc/bashrc
SHELL ["/bin/bash", "--login", "-c"]

# Install newer version of Python
Expand Down
2 changes: 1 addition & 1 deletion docker/CI.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM cesiumgs/omniverse-almalinux8-build:2024-09-12
FROM cesiumgs/omniverse-almalinux8-build:2024-09-30

WORKDIR /var/app

Expand Down
20 changes: 8 additions & 12 deletions docker/CentOS7.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,16 @@ FROM centos:7

RUN yum update -y -q

# Add nvidia repository
RUN yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo

# Extra repositories that have newer versions of some packages
RUN yum install -y -q \
epel-release \
centos-release-scl

RUN yum install -y -q \
# for gcc-11
devtoolset-11-toolchain \
# for gcc-13
devtoolset-13-toolchain \
# for ubsan
devtoolset-11-libubsan-devel \
devtoolset-13-libubsan-devel \
# get a newer version of git and git-lfs
# CentOS 7 comes with version 1.8.3.1 by default, which is from 2013!
rh-git218 \
Expand All @@ -35,14 +32,13 @@ RUN yum install -y -q \
zlib-devel \
sqlite-devel \
xz-devel \
nvidia-driver-branch-535.x86_64

# Create links to some of the custom packages
RUN update-alternatives --install /usr/bin/gcc gcc /opt/rh/devtoolset-11/root/usr/bin/gcc 100 && \
update-alternatives --install /usr/bin/g++ g++ /opt/rh/devtoolset-11/root/usr/bin/g++ 100 && \
update-alternatives --install /usr/bin/cc cc /opt/rh/devtoolset-11/root/usr/bin/gcc 100 && \
update-alternatives --install /usr/bin/c++ c++ /opt/rh/devtoolset-11/root/usr/bin/g++ 100 && \
update-alternatives --install /usr/bin/gcov gcov /opt/rh/devtoolset-11/root/usr/bin/gcov 100 && \
RUN update-alternatives --install /usr/bin/gcc gcc /opt/rh/devtoolset-13/root/usr/bin/gcc 100 && \
update-alternatives --install /usr/bin/g++ g++ /opt/rh/devtoolset-13/root/usr/bin/g++ 100 && \
update-alternatives --install /usr/bin/cc cc /opt/rh/devtoolset-13/root/usr/bin/gcc 100 && \
update-alternatives --install /usr/bin/c++ c++ /opt/rh/devtoolset-13/root/usr/bin/g++ 100 && \
update-alternatives --install /usr/bin/gcov gcov /opt/rh/devtoolset-13/root/usr/bin/gcov 100 && \
update-alternatives --install /usr/bin/git git /opt/rh/rh-git218/root/usr/bin/git 100 && \
update-alternatives --install /usr/bin/git-lfs git-lfs /opt/rh/rh-git218/root/usr/bin/git-lfs 100

Expand Down
6 changes: 3 additions & 3 deletions docs/developer-setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ See [Linux](#linux) or [Windows](#windows) for step-by-step installation instruc
```
- Install `black` and `flake8`
```sh
pip3 install black==23.1.0 flake8==6.0.0
pip3 install black==23.1.0 flake8==7.1.1
```
- Add symlinks the clang-15 tools so that the correct version is chosen when running `clang-format`, `clang-tidy`, etc
```sh
Expand Down Expand Up @@ -127,7 +127,7 @@ There are two ways to install prerequisites for Windows, [manually](#install-man
```
- Install `black` and `flake8`
```sh
pip3 install black==23.1.0 flake8==6.0.0
pip3 install black==23.1.0 flake8==7.1.1
```
- Install `colorama` to enable color diff support
```sh
Expand Down Expand Up @@ -181,7 +181,7 @@ There are two ways to install prerequisites for Windows, [manually](#install-man
```
- Install `black` and `flake8`
```sh
pip3 install black==23.1.0 flake8==6.0.0
pip3 install black==23.1.0 flake8==7.1.1
```
- Install `colorama` to enable color diff support
```sh
Expand Down
96 changes: 0 additions & 96 deletions extern/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ set(USDRT_ROOT "${NVIDIA_BUILD_DIR}/target-deps/usdrt")
set(CARB_ROOT "${NVIDIA_BUILD_DIR}/target-deps/carb_sdk_plugins")
set(KIT_SDK_ROOT "${NVIDIA_BUILD_DIR}/target-deps/kit-sdk")
set(PYBIND11_ROOT "${NVIDIA_BUILD_DIR}/target-deps/pybind11")
set(CUDA_ROOT "${NVIDIA_BUILD_DIR}/target-deps/cuda")

set(NVIDIA_USD_LIBRARIES
ar
Expand Down Expand Up @@ -393,101 +392,6 @@ add_prebuilt_project_header_only(
)
# cmake-format: on

if(WIN32)
# cmake-format: off
add_prebuilt_project_import_library_only(
RELEASE_INCLUDE_DIR
"${CUDA_ROOT}"
DEBUG_INCLUDE_DIR
"${CUDA_ROOT}"
RELEASE_LIBRARY_DIR
"${CUDA_ROOT}/cuda/lib/x64"
DEBUG_LIBRARY_DIR
"${CUDA_ROOT}/cuda/lib/x64"
RELEASE_LIBRARIES
cuda
DEBUG_LIBRARIES
cuda
TARGET_NAMES
cuda
)
# cmake-format: on
else()
# Find the directory containing libcuda.so, e.g. /usr/lib/x86_64-linux-gnu
find_library(
CUDA_DRIVER_LIB
cuda
REQUIRED
NO_CACHE)
get_filename_component(CUDA_DRIVER_DIR "${CUDA_DRIVER_LIB}" DIRECTORY)

# cmake-format: off
add_prebuilt_project(
RELEASE_INCLUDE_DIR
"${CUDA_ROOT}"
DEBUG_INCLUDE_DIR
"${CUDA_ROOT}"
RELEASE_LIBRARY_DIR
"${CUDA_DRIVER_DIR}"
DEBUG_LIBRARY_DIR
"${CUDA_DRIVER_DIR}"
RELEASE_LIBRARIES
cuda
DEBUG_LIBRARIES
cuda
TARGET_NAMES
cuda)
# cmake-format: on
endif()

if(WIN32)
# cmake-format: off
add_prebuilt_project(
RELEASE_INCLUDE_DIR
"${CUDA_ROOT}"
DEBUG_INCLUDE_DIR
"${CUDA_ROOT}"
RELEASE_LIBRARY_DIR
"${CUDA_ROOT}/cuda/lib/x64"
RELEASE_DLL_DIR
"${CUDA_ROOT}/cuda/bin"
DEBUG_LIBRARY_DIR
"${CUDA_ROOT}/cuda/lib/x64"
DEBUG_DLL_DIR
"${CUDA_ROOT}/cuda/bin"
RELEASE_LIBRARIES
nvrtc
DEBUG_LIBRARIES
nvrtc
RELEASE_DLL_LIBRARIES
nvrtc64_112_0
DEBUG_DLL_LIBRARIES
nvrtc64_112_0
TARGET_NAMES
nvrtc
)
# cmake-format: on
else()
# cmake-format: off
add_prebuilt_project(
RELEASE_INCLUDE_DIR
"${CUDA_ROOT}"
DEBUG_INCLUDE_DIR
"${CUDA_ROOT}"
RELEASE_LIBRARY_DIR
"${CUDA_ROOT}/cuda/lib64"
DEBUG_LIBRARY_DIR
"${CUDA_ROOT}/cuda/lib64"
RELEASE_LIBRARIES
nvrtc
DEBUG_LIBRARIES
nvrtc
TARGET_NAMES
nvrtc
)
# cmake-format: on
endif()

# cmake-format: off
# omni.ui gives us access to DynamicTextureProvider.h
add_prebuilt_project(
Expand Down
2 changes: 0 additions & 2 deletions extern/nvidia/deps/target-deps.packman.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
<filter include="usdrt"/>
<filter include="carb_sdk_plugins"/>
<filter include="pybind11"/>
<filter include="cuda"/>
</import>
<!-- Override the link paths to point to the correct locations. -->
<dependency name="python" linkPath="../_build/target-deps/python"/>
<dependency name="nv_usd_py310_release" linkPath="../_build/target-deps/usd/release"/>
<dependency name="usdrt" linkPath="../_build/target-deps/usdrt"/>
<dependency name="carb_sdk_plugins" linkPath="../_build/target-deps/carb_sdk_plugins"/>
<dependency name="pybind11" linkPath="../_build/target-deps/pybind11/pybind11"/>
<dependency name="cuda" linkPath="../_build/target-deps/cuda/cuda"/>
</project>
1 change: 0 additions & 1 deletion src/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ setup_lib(
carb
omni_kit
omni_ui
cuda
pybind11
python310
ADDITIONAL_LIBRARIES
Expand Down

0 comments on commit c8daba3

Please sign in to comment.