Skip to content

Commit

Permalink
Add minimal release configuration.
Browse files Browse the repository at this point in the history
- Update CMake configuration to build and test the library;
- Add Github CI scripts to run the tests on major platforms;
- Add gitignore file;
- Ensure that define statements invoking the library use namespace;
- Prevent using macros for aliased functions in fileSystem.h to ensure
  that they can be used with a namespace;
- Prevent ArchDemangle from stripping Pixar's namespace and update
  associated tests;
- Move testArchAbi.h and testArchUtil.h headers to the test directory and
  adjust corresponding include directives;
- Correct the library path in testArchAbi.cpp;
- Define PXR_VERSION as 2502.
  • Loading branch information
buddly27 committed Feb 9, 2025
1 parent 235566e commit d5dd25c
Show file tree
Hide file tree
Showing 25 changed files with 604 additions and 330 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: test-linux

on:
push:
branches: [ dev, main ]

# Run tests once a week on Sunday.
schedule:
- cron: "0 6 * * 0"

permissions:
contents: read

env:
CMAKE_BUILD_TYPE: Release
CMAKE_GENERATOR: Ninja
CTEST_OUTPUT_ON_FAILURE: True

jobs:
test-linux:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Create Build Environment
run: |
sudo apt update
sudo apt install -y ninja-build
cmake -E make_directory ${{github.workspace}}/build
- name: Configure
working-directory: ${{github.workspace}}/build
run: cmake ..

- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config Release

- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -VV -C Release
41 changes: 41 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: test-macos

on:
push:
branches: [ dev, main ]

# Run tests once a week on Sunday.
schedule:
- cron: "0 6 * * 0"

permissions:
contents: read

env:
CMAKE_BUILD_TYPE: Release
CMAKE_GENERATOR: Ninja
CTEST_OUTPUT_ON_FAILURE: True

jobs:
test-macos:
runs-on: macos-latest

steps:
- uses: actions/checkout@v4

- name: Create Build Environment
run: |
brew install ninja
cmake -E make_directory ${{github.workspace}}/build
- name: Configure
working-directory: ${{github.workspace}}/build
run: cmake ..

- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config Release

- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -VV -C Release
43 changes: 43 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: test-windows

on:
push:
branches: [ dev, main ]

# Run tests once a week on Sunday.
schedule:
- cron: "0 6 * * 0"

permissions:
contents: read

env:
CMAKE_BUILD_TYPE: Release
CMAKE_GENERATOR: Visual Studio 17 2022
CMAKE_GENERATOR_PLATFORM: x64
CTEST_OUTPUT_ON_FAILURE: True

# Avoid the just-in-time debugger where possible when running tests.
ARCH_AVOID_JIT: True

jobs:
test-windows:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build

- name: Configure
working-directory: ${{github.workspace}}/build
run: cmake -D "ENABLE_PRECOMPILED_HEADERS=ON" ..

- name: Build
working-directory: ${{github.workspace}}/build
run: cmake --build . --config Release

- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -VV -C Release
57 changes: 57 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# Cache
Thumbs.db
.DS_Store
.AppleDouble

# Development
build/
.vscode
.project
.settings
.idea/
.history/

# CMake
cmake-build-*/

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
Loading

0 comments on commit d5dd25c

Please sign in to comment.