Skip to content

Commit

Permalink
Refactor CMake: Option names, use CMAKE_CUDA_ARCHITECTURES, general i…
Browse files Browse the repository at this point in the history
…mprovments

+ Adds top-level CMakeLists.txt detection to the root CMakeLists.txt
+ Prefixes CMake options / CACHE variables with FLAMEGPU_ to cooperate with others, including:
  + BUILD_EXAMPLE_<example> -> FLAMEGPU_BUILD_EXAMPLE_<example> as dependent options
  + FLAMEPGU_BUILD_ALL_EXAMPLES -> FLAMEGPU_BUILD_ALL_EXAMPLES
    + Defaults to ON only if the main FLAMEGPU CMakeLists is the top level, removing the need for NO_EXAMPLES
  + BUILD_SWIG_PYTHON -> FLAMEPGU_BUILD_PYTHON
  + USE_NVTX -> FLAMEGPU_ENABLE_NVTX
  + USE_GLM -> FLAMEGPU_ENABLE_GLM
  + CURAND_ENGINE -> FLAMEGPU_CURAND_ENGINE, including a dropdown in the GUI
  + Removes USE_NVCC_THREADS
  + NVCC_THREADS -> FLAMEGPU_NVCC_THREADS which defaults to 2, and handles being set to OFF correctly.
  + VERBOSE_PTXAS -> FLAMEGPU_VERBOSE_PTXAS
  + BUILD_TESTS -> FLAMEGPU_BUILD_TESTS
  + BUILD_TESTS_DEV -> FLAMEGPU_BUILD_TESTS_DEV
  + EXPORT_RTC_SOURCES -> FLAMEGPU_RTC_EXPORT_SOURCES
  + RTC_DISK_CACHE -> FLAMEGPU_RTC_DISK_CACHE
  + WARNINGS_AS_ERRORS -> FLAMEGPU_WARNINGS_AS_ERRORS
  + SEATBELTS -> FLAMEGPU_SEATBELTS
  + BUILD_API_DOCUMENTATION -> FLAMEGPU_BUILD_API_DOCUMENTATION
  + VISUALIASTION -> FLAMEGPU_VISUSALISATION
    + And associated sub-optons FLAMEGPU_VISUALISATION_ROOT etc.
  + USE_GTEST_DISCOVER -> FLAMEGPU_ENABLE_GTEST_DISCOVER
+ Switch to CMAKE_CUDA_ARCHITECTURES from CUDA_ARCH with custom default setting
+ Mark many CMake Cache varaibles as advanced to exclude them from the default CMake GUI
+ Improves cpplint CMake logic
+ Move definition location of some CMake options, so they are pulled into individual examples
+ Prefix Cmake functions and macros with flamegpu_ and rename to all lower case, including:
  + add_flamegpu_executable -> flamegpu_add_executable
+ Use target-specific c++17 specification
+ Correct cmake_minimum_required statements and add a <polciy_max> of 3.25
+ Modernise GLM CMake
+ De-duplicate compiler definition for the pyflamegpu target, using properties from the flamegpu target
+ Reduce use of cmake variables from the visualiser CMake, instead request a list of (dll) files to copy is needed
+ Move flamegpu target specific compiler definitions into private/public target properties
+ Prefix flamegpu compiler definitions with FLAMEGPU_
  + SEATBELTS -> FLAMEGPU_SEATBELTS
  + VISUASLIATION -> FLAMEGPU_VISUSALISATION
  + CURAND_<X>->FLAMEGPU_CURAND_<X>
  + USE_GLM -> FLAMEGPU_USE_GLM
  + USE_GLM_PATH -> FLAMEGPU_USE_GLM_PATH
  + DISABLE_RTC_DISK_CACHE -> FLAMEGPU_DISABLE_RTC_DISK_CACHE
  + OUTPUT_RTC_DYNAMIC_FILES -> FLAMEGPU_OUTPUT_RTC_DYNAMIC_FILES
+ Updates the visualisation repository hash
  • Loading branch information
ptheywood committed Dec 8, 2022
1 parent b52dbb4 commit ab53d45
Show file tree
Hide file tree
Showing 144 changed files with 1,897 additions and 1,608 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/CMake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,16 @@ jobs:
INDIVIDUAL_EXAMPLE: "game_of_life"
# Define constants
BUILD_DIR: "build"
BUILD_TESTS: "ON"
FLAMEGPU_BUILD_TESTS: "ON"
# Conditional based on matrix via awkward almost ternary
BUILD_SWIG_PYTHON: ${{ fromJSON('{true:"ON",false:"OFF"}')[matrix.python != ''] }}
FLAMEGPU_BUILD_PYTHON: ${{ fromJSON('{true:"ON",false:"OFF"}')[matrix.python != ''] }}
# Port matrix options to environment, for more portability.
CUDA: ${{ matrix.cudacxx.cuda }}
CUDA_ARCH: ${{ matrix.cudacxx.cuda_arch }}
HOSTCXX: ${{ matrix.cudacxx.hostcxx }}
OS: ${{ matrix.cudacxx.os }}
CONFIG: ${{ matrix.config.config }}
SEATBELTS: ${{ matrix.config.SEATBELTS }}
FLAMEGPU_SEATBELTS: ${{ matrix.config.SEATBELTS }}
PYTHON: ${{ matrix.python}}
VISUALISATION: ${{ matrix.VISUALISATION }}
CMAKE: ${{ matrix.cmake }}
Expand Down Expand Up @@ -94,14 +94,14 @@ jobs:
echo "CUDAHOSTCXX=/usr/bin/g++-${gcc_version}" >> $GITHUB_ENV
- name: Select Python
if: ${{ env.PYTHON != '' && env.BUILD_SWIG_PYTHON == 'ON' }}
if: ${{ env.PYTHON != '' && env.FLAMEGPU_BUILD_PYTHON == 'ON' }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON }}

# @todo - is some/all of this still required when using select Python?
- name: Install python dependencies
if: ${{ env.PYTHON != '' && env.BUILD_SWIG_PYTHON == 'ON' }}
if: ${{ env.PYTHON != '' && env.FLAMEGPU_BUILD_PYTHON == 'ON' }}
run: |
sudo apt-get install python3-venv
python3 -m pip install --upgrade wheel build setuptools
Expand Down Expand Up @@ -147,13 +147,13 @@ jobs:
-DCMAKE_BUILD_TYPE="${{ env.CONFIG }}"
-Werror=dev
-DCMAKE_WARN_DEPRECATED="OFF"
-DWARNINGS_AS_ERRORS="ON"
-DCUDA_ARCH="${{ env.CUDA_ARCH }}"
-DBUILD_TESTS="${{ env.BUILD_TESTS }}"
-DBUILD_SWIG_PYTHON="${{ env.BUILD_SWIG_PYTHON }}"
-DFLAMEGPU_WARNINGS_AS_ERRORS="ON"
-DCMAKE_CUDA_ARCHITECTURES="${{ env.CUDA_ARCH }}"
-DFLAMEGPU_BUILD_TESTS="${{ env.FLAMEGPU_BUILD_TESTS }}"
-DFLAMEGPU_BUILD_PYTHON="${{ env.FLAMEGPU_BUILD_PYTHON }}"
-DPYTHON3_EXACT_VERSION="${{ env.PYTHON }}"
-DVISUALISATION="${{ env.VISUALISATION }}"
-DUSE_NVTX="ON"
-DFLAMEGPU_VISUALISATION="${{ env.VISUALISATION }}"
-DFLAMEGPU_ENABLE_NVTX="ON"
- name: Configure Individual example
if: ${{ env.INDIVIDUAL_EXAMPLE != '' }}
Expand All @@ -163,6 +163,6 @@ jobs:
-DCMAKE_BUILD_TYPE="${{ env.CONFIG }}"
-Werror=dev
-DCMAKE_WARN_DEPRECATED="OFF"
-DWARNINGS_AS_ERRORS="ON"
-DCUDA_ARCH="${{ env.CUDA_ARCH }}"
-DUSE_NVTX="ON"
-DFLAMEGPU_WARNINGS_AS_ERRORS="ON"
-DCMAKE_CUDA_ARCHITECTURES="${{ env.CUDA_ARCH }}"
-DFLAMEGPU_ENABLE_NVTX="ON"
4 changes: 2 additions & 2 deletions .github/workflows/Docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
cmake . -B "${{ env.BUILD_DIR }}"
-Werror=dev
-DCMAKE_WARN_DEPRECATED="OFF"
-DWARNINGS_AS_ERRORS="ON"
-DBUILD_API_DOCUMENTATION="ON"
-DFLAMEGPU_WARNINGS_AS_ERRORS="ON"
-DFLAMEGPU_BUILD_API_DOCUMENTATION="ON"
- name: Docs
working-directory: ${{ env.BUILD_DIR }}
Expand Down
112 changes: 56 additions & 56 deletions .github/workflows/Draft-Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jobs:
# CUDA_ARCH values are reduced compared to wheels due to CI memory issues while compiling the test suite.
cudacxx:
- cuda: "11.8"
cuda_arch: "35 60 80"
cuda_arch: "35;60;90"
hostcxx: gcc-9
os: ubuntu-20.04
- cuda: "11.0"
cuda_arch: "35 60 80"
cuda_arch: "35;60;80"
hostcxx: gcc-8
os: ubuntu-20.04
python:
Expand All @@ -61,16 +61,16 @@ jobs:
env:
# Define constants
BUILD_DIR: "build"
BUILD_TESTS: "ON"
FLAMEGPU_BUILD_TESTS: "ON"
# Conditional based on matrix via awkward almost ternary
BUILD_SWIG_PYTHON: ${{ fromJSON('{true:"ON",false:"OFF"}')[matrix.python != ''] }}
FLAMEGPU_BUILD_PYTHON: ${{ fromJSON('{true:"ON",false:"OFF"}')[matrix.python != ''] }}
# Port matrix options to environment, for more portability.
CUDA: ${{ matrix.cudacxx.cuda }}
CUDA_ARCH: ${{ matrix.cudacxx.cuda_arch }}
HOSTCXX: ${{ matrix.cudacxx.hostcxx }}
OS: ${{ matrix.cudacxx.os }}
CONFIG: ${{ matrix.config.config }}
SEATBELTS: ${{ matrix.config.SEATBELTS }}
FLAMEGPU_SEATBELTS: ${{ matrix.config.SEATBELTS }}
PYTHON: ${{ matrix.python}}
VISUALISATION: ${{ matrix.VISUALISATION }}

Expand All @@ -93,14 +93,14 @@ jobs:
echo "CUDAHOSTCXX=/usr/bin/g++-${gcc_version}" >> $GITHUB_ENV
- name: Select Python
if: ${{ env.PYTHON != '' && env.BUILD_SWIG_PYTHON == 'ON' }}
if: ${{ env.PYTHON != '' && env.FLAMEGPU_BUILD_PYTHON == 'ON' }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON }}

# @todo - is some/all of this still required when using select Python?
- name: Install python dependencies
if: ${{ env.PYTHON != '' && env.BUILD_SWIG_PYTHON == 'ON' }}
if: ${{ env.PYTHON != '' && env.FLAMEGPU_BUILD_PYTHON == 'ON' }}
run: |
sudo apt-get install python3-venv
python3 -m pip install --upgrade wheel build setuptools
Expand Down Expand Up @@ -146,25 +146,25 @@ jobs:
-DCMAKE_BUILD_TYPE="${{ env.CONFIG }}"
-Werror=dev
-DCMAKE_WARN_DEPRECATED="OFF"
-DWARNINGS_AS_ERRORS="ON"
-DCUDA_ARCH="${{ env.CUDA_ARCH }}"
-DBUILD_TESTS="${{ env.BUILD_TESTS }}"
-DBUILD_SWIG_PYTHON="${{ env.BUILD_SWIG_PYTHON }}"
-DFLAMEGPU_WARNINGS_AS_ERRORS="ON"
-DCMAKE_CUDA_ARCHITECTURES="${{ env.CUDA_ARCH }}"
-DFLAMEGPU_BUILD_TESTS="${{ env.FLAMEGPU_BUILD_TESTS }}"
-DFLAMEGPU_BUILD_PYTHON="${{ env.FLAMEGPU_BUILD_PYTHON }}"
-DPYTHON3_EXACT_VERSION="${{ env.PYTHON }}"
-DVISUALISATION="${{ env.VISUALISATION }}"
-DUSE_NVTX="ON"
-DFLAMEGPU_VISUALISATION="${{ env.VISUALISATION }}"
-DFLAMEGPU_ENABLE_NVTX="ON"
- name: Build static library
working-directory: ${{ env.BUILD_DIR }}
run: cmake --build . --target flamegpu --verbose -j `nproc`

- name: Build python wheel
if: ${{ env.BUILD_SWIG_PYTHON == 'ON' }}
if: ${{ env.FLAMEGPU_BUILD_PYTHON == 'ON' }}
working-directory: ${{ env.BUILD_DIR }}
run: cmake --build . --target pyflamegpu --verbose -j `nproc`

- name: Build tests
if: ${{ env.BUILD_TESTS == 'ON' }}
if: ${{ env.FLAMEGPU_BUILD_TESTS == 'ON' }}
working-directory: ${{ env.BUILD_DIR }}
run: cmake --build . --target tests --verbose -j `nproc`

Expand All @@ -184,11 +184,11 @@ jobs:
# CUDA_ARCH values are reduced compared to wheels due to CI memory issues while compiling the test suite.
cudacxx:
- cuda: "11.8.0"
cuda_arch: "35 60 80"
cuda_arch: "35;60;90"
hostcxx: "Visual Studio 16 2019"
os: windows-2019
- cuda: "11.0.3"
cuda_arch: "35 60 80"
cuda_arch: "35;60;80"
hostcxx: "Visual Studio 16 2019"
os: windows-2019
python:
Expand All @@ -207,16 +207,16 @@ jobs:
env:
# Define constants
BUILD_DIR: "build"
BUILD_TESTS: "ON"
FLAMEGPU_BUILD_TESTS: "ON"
# Conditional based on matrix via awkward almost ternary
BUILD_SWIG_PYTHON: ${{ fromJSON('{true:"ON",false:"OFF"}')[matrix.python != ''] }}
FLAMEGPU_BUILD_PYTHON: ${{ fromJSON('{true:"ON",false:"OFF"}')[matrix.python != ''] }}
# Port matrix options to environment, for more portability.
CUDA: ${{ matrix.cudacxx.cuda }}
CUDA_ARCH: ${{ matrix.cudacxx.cuda_arch }}
HOSTCXX: ${{ matrix.cudacxx.hostcxx }}
OS: ${{ matrix.cudacxx.os }}
CONFIG: ${{ matrix.config.config }}
SEATBELTS: ${{ matrix.config.SEATBELTS }}
FLAMEGPU_SEATBELTS: ${{ matrix.config.SEATBELTS }}
PYTHON: ${{ matrix.python}}
VISUALISATION: ${{ matrix.VISUALISATION }}

Expand All @@ -232,7 +232,7 @@ jobs:
run: .github\scripts\install_cuda_windows.ps1

- name: Select Python
if: ${{ env.PYTHON != '' && env.BUILD_SWIG_PYTHON == 'ON' }}
if: ${{ env.PYTHON != '' && env.FLAMEGPU_BUILD_PYTHON == 'ON' }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON }}
Expand All @@ -244,26 +244,26 @@ jobs:
-G "${{ env.HOSTCXX }}" -A x64
-Werror=dev
-DCMAKE_WARN_DEPRECATED="OFF"
-DWARNINGS_AS_ERRORS="ON"
-DCUDA_ARCH="${{ env.CUDA_ARCH }}"
-DBUILD_TESTS="${{ env.BUILD_TESTS }}"
-DBUILD_SWIG_PYTHON="${{ env.BUILD_SWIG_PYTHON }}"
-DFLAMEGPU_WARNINGS_AS_ERRORS="ON"
-DCMAKE_CUDA_ARCHITECTURES="${{ env.CUDA_ARCH }}"
-DFLAMEGPU_BUILD_TESTS="${{ env.FLAMEGPU_BUILD_TESTS }}"
-DFLAMEGPU_BUILD_PYTHON="${{ env.FLAMEGPU_BUILD_PYTHON }}"
-DPython3_ROOT_DIR="$(dirname $(which python))"
-DPython3_EXECUTABLE="$(which python)"
-DVISUALISATION="${{ env.VISUALISATION }}"
-DUSE_NVTX="ON"
-DFLAMEGPU_VISUALISATION="${{ env.VISUALISATION }}"
-DFLAMEGPU_ENABLE_NVTX="ON"
- name: Build static library
working-directory: ${{ env.BUILD_DIR }}
run: cmake --build . --config ${{ env.CONFIG }} --target flamegpu --verbose -j `nproc`

- name: Build python wheel
if: ${{ env.BUILD_SWIG_PYTHON == 'ON' }}
if: ${{ env.FLAMEGPU_BUILD_PYTHON == 'ON' }}
working-directory: ${{ env.BUILD_DIR }}
run: cmake --build . --config ${{ env.CONFIG }} --target pyflamegpu --verbose -j `nproc`

- name: Build tests
if: ${{ env.BUILD_TESTS == 'ON' }}
if: ${{ env.FLAMEGPU_BUILD_TESTS == 'ON' }}
working-directory: ${{ env.BUILD_DIR }}
run: cmake --build . --config ${{ env.CONFIG }} --target tests --verbose -j `nproc`

Expand All @@ -284,11 +284,11 @@ jobs:
matrix:
cudacxx:
- cuda: "11.2"
cuda_arch: "35 52 60 70 80"
cuda_arch: "35;52;60;70;80"
hostcxx: devtoolset-9
os: ubuntu-20.04
- cuda: "11.0"
cuda_arch: "35 52 60 70 80"
cuda_arch: "35;52;60;70;80"
hostcxx: devtoolset-8
os: ubuntu-20.04
python:
Expand Down Expand Up @@ -319,16 +319,16 @@ jobs:
ARTIFACT_NAME: wheel-manylinux2014-${{ matrix.cudacxx.cuda }}-${{matrix.python}}-${{ matrix.VISUALISATION }}-${{ matrix.config.name }}-${{ matrix.cudacxx.os }}
# Define constants
BUILD_DIR: "build"
BUILD_TESTS: "OFF"
FLAMEGPU_BUILD_TESTS: "OFF"
# Conditional based on matrix via awkward almost ternary
BUILD_SWIG_PYTHON: ${{ fromJSON('{true:"ON",false:"OFF"}')[matrix.python != ''] }}
FLAMEGPU_BUILD_PYTHON: ${{ fromJSON('{true:"ON",false:"OFF"}')[matrix.python != ''] }}
# Port matrix options to environment, for more portability.
CUDA: ${{ matrix.cudacxx.cuda }}
CUDA_ARCH: ${{ matrix.cudacxx.cuda_arch }}
HOSTCXX: ${{ matrix.cudacxx.hostcxx }}
OS: ${{ matrix.cudacxx.os }}
CONFIG: ${{ matrix.config.config }}
SEATBELTS: ${{ matrix.config.SEATBELTS }}
FLAMEGPU_SEATBELTS: ${{ matrix.config.SEATBELTS }}
PYTHON: ${{ matrix.python}}
VISUALISATION: ${{ matrix.VISUALISATION }}

Expand Down Expand Up @@ -391,18 +391,18 @@ jobs:
-DCMAKE_BUILD_TYPE="${{ env.CONFIG }}"
-Werror=dev
-DCMAKE_WARN_DEPRECATED="OFF"
-DWARNINGS_AS_ERRORS="ON"
-DCUDA_ARCH="${{ env.CUDA_ARCH }}"
-DBUILD_TESTS="${{ env.BUILD_TESTS }}"
-DBUILD_SWIG_PYTHON="${{ env.BUILD_SWIG_PYTHON }}"
-DFLAMEGPU_WARNINGS_AS_ERRORS="ON"
-DCMAKE_CUDA_ARCHITECTURES="${{ env.CUDA_ARCH }}"
-DFLAMEGPU_BUILD_TESTS="${{ env.FLAMEGPU_BUILD_TESTS }}"
-DFLAMEGPU_BUILD_PYTHON="${{ env.FLAMEGPU_BUILD_PYTHON }}"
-DPYTHON3_EXACT_VERSION="${{ env.PYTHON }}"
-DVISUALISATION="${{ env.VISUALISATION }}"
-DUSE_NVTX="ON"
-DFLAMEGPU_VISUALISATION="${{ env.VISUALISATION }}"
-DFLAMEGPU_ENABLE_NVTX="ON"
-DGLEW_USE_STATIC_LIBS="${{ env.USE_STATIC_GLEW }}"
-DOpenGL_GL_PREFERENCE:STRING=LEGACY
- name: Build python wheel
if: ${{ env.BUILD_SWIG_PYTHON == 'ON' }}
if: ${{ env.FLAMEGPU_BUILD_PYTHON == 'ON' }}
working-directory: ${{ env.BUILD_DIR }}
run: cmake --build . --target pyflamegpu --verbose -j `nproc`

Expand All @@ -421,7 +421,7 @@ jobs:
# Upload wheel artifacts to the job on GHA, with a short retention
# Use a unique name per job matrix run, to avoid a risk of corruption according to the docs (although it should work with unique filenames)
- name: Upload Wheel Artifacts
if: ${{ env.BUILD_SWIG_PYTHON == 'ON' }}
if: ${{ env.FLAMEGPU_BUILD_PYTHON == 'ON' }}
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}
Expand All @@ -440,11 +440,11 @@ jobs:
matrix:
cudacxx:
- cuda: "11.2.2"
cuda_arch: "35 52 60 70 80"
cuda_arch: "35;52;60;70;80"
hostcxx: "Visual Studio 16 2019"
os: windows-2019
- cuda: "11.0.3"
cuda_arch: "35 52 60 70 80"
cuda_arch: "35;52;60;70;80"
hostcxx: "Visual Studio 16 2019"
os: windows-2019
python:
Expand All @@ -471,16 +471,16 @@ jobs:
ARTIFACT_NAME: wheel-windows-${{ matrix.cudacxx.cuda }}-${{matrix.python}}-${{ matrix.VISUALISATION }}-${{ matrix.config.name }}-${{ matrix.cudacxx.os }}
# Define constants
BUILD_DIR: "build"
BUILD_TESTS: "OFF"
FLAMEGPU_BUILD_TESTS: "OFF"
# Conditional based on matrix via awkward almost ternary
BUILD_SWIG_PYTHON: ${{ fromJSON('{true:"ON",false:"OFF"}')[matrix.python != ''] }}
FLAMEGPU_BUILD_PYTHON: ${{ fromJSON('{true:"ON",false:"OFF"}')[matrix.python != ''] }}
# Port matrix options to environment, for more portability.
CUDA: ${{ matrix.cudacxx.cuda }}
CUDA_ARCH: ${{ matrix.cudacxx.cuda_arch }}
HOSTCXX: ${{ matrix.cudacxx.hostcxx }}
OS: ${{ matrix.cudacxx.os }}
CONFIG: ${{ matrix.config.config }}
SEATBELTS: ${{ matrix.config.SEATBELTS }}
FLAMEGPU_SEATBELTS: ${{ matrix.config.SEATBELTS }}
PYTHON: ${{ matrix.python}}
VISUALISATION: ${{ matrix.VISUALISATION }}

Expand All @@ -496,7 +496,7 @@ jobs:
run: .github\scripts\install_cuda_windows.ps1

- name: Select Python
if: ${{ env.PYTHON != '' && env.BUILD_SWIG_PYTHON == 'ON' }}
if: ${{ env.PYTHON != '' && env.FLAMEGPU_BUILD_PYTHON == 'ON' }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON }}
Expand All @@ -508,24 +508,24 @@ jobs:
-G "${{ env.HOSTCXX }}" -A x64
-Werror=dev
-DCMAKE_WARN_DEPRECATED="OFF"
-DWARNINGS_AS_ERRORS="ON"
-DCUDA_ARCH="${{ env.CUDA_ARCH }}"
-DBUILD_TESTS="${{ env.BUILD_TESTS }}"
-DBUILD_SWIG_PYTHON="${{ env.BUILD_SWIG_PYTHON }}"
-DFLAMEGPU_WARNINGS_AS_ERRORS="ON"
-DCMAKE_CUDA_ARCHITECTURES="${{ env.CUDA_ARCH }}"
-DFLAMEGPU_BUILD_TESTS="${{ env.FLAMEGPU_BUILD_TESTS }}"
-DFLAMEGPU_BUILD_PYTHON="${{ env.FLAMEGPU_BUILD_PYTHON }}"
-DPython3_ROOT_DIR="$(dirname $(which python))"
-DPython3_EXECUTABLE="$(which python)"
-DVISUALISATION="${{ env.VISUALISATION }}"
-DUSE_NVTX="ON"
-DFLAMEGPU_VISUALISATION="${{ env.VISUALISATION }}"
-DFLAMEGPU_ENABLE_NVTX="ON"
- name: Build python wheel
if: ${{ env.BUILD_SWIG_PYTHON == 'ON' }}
if: ${{ env.FLAMEGPU_BUILD_PYTHON == 'ON' }}
working-directory: ${{ env.BUILD_DIR }}
run: cmake --build . --config ${{ env.CONFIG }} --target pyflamegpu --verbose -j `nproc`

# Upload wheel artifacts to the job on GHA, with a short retention
# Use a unique name per job matrix run, to avoid a risk of corruption according to the docs (although it should work with unique filenames)
- name: Upload Wheel Artifacts
if: ${{env.BUILD_SWIG_PYTHON == 'ON' }}
if: ${{env.FLAMEGPU_BUILD_PYTHON == 'ON' }}
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARTIFACT_NAME }}
Expand Down
Loading

0 comments on commit ab53d45

Please sign in to comment.