Skip to content

Commit 3e6e8c9

Browse files
committed
Build with Ubuntu 22.04
1 parent ff8a84f commit 3e6e8c9

9 files changed

Lines changed: 113 additions & 38 deletions

File tree

.github/actions/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
name: "AlmaLinux 8 Build"
2-
description: "Build Cesium for Omniverse in Docker container running a AlmaLinux 8 image"
1+
name: "Ubuntu 22 Build"
2+
description: "Build Cesium for Omniverse in Docker container running an Ubuntu 22 image"
33
inputs:
44
build-type:
55
description: "Release or debug build"

.github/workflows/main.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ jobs:
4343
coverage: "false",
4444
}
4545
- {
46-
name: "AlmaLinux 8 - GCC",
46+
name: "Ubuntu 22 - GCC",
4747
artifact: "linux-gcc.tar.xz",
4848
os: ubuntu-24.04,
4949
cc: "gcc-13",
5050
cxx: "g++-13",
5151
build-type: "Release",
52-
build-code: "AlmaLinux8",
52+
build-code: "Ubuntu22",
5353
cache-type: "Linux",
5454
generator: "Unix Makefiles",
5555
coverage: "false",
@@ -88,7 +88,7 @@ jobs:
8888
uses: actions/cache@v3
8989
with:
9090
path: ${{ env.CONAN_USER_HOME }}/.conan
91-
key: conan-${{ matrix.config.name }}-${{ hashFiles('cmake/AddConanDependencies.cmake') }}-v4
91+
key: conan-${{ matrix.config.name }}-${{ hashFiles('cmake/AddConanDependencies.cmake') }}-v5
9292

9393
# Tell ezvcpkg to look for or create its build folder (.ezvcpkg) in the repository's root directory
9494
# This is partly done to make the directory easily accessible to Docker builds
@@ -110,33 +110,33 @@ jobs:
110110
uses: actions/cache@v3
111111
with:
112112
path: ${{ env.EZVCPKG_BASEDIR }}
113-
key: vcpkg-${{ matrix.config.name }}-${{ hashFiles('vcpkg/ports/**/*', 'vcpkg/triplets/**/*') }}-${{ hashFiles('extern/cesium-native/CMakeLists.txt', 'CMakeLists.txt') }}
113+
key: vcpkg-${{ matrix.config.name }}-${{ hashFiles('vcpkg/ports/**/*', 'vcpkg/triplets/**/*') }}-${{ hashFiles('extern/cesium-native/CMakeLists.txt', 'CMakeLists.txt') }}-v1
114114

115115
- name: Packman Check cache
116116
id: packman-cache
117117
uses: actions/cache@v3
118118
with:
119119
path: ${{ env.PM_PACKAGES_ROOT }}
120-
key: packman-${{ matrix.config.cache-type }}-${{ hashFiles('extern/nvidia/deps/kit-sdk.packman.xml', 'extern/nvidia/deps/target-deps.packman.xml') }}
120+
key: packman-${{ matrix.config.cache-type }}-${{ hashFiles('extern/nvidia/deps/kit-sdk.packman.xml', 'extern/nvidia/deps/target-deps.packman.xml') }}-v1
121121

122-
- name: AlmaLinux Build with Docker
122+
- name: Ubuntu 22 Build with Docker
123123
uses: ./.github/actions
124-
if: matrix.config.name == 'AlmaLinux 8 - GCC'
124+
if: matrix.config.name == 'Ubuntu 22 - GCC'
125125
with:
126126
build-type: ${{ matrix.config.build-type }}
127127

128128
# Change the ownership from root to user for all files created by Docker in
129129
# the Conan build directory so that the files can be cached without permission
130130
# denied errors
131-
- name: AlmaLinux Change Conan, vcpkg, and Packman directory permissions
132-
if: matrix.config.name == 'AlmaLinux 8 - GCC'
131+
- name: Ubuntu 22 Change Conan, vcpkg, and Packman directory permissions
132+
if: matrix.config.name == 'Ubuntu 22 - GCC'
133133
run: |
134134
sudo chown -R $USER:$USER $CONAN_USER_HOME/.conan
135135
sudo chown -R $USER:$USER $PM_PACKAGES_ROOT
136136
sudo chown -R $USER:$USER $EZVCPKG_BASEDIR
137137
138138
- name: Install Linux dependencies
139-
if: ${{ runner.os == 'Linux' && matrix.config.name != 'AlmaLinux 8 - GCC' }}
139+
if: ${{ runner.os == 'Linux' && matrix.config.name != 'Ubuntu 22 - GCC' }}
140140
run: |
141141
sudo apt update
142142
sudo apt install -y doxygen clang-tidy-15 clang-format-15 gcovr
@@ -161,7 +161,7 @@ jobs:
161161
# Note: CMAKE_BUILD_TYPE is only used by Linux. It is ignored for Windows.
162162
# Note: CMAKE_CONFIGURATION_TYPES is used by Windows to generate a single configuration for Release since we don't need Debug, RelWithDebugInfo, and MinSizeRel on CI. It is ignored for Linux.
163163
- name: Configure
164-
if: matrix.config.name != 'AlmaLinux 8 - GCC'
164+
if: matrix.config.name != 'Ubuntu 22 - GCC'
165165
run: cmake -B build -D Python3_EXECUTABLE=python3 -D CESIUM_OMNI_ENABLE_TESTS=OFF -D CESIUM_OMNI_ENABLE_COVERAGE=${{ matrix.config.coverage}} -D CMAKE_C_COMPILER=${{ matrix.config.cc }} -D CMAKE_CXX_COMPILER=${{ matrix.config.cxx }} -D CMAKE_BUILD_TYPE=${{ matrix.config.build-type }} -D CMAKE_CONFIGURATION_TYPES=${{ matrix.config.build-type }} -G "${{ matrix.config.generator }}"
166166

167167
# Change the ownership from root to user for all files in the Conan cache so
@@ -176,19 +176,19 @@ jobs:
176176
$Acl.SetAccessRule($Ar)
177177
178178
- name: Check C/C++ Formatting
179-
if: matrix.config.name != 'AlmaLinux 8 - GCC'
179+
if: matrix.config.name != 'Ubuntu 22 - GCC'
180180
run: cmake --build build --target clang-format-check-all --config ${{ matrix.config.build-type }}
181181

182182
- name: Check Python Formatting
183-
if: matrix.config.name != 'AlmaLinux 8 - GCC'
183+
if: matrix.config.name != 'Ubuntu 22 - GCC'
184184
run: black --check --diff .
185185

186186
- name: Check Python Linting
187-
if: matrix.config.name != 'AlmaLinux 8 - GCC'
187+
if: matrix.config.name != 'Ubuntu 22 - GCC'
188188
run: flake8
189189

190190
- name: Build
191-
if: matrix.config.name != 'AlmaLinux 8 - GCC'
191+
if: matrix.config.name != 'Ubuntu 22 - GCC'
192192
run: cmake --build build --config ${{ matrix.config.build-type }} --parallel ${{ steps.cpu-cores.outputs.count }}
193193

194194
- name: Coverage
@@ -197,19 +197,19 @@ jobs:
197197

198198
- name: Documentation
199199
# Currently disabled for Windows because `choco install doxygen.install` is flaky
200-
if: ${{ matrix.config.name != 'AlmaLinux 8 - GCC' && runner.os != 'Windows' }}
200+
if: ${{ matrix.config.name != 'Ubuntu 22 - GCC' && runner.os != 'Windows' }}
201201
run: cmake --build build --target generate-documentation --config ${{ matrix.config.build-type }}
202202

203203
- name: Install (Default/Kit)
204-
if: matrix.config.name != 'AlmaLinux 8 - GCC'
204+
if: matrix.config.name != 'Ubuntu 22 - GCC'
205205
run: cmake --install build --config ${{ matrix.config.build-type }}
206206

207207
- name: Install (Library)
208-
if: matrix.config.name != 'AlmaLinux 8 - GCC'
208+
if: matrix.config.name != 'Ubuntu 22 - GCC'
209209
run: cmake --install build --config ${{ matrix.config.build-type }} --prefix install-library --component library
210210

211211
- name: Package
212-
if: matrix.config.name != 'AlmaLinux 8 - GCC'
212+
if: matrix.config.name != 'Ubuntu 22 - GCC'
213213
run: cmake --build build --target package --config ${{ matrix.config.build-type }}
214214

215215
- name: Capture Git info (not Windows)
@@ -241,6 +241,6 @@ jobs:
241241
aws-region: us-east-1
242242

243243
- name: Upload to S3
244-
if: ${{ matrix.config.name == 'AlmaLinux 8 - GCC' || runner.os == 'Windows' }}
244+
if: ${{ matrix.config.name == 'Ubuntu 22 - GCC' || runner.os == 'Windows' }}
245245
run: |
246246
aws s3 cp build/${{ env.zip_name }} s3://cesium-builds/cesium-omniverse/${{ env.branch }}/${{ env.us_date }}/${{ env.sha_short }}/${{ matrix.config.build-code }}/

docker/CI.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM cesiumgs/omniverse-almalinux8-build:2024-10-01
1+
FROM cesiumgs/omniverse-ubuntu22-build:2026-03-03
22

33
WORKDIR /var/app
44

docker/Ubuntu22.Dockerfile

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# This is used to generate the image with dependencies that CI.Dockerfile relies on.
2+
# For instructions for deploying this, check docs/release-guide/push-docker-image.md.
3+
FROM ubuntu:22.04
4+
5+
ENV DEBIAN_FRONTEND=noninteractive
6+
7+
# Update system
8+
RUN apt-get update && \
9+
apt-get upgrade -y
10+
11+
# Core build dependencies
12+
RUN apt-get install -y \
13+
git \
14+
git-lfs \
15+
wget \
16+
build-essential \
17+
make \
18+
doxygen \
19+
curl \
20+
libcurl4-openssl-dev \
21+
zlib1g-dev \
22+
libssl-dev \
23+
libbz2-dev \
24+
libffi-dev \
25+
libsqlite3-dev \
26+
liblzma-dev \
27+
zip \
28+
unzip \
29+
perl \
30+
pkg-config \
31+
python3 \
32+
python3-pip \
33+
cmake
34+
35+
# Allow mounted repos owned by host user
36+
RUN git config --global --add safe.directory /var/app
37+
38+
# Initialize git-lfs
39+
RUN git lfs install
40+
41+
# Python packages
42+
RUN pip3 install --no-cache-dir \
43+
conan==1.63.0 \
44+
gcovr
45+
46+
WORKDIR /var/app
47+
48+
ENTRYPOINT ["/bin/bash", "--login"]

docs/developer-setup/README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,14 +247,14 @@ Install [Docker Engine CE For Ubuntu](https://docs.docker.com/engine/install/ubu
247247
Enter the container:
248248

249249
```sh
250-
docker build --tag cesiumgs/cesium-omniverse:almalinux8 -f docker/AlmaLinux8.Dockerfile .
251-
docker run --rm --interactive --tty --volume $PWD:/var/app cesiumgs/cesium-omniverse:almalinux8
250+
docker build --tag cesiumgs/cesium-omniverse:ubuntu22 -f docker/Ubuntu22.Dockerfile .
251+
docker run --rm --interactive --tty --volume $PWD:/var/app cesiumgs/cesium-omniverse:ubuntu22
252252
```
253253

254254
Once inside the container, build like usual. Note that linters are turned off. It won't affect the build, it just means there won't be code formatting or linting. It will build fine with GCC.
255255

256256
```sh
257-
cmake -B build -D CESIUM_OMNI_ENABLE_LINTERS=OFF
257+
cmake -B build -D CESIUM_OMNI_ENABLE_LINTERS=OFF -D VCPKG_TRIPLET=x64-linux
258258
cmake --build build
259259
```
260260

@@ -460,14 +460,17 @@ cmake --build build --target clang-tidy
460460

461461
### Build Linux Package (Local)
462462

463-
Linux packages are built in the AlmaLinux 8 Docker container. A Red Hat Enterprise Linux 8 compatible OS is the [minimum OS required by Omniverse](https://docs.omniverse.nvidia.com/app_view/common/technical-requirements.html#suggested-minimums-by-product) and uses glibc 2.18 which is compatible with nearly all modern Linux distributions.
463+
Linux packages are built in the Ubuntu 22 Docker container. Ubuntu 22 uses glibc 2.35 which is the minimum requirement fpr Kit 107.3 and above.
464464

465-
It's recommended to build AlmaLinux 8 packages in a separate clone of cesium-omniverse since the Docker container will overwrite files in the `extern/nvidia/_build` and `exts` folders.
465+
https://docs.omniverse.nvidia.com/kit/docs/kit-manual/107.0.3/guide/migration.html
466+
467+
468+
It's recommended to build Ubuntu 22 packages in a separate clone of cesium-omniverse since the Docker container will overwrite files in the `extern/nvidia/_build` and `exts` folders.
466469
467470
Run the following shell script from the root cesium-omniverse directory:
468471
469472
```sh
470-
./scripts/build_package_almalinux8.sh
473+
./scripts/build_package_ubuntu22.sh
471474
```
472475
473476
The resulting `.zip` file will be written to the `build-package` directory (e.g. `CesiumGS-cesium-omniverse-linux-x86_64-v0.0.0.zip`)

docs/onboarding/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ There is also a similar [C++ extension template](https://github.com/NVIDIA-Omniv
2020
Some self-explanatory directories have been ommitted.
2121

2222
- `apps` - Tools that use the extensions, such as the performance testing app, but are not themselves extensions
23-
- `docker` - Docker configuration for AlmaLinux 8 CI builds
23+
- `docker` - Docker configuration for Ubuntu 22 CI builds
2424
- `exts` - This is where extension code is kept. The file structure follows the pattern:
2525
```
2626
exts

docs/release-guide/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This is the process we follow when releasing a new version of Cesium for Omniver
44

55
1. [Release a new version of Cesium for Omniverse Samples](#releasing-a-new-version-of-cesium-for-omniverse-samples).
66
2. Make sure the latest commit in `main` is passing CI.
7-
3. Download the latest build from S3. In the AWS management console (InternalServices AWS account), go to the bucket [`cesium-builds/cesium-omniverse/main`](https://s3.console.aws.amazon.com/s3/buckets/cesium-builds?region=us-east-1&prefix=cesium-omniverse/main/&showversions=false), find the appropriate date and commit hash to download the AlmaLinux and Windows zip files (e.g. `CesiumGS-cesium-omniverse-linux-x86_64-xxxxxxx.zip` and `CesiumGS-cesium-omniverse-windows-x86_64-xxxxxxx.zip`)
7+
3. Download the latest build from S3. In the AWS management console (InternalServices AWS account), go to the bucket [`cesium-builds/cesium-omniverse/main`](https://s3.console.aws.amazon.com/s3/buckets/cesium-builds?region=us-east-1&prefix=cesium-omniverse/main/&showversions=false), find the appropriate date and commit hash to download the Ubuntu 22 and Windows zip files (e.g. `CesiumGS-cesium-omniverse-linux-x86_64-xxxxxxx.zip` and `CesiumGS-cesium-omniverse-windows-x86_64-xxxxxxx.zip`)
88
4. Verify that the Linux package loads in USD Composer (see instructions below).
99
5. Verify that the Windows package loads in USD Composer (see instructions below).
1010
6. Update the project `VERSION` in [CMakeLists.txt](../../CMakeLists.txt).
@@ -21,7 +21,7 @@ This is the process we follow when releasing a new version of Cesium for Omniver
2121
15. Tag the release, e.g. `git tag -a v0.0.0 -m "0.0.0 release"`.
2222
16. Push the tag, e.g. `git push origin v0.0.0`.
2323
17. Wait for CI to pass.
24-
18. Download the latest build from S3. In the AWS management console (InternalServices AWS account), go to the bucket [`cesium-builds/cesium-omniverse`](https://s3.console.aws.amazon.com/s3/buckets/cesium-builds?prefix=cesium-omniverse/&region=us-east-1), find the folder with the new tag and download the AlmaLinux and Windows zip files (e.g. `CesiumGS-cesium-omniverse-linux-x86_64-v0.0.0.zip` and `CesiumGS-cesium-omniverse-windows-x86_64-v0.0.0.zip` )
24+
18. Download the latest build from S3. In the AWS management console (InternalServices AWS account), go to the bucket [`cesium-builds/cesium-omniverse`](https://s3.console.aws.amazon.com/s3/buckets/cesium-builds?prefix=cesium-omniverse/&region=us-east-1), find the folder with the new tag and download the Ubuntu 22 and Windows zip files (e.g. `CesiumGS-cesium-omniverse-linux-x86_64-v0.0.0.zip` and `CesiumGS-cesium-omniverse-windows-x86_64-v0.0.0.zip` )
2525
19. Create a new release on GitHub: https://github.com/CesiumGS/cesium-omniverse/releases/new.
2626
* Chose the new tag.
2727
* Copy the changelog into the description. Follow the format used in previous releases.

docs/release-guide/push-docker-image.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Pushing the Docker Image for AlmaLinux 8 builds.
1+
# Pushing the Docker Image for Ubuntu 22 builds.
22

3-
We use a docker image for our AlmaLinux 8 builds that contains all of our build dependencies, so we don't have to build the image from scratch on each build. This document outlines how to build and push this to Docker Hub.
3+
We use a docker image for our Ubuntu 22 builds that contains all of our build dependencies, so we don't have to build the image from scratch on each build. This document outlines how to build and push this to Docker Hub.
44

55
## Installing Docker
66

@@ -24,7 +24,7 @@ particular, `ssh` logins and `git` may not work anymore.
2424

2525
## Building the container
2626

27-
Confirm that you have push access to the [container repo](https://hub.docker.com/r/cesiumgs/omniverse-almalinux8-build).
27+
Confirm that you have push access to the [container repo](https://hub.docker.com/r/cesiumgs/omniverse-ubuntu22-build).
2828

2929
### Log in
3030

@@ -39,7 +39,7 @@ docker login
3939
After making your changes to the docker file, execute:
4040

4141
```shell
42-
docker build --tag cesiumgs/omniverse-almalinux8-build:$TAGNAME -f docker/AlmaLinux8.Dockerfile . --no-cache
42+
docker build --tag cesiumgs/omniverse-ubuntu22-build:$TAGNAME -f docker/Ubuntu22.Dockerfile . --no-cache
4343
```
4444

4545
You should replace `$TAGNAME` with the current date in `YYYY-MM-DD` format. So if it's the 29th of August, 2023, you would use `2023-08-29`.
@@ -49,11 +49,11 @@ You should replace `$TAGNAME` with the current date in `YYYY-MM-DD` format. So i
4949
The build will take some time. Once it is finished, execute the following to push the image to Docker Hub:
5050

5151
```shell
52-
docker push cesiumgs/omniverse-almalinux8-build:$TAGNAME
52+
docker push cesiumgs/omniverse-ubuntu22-build:$TAGNAME
5353
```
5454

5555
Again, you should replace `$TAGNAME` with the current date in `YYYY-MM-DD` format. So if it's the 29th of August, 2023, you would use `2023-08-29`.
5656

5757
### Update CI.Dockerfile
5858

59-
The `docker/CI.Dockerfile` file is used as part of the AlmaLinux 8 build step in our GitHub actions. You will need to update the version of the Docker image used to the tagged version you just uploaded.
59+
The `docker/CI.Dockerfile` file is used as part of the Ubuntu 22 build step in our GitHub actions. You will need to update the version of the Docker image used to the tagged version you just uploaded.

scripts/build_package_ubuntu22.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
# Make sure to run this script from the root cesium-omniverse directory
4+
5+
# Delete existing build folder
6+
sudo rm -rf build-package
7+
8+
# Start the docker container
9+
docker build --tag cesiumgs/cesium-omniverse:ubuntu22 -f docker/Ubuntu22.Dockerfile .
10+
container_id=$(docker run -it -d --volume $PWD:/var/app cesiumgs/cesium-omniverse:ubuntu22)
11+
12+
# Run package commands inside docker container
13+
package_cmd="
14+
cmake -B build-package -D CMAKE_BUILD_TYPE=Release CESIUM_OMNI_ENABLE_TESTS=OFF -D CESIUM_OMNI_ENABLE_DOCUMENTATION=OFF -D CESIUM_OMNI_ENABLE_SANITIZERS=OFF -D CESIUM_OMNI_ENABLE_LINTERS=OFF -D VCPKG_TRIPLET=x64-linux &&
15+
cmake --build build-package --parallel 8 &&
16+
cmake --build build-package --target install &&
17+
cmake --build build-package --target package
18+
"
19+
20+
docker exec ${container_id} /bin/sh -c "${package_cmd}"
21+
22+
# Clean up
23+
docker stop ${container_id}
24+
docker rm ${container_id}

0 commit comments

Comments
 (0)