Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
8675853
C++20: Add and use gpuErrchk replacement using source_location
ptheywood Apr 2, 2026
b98aae6
Breaking change: Remove GPU error checking macros which polluted the …
ptheywood Apr 2, 2026
aea6987
CMake: Update upper-limit CMakeLists.txt to 4.3.0
ptheywood Apr 1, 2026
504f560
CMake: Replace FLAMEGPU_PROJECT_IS_TOP_LEVEL with PROJECT_IS_TOP_LEVEL
ptheywood Apr 1, 2026
372a790
AMD: Initial rocm readme changes.
ptheywood Mar 18, 2026
fe2b4a8
WIP: Partially finished CMake changes for HIP support.
ptheywood Apr 1, 2026
d7c519e
CUDA/HIP compiler settings and warnign flags
ptheywood Apr 2, 2026
258522f
CMake: CMAKE_HIP_ARCHITECTURES thoughts. far from trivial, maybe just…
ptheywood Apr 2, 2026
bf70ed6
CMake: Disable HIP architectures author warning while it is being tho…
ptheywood Apr 2, 2026
00594c9
fixup: find_package(hip not HIP
ptheywood Apr 7, 2026
ab95912
Clang: fix -Wunused-const-variable warnings via inline in defines.h
ptheywood Apr 7, 2026
9937735
Readme: Explicitly mention hip/rocm host compiler issues.
ptheywood Apr 7, 2026
ce0c8dd
CMake: Emit a single warning if the CXX compiler does not understand …
ptheywood Apr 7, 2026
1295b0b
Clang: Suppress -Wunused-but-set-variable warnings for variables only…
ptheywood Apr 7, 2026
eb0e37b
Clang: make flamegpu::nvtx::push/pop not static to address -Wunneeded…
ptheywood Apr 7, 2026
97904f6
Clang: Address -Wpressimizing-move warnings (prevented copy elision)
ptheywood Apr 7, 2026
d182a87
Clang: Address -Winconsistent-missing-override warnings
ptheywood Apr 7, 2026
01cc9be
CMake: Mark nlohmann_json as a SYSTEM dependency to suppress clang wa…
ptheywood Apr 7, 2026
dc58768
CMake: Mark all external fetched libraries as SYSTEM
ptheywood Apr 7, 2026
d7b2002
TO REBASE/TESTWCU120: Use std::less/greater rather than deprecated th…
ptheywood Apr 7, 2026
575e781
Clang: Address -Wunused-but-set-variable warnings in the CXX test suite
ptheywood Apr 7, 2026
d0b9afe
Clang: Address -Wimplicit-const-int-float-conversion warning in test …
ptheywood Apr 7, 2026
a93d88e
Remove CUDA checks which are no longer relevant due to our minimum su…
ptheywood Apr 7, 2026
5447ab0
CMake: Do not check for CUDA >= 11.2 for FLAMEGPU_NVCC_THREADS
ptheywood Apr 7, 2026
82353bc
CMake: Add FLAMEGPU_USE_CUDA/FLAMEGPU_USE_HIP public target definitions
ptheywood Apr 7, 2026
88e6b13
WIP: Guard cuda includes behind FLAMEGPU_USE_CUDA
ptheywood Apr 7, 2026
f0b148c
WIP: initial macro-based abstration port for HIP.
ptheywood Apr 7, 2026
e760a9d
CMake: Hip warning setting fixup
ptheywood Apr 8, 2026
5172761
CMake: Hip warning setting fixup
ptheywood Apr 8, 2026
59f80a6
HIP: flamegpu static library now compiles under HIP
ptheywood Apr 8, 2026
407fdd0
HIP: fix for custom transforms - i.e. FLAMEGPU_CUSTOM_TRANSFORM
ptheywood Apr 8, 2026
9ffaeeb
HIP/AMD: Add a not implemented errors if RTC functions / conditions w…
ptheywood Apr 9, 2026
78d2174
comment fixup
ptheywood Apr 9, 2026
c6da182
Fix FLAMEGPU typos in CMake
ptheywood Apr 9, 2026
df547e5
Tests: first pass at a HIP-compilable test suite. Fails to link + man…
ptheywood Apr 9, 2026
f603f78
Clang: Address -Wformat warnigns in host_functions example
ptheywood Apr 14, 2026
2cf6c4f
Clang: Remove un-used private member newline_purge_required from JSON…
ptheywood Apr 14, 2026
a6449ae
Clang: Address Wsign-compare warnings in CUDAScatter.cu
ptheywood Apr 14, 2026
71b4cc6
Clang: Address -Wsign-compare warning in RandomManager.cu
ptheywood Apr 14, 2026
c2453fc
Fixup: mised in ifdef __CUDACC__ in the test suite (must have not sav…
ptheywood Apr 14, 2026
9f11e4b
Clang: Suppress unused variable in test_multi_thread_device which is …
ptheywood Apr 14, 2026
b1e94ef
Fixup: lint test_dep_versions.cu
ptheywood Apr 14, 2026
d7c21b6
fixup: missed ifdef commited empty files by accident
ptheywood Apr 14, 2026
3ec40a9
Clang: Suppress/address unused / set but not used warnings in tests
ptheywood Apr 14, 2026
9356cd6
fixup first test suite pass: missing comemnt at endif
ptheywood Apr 14, 2026
c35aa63
WIP: Attempt to wrap the wrapper in a host function, but this did not…
ptheywood Apr 21, 2026
dbe028a
WIP DO NOT MERGE: extra wrapping (probably not needed), missed ifdefs…
ptheywood Apr 21, 2026
206ac1c
DO NOT MERGE: tempalce occupancy api also hangs
ptheywood Apr 21, 2026
26b0ff8
Minor test changes for it to run on AMD
ptheywood Apr 21, 2026
ed7d6c5
Tests: correct skipping of ApplyConfigDerivedContextCreation
ptheywood Apr 22, 2026
13868e7
Fix: AgentVector::resize was not correctly initialising new IDs to 0 …
ptheywood Apr 23, 2026
78842dc
Fixup: AgentFunctionLauncherHelper guarding so GCC doesn't see kernel…
ptheywood Apr 23, 2026
34a6e98
Occupancy API on CUDA, 128 threads per block on AMD due to hangs / si…
ptheywood Apr 23, 2026
d8dd8f9
Remove amd kernel launch debugging printfs
ptheywood Apr 23, 2026
5d93014
Lintfixup: launcher test when helper was introduced
ptheywood Apr 23, 2026
3703294
lintfix: blocksize for hip vs cuda
ptheywood Apr 23, 2026
3e42a5d
lintfix: older lint fixes, not sure of the source for each
ptheywood Apr 23, 2026
57f1883
WrapperHelper: Cuda fix
ptheywood Apr 23, 2026
6eb81fc
Fixup blocksize changes to address unused warnings due to ifdef soup
ptheywood Apr 23, 2026
e21a290
Breaking Change: Consistently return int for all MessageArray Filter …
ptheywood Apr 27, 2026
f6cdcf8
HIP: Use cuda/hipHostAlloc rather than cuda/hipMallocHost which hip h…
ptheywood Apr 27, 2026
76a484b
fixup GPUArchitectures.cmake: Comments + do not error if no cuda or h…
ptheywood Apr 27, 2026
b521db6
CI: Add HIP 7 CI workflow
ptheywood Apr 27, 2026
c5f9a2d
Clang: Suppress unused-private-field warnings
ptheywood Apr 27, 2026
2d7578c
ROCM/HIP 7.0.0: Fix __host__ __device__ mismatch in rocprim deivce_sc…
ptheywood Apr 27, 2026
f5bb7ed
CMake: Do not validate or set CMAKE_CUDA_ARCHITECTURES
ptheywood Apr 28, 2026
32ac6df
Update CUDA requirement to >= 12.4 on all platforms, with GCC >= 11 o…
ptheywood Apr 28, 2026
8a68a5e
CMake: Delete explciit message for GCC < 8.1 which is no longer relev…
ptheywood Apr 28, 2026
f169de4
fixup fe2b4a8c8 / partially finished cmake changes for hip support.
ptheywood Apr 28, 2026
4826b57
rocm 7.0: mark flamegpu::detail::ReverseIterator __device__ methods a…
ptheywood Apr 28, 2026
c64161d
DO NOT MERGE: Don't trigger DraftRelease on PullRequest to avoid CI s…
ptheywood Apr 28, 2026
afae2cb
fixup: cmake hip version check was clang ver not hip/rocm ver. Early …
ptheywood Apr 29, 2026
c1db3a0
DO NOT MERGE: Don't build beltsoff for AMD while working on CI
ptheywood Apr 29, 2026
7d147b6
WIP
ptheywood Apr 28, 2026
55e4800
To split: Fix RTC on cuda. <source_location> + a bad ifndef move + so…
ptheywood Apr 29, 2026
e5b9fea
Fixup changelog: Undo accidental changes to the changelog. Ideally re…
ptheywood Apr 30, 2026
dfb8a8d
GPU: Improve use of gpu abstraction macro/type headers
ptheywood Apr 30, 2026
e5c09c6
lint fix: void** casting, though this is not new?
ptheywood Apr 30, 2026
7a30312
lintfix brace fix in untouched code?
ptheywood Apr 30, 2026
00e8a5b
lintfix in detail/gpus/macros.hpp whitespace
ptheywood Apr 30, 2026
1011607
lintfix comment space in CUDAErroCHecking __CUDACC_RTC__ endif, recen…
ptheywood Apr 30, 2026
da31345
HIP: Implement roctx within the util::nvtx namespace
ptheywood Apr 30, 2026
4f5c7c6
Fixup: Correctly mark RTC GLM tests as skipped
ptheywood Apr 30, 2026
b37e08a
Fixup initail hip port GLM cmake to be blocked rather than a warning
ptheywood Apr 30, 2026
69ce550
HIP: Enable GLM support by updating GLM to v1.0.3
ptheywood Apr 30, 2026
8528d87
Remove unused typdef CUDARTCFuncMapPair
ptheywood Apr 30, 2026
b3466f7
simulation/detail/CUDAErrorChecking.cuh -> detail/gpu/gpu_api_error_c…
ptheywood Apr 30, 2026
1352b33
HIP: util::wddm implementation and test for hip (always not wddm)
ptheywood Apr 30, 2026
8b9461a
Tests: Mark RTC tests as skipped on hip with a different message
ptheywood Apr 30, 2026
69b6399
Split/move getDeviceName[s] from detail/compute_capabililty.cuh to de…
ptheywood May 1, 2026
fb1ece9
Refactor: detail/compute_capability -> detail/gpu/cuda/compute_capabi…
ptheywood May 1, 2026
31ab310
CUDA fixup: ensbemble cehckComputeCapabiltiy missing ;
ptheywood May 12, 2026
36b1e4a
fixup: Cmake enable_lanuages version_less quoted versions
ptheywood May 12, 2026
06fb990
Fixup: Cmake delete no longer reuqired variable in enable_languages
ptheywood May 12, 2026
52f7445
Fixup: define variables needed in the enable_languages macro with the…
ptheywood May 12, 2026
bd95f0a
Fixup: use of moved compute_capability namespace in JitifyCache.cu
ptheywood May 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
172 changes: 172 additions & 0 deletions .github/scripts/install_hip_ubuntu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
#! /usr/bin/env bash
# Note: this is a very initial HIP installation script for CI. This will need expanding / improving as support for a wider range of HIPs is added.
# Todo: Full version of this as a script, including:
# Todo: Respect input env vars
# Todo: better subpackage management etc
# Todo: 7.x is different thatn 6.x etc
# Todo: Ubuntu version differences

# Define the hip packages to install, in a version agnostic way, targetting as few as required for CI to succeed
HIP_PACKAGES_IN=(
"rocm-hip-runtime-dev"
"rocthrust-dev"
"hipcub-dev"
"rocrand-dev"
"hiprand-dev"
"rocprofiler-sdk-roctx"
)

## -------------------
## Bash functions
## -------------------
# returns 0 (true) if a >= b
function version_ge() {
[ "$#" != "2" ] && echo "${FUNCNAME[0]} requires exactly 2 arguments." && exit 1
[ "$(printf '%s\n' "$@" | sort -V | head -n 1)" == "$2" ]
}
# returns 0 (true) if a > b
function version_gt() {
[ "$#" != "2" ] && echo "${FUNCNAME[0]} requires exactly 2 arguments." && exit 1
[ "$1" = "$2" ] && return 1 || version_ge $1 $2
}
# returns 0 (true) if a <= b
function version_le() {
[ "$#" != "2" ] && echo "${FUNCNAME[0]} requires exactly 2 arguments." && exit 1
[ "$(printf '%s\n' "$@" | sort -V | head -n 1)" == "$1" ]
}
# returns 0 (true) if a < b
function version_lt() {
[ "$#" != "2" ] && echo "${FUNCNAME[0]} requires exactly 2 arguments." && exit 1
[ "$1" = "$2" ] && return 1 || version_le $1 $2
}

## -----------------
## Check for root/sudo
## -----------------

# Detect if the script is being run as root, storing true/false in is_root.
is_root=false
if (( $EUID == 0)); then
is_root=true
fi
# Find if sudo is available
has_sudo=false
if command -v sudo &> /dev/null ; then
has_sudo=true
fi
# Decide if we can proceed or not (root or sudo is required) and if so store whether sudo should be used or not.
if [ "$is_root" = false ] && [ "$has_sudo" = false ]; then
echo "Root or sudo is required. Aborting."
exit 1
elif [ "$is_root" = false ] ; then
USE_SUDO=sudo
else
USE_SUDO=
fi


## ------------------
## Select HIP version
## ------------------

# Get the hip version from the environment as $hip.
HIP_VERSION_STR=${hip}

# Split the version.
# We (might/probably) don't know PATCH at this point - it depends which version gets installed.
HIP_MAJOR=$(echo "${HIP_VERSION_STR}" | cut -d. -f1)
HIP_MINOR=$(echo "${HIP_VERSION_STR}" | cut -d. -f2)
HIP_PATCH=$(echo "${HIP_VERSION_STR}" | cut -d. -f3)
# default patch to 0 if not provided
HIP_PATCH=${HIP_PATCH:-0}
# build a 3-part version string for package names
HIP_MAJOR_MINOR_PATCH="${HIP_MAJOR}.${HIP_MINOR}.${HIP_PATCH}"
# use lsb_release to find the OS.
UBUNTU_NAME=$(lsb_release -sc)
UBUNTU_VERSION=$(lsb_release -sr)
UBUNTU_VERSION="${UBUNTU_VERSION//.}"

echo "HIP_MAJOR: ${HIP_MAJOR}"
echo "HIP_MINOR: ${HIP_MINOR}"
echo "HIP_PATCH: ${HIP_PATCH}"
echo "UBUNTU_NAME: ${UBUNTU_NAME}"
echo "UBUNTU_VERSION: ${UBUNTU_VERSION}"


# If we don't know the HIP_MAJOR or MINOR, error.
if [ -z "${HIP_MAJOR}" ] ; then
echo "Error: Unknown HIP Major version. Aborting."
exit 1
fi
if [ -z "${HIP_MINOR}" ] ; then
echo "Error: Unknown HIP Minor version. Aborting."
exit 1
fi
# If we don't know the Ubuntu version, error.
if [ -z ${UBUNTU_VERSION} ]; then
echo "Error: Unknown Ubuntu version. Aborting."
exit 1
fi

## ------------------------------
## Select HIP packages to install
## ------------------------------
# build a space-separated list of packages to install via apt
HIP_PACKAGES=""
for package in "${HIP_PACKAGES_IN[@]}"
do :
# Append the hip version to the pacakge name
HIP_PACKAGES+=" ${package}${HIP_MAJOR_MINOR_PATCH}"
done
echo "HIP_PACKAGES ${HIP_PACKAGES}"

# enable command printing for CI debugging
set -x

# following ubuntu instructions from:
# https://rocm.docs.amd.com/projects/install-on-linux/en/latest/install/prerequisites.html
# https://rocm.docs.amd.com/projects/install-on-linux/en/latest/install/install-methods/package-manager/package-manager-ubuntu.html

# install deps
$USE_SUDO apt-get install -y python3-setuptools python3-wheel

# Signing key
$USE_SUDO mkdir --parents --mode=0755 /etc/apt/keyrings
wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | gpg --dearmor | $USE_SUDO tee /etc/apt/keyrings/rocm.gpg > /dev/null

# register packages
$USE_SUDO tee /etc/apt/sources.list.d/rocm.list << EOF
deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/${HIP_VERSION_STR} ${UBUNTU_NAME} main
deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/graphics/${HIP_VERSION_STR}/ubuntu ${UBUNTU_NAME} main
EOF
$USE_SUDO tee /etc/apt/preferences.d/rocm-pin-600 << EOF
Package: *
Pin: release o=repo.radeon.com
Pin-Priority: 600
EOF
$USE_SUDO apt update

# Install packages.
$USE_SUDO apt install -y ${HIP_PACKAGES}

## -----------------
## Set environment vars / vars to be propagated
## -----------------

ROCM_PATH=/opt/rocm-${HIP_MAJOR_MINOR_PATCH}
echo "ROCM_PATH=${ROCM_PATH}"
export ROCM_PATH=${ROCM_PATH}
export PATH="$ROCM_PATH/bin:$PATH"
export LD_LIBRARY_PATH="$ROCM_PATH/lib:$LD_LIBRARY_PATH"

# Check hipcc is now available.
hipcc -V

# If executed on github actions, make the appropriate echo statements to update the environment
if [[ $GITHUB_ACTIONS ]]; then
# Set paths for subsequent steps, using ${ROCM_PATH}
echo "Adding HIP ${HIP_MAJOR_MINOR_PATCH} to ROCM_PATH, PATH and LD_LIBRARY_PATH"
echo "ROCM_PATH=${ROCM_PATH}" >> $GITHUB_ENV
echo "${ROCM_PATH}/bin" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=${ROCM_PATH}/bin/:${LD_LIBRARY_PATH}" >> $GITHUB_ENV
fi
1 change: 1 addition & 0 deletions .github/workflows/Docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
-DCMAKE_WARN_DEPRECATED="OFF"
-DFLAMEGPU_WARNINGS_AS_ERRORS="ON"
-DFLAMEGPU_BUILD_API_DOCUMENTATION="ON"
-DFLAMEGPU_GPU=OFF

- name: Docs
working-directory: ${{ env.BUILD_DIR }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/Draft-Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ on:
tags:
- 'v*.*.*'
# Or on pull_requests which mutate this CI workflow, using pr rather than push:branch to ensure that the merged state will be OK, as that is what is important here.
pull_request:
paths:
- ".github/workflows/Draft-Release.yml"
# pull_request:
# paths:
# - ".github/workflows/Draft-Release.yml"
# Or trigger on manual dispatch. This will not produce a release, but will perform the thorough build.
workflow_dispatch:

Expand Down Expand Up @@ -51,9 +51,9 @@ jobs:
cuda_arch: "50-real;120-real;120-virtual;"
hostcxx: gcc-12
os: ubuntu-24.04
- cuda: "12.0"
- cuda: "12.4"
cuda_arch: "50-real;90-real;90-virtual;"
hostcxx: gcc-10
hostcxx: gcc-11
os: ubuntu-22.04
python:
- "3.10"
Expand Down Expand Up @@ -320,7 +320,7 @@ jobs:
hostcxx: gcc-toolset-13
os: ubuntu-24.04
# CUDA 12
- cuda: "12.0"
- cuda: "12.4"
cuda_arch: "50-real;60-real;70-real;80-real;90-real;90-virtual"
hostcxx: gcc-toolset-12
os: ubuntu-24.04
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
# optional exclude: can be partial, include: must be specific
matrix:
cudacxx:
- cuda: "12.0"
- cuda: "12.4"
os: ubuntu-22.04
env:
# Define constants
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/MPI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
matrix:
# CUDA_ARCH values are reduced compared to wheels due to CI memory issues while compiling the test suite.
cudacxx:
- cuda: "12.0"
- cuda: "12.4"
cuda_arch: "50-real;"
hostcxx: gcc-11
os: ubuntu-22.04
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/Manylinux_2_28.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
hostcxx: gcc-toolset-13
os: ubuntu-24.04
# CUDA 12
- cuda: "12.0"
- cuda: "12.4"
cuda_arch: "50"
hostcxx: gcc-toolset-12
os: ubuntu-24.04
Expand Down
141 changes: 141 additions & 0 deletions .github/workflows/Ubuntu-HIP.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# Compile project on Ubuntu using HIP.
# This is currently separate to keep thigns simple (CI refactoring is required at some point anyway),
# And HIP builds only support a subset of features currently
name: Ubuntu-HIP

on:
# Branch pushes that do not only modify other workflow files
push:
branches:
- '**'
paths:
- "**"
- "!.github/**"
- ".github/scripts/install_hip_ubuntu.sh"
- ".github/workflows/Ubuntu-HIP.yml"
# Disabled for now. See https://github.com/FLAMEGPU/FLAMEGPU2/pull/644
# pull_request:
# Allow manual invocation.
workflow_dispatch:

defaults:
run:
shell: bash

jobs:
build:
runs-on: ${{ matrix.compilers.os }}
strategy:
fail-fast: false
# Multiplicative build matrix
# optional exclude: can be partial, include: must be specific
matrix:
compilers:
# see https://llvm.org/docs/AMDGPUUsage.html#amdgpu-generic-processor-table for arch flags
# HIP 7.2 with any RDNA3 GPU (recent consumer, that we can actually test)
- hip: "7.2"
hip_arch: "gfx11-generic"
hostcxx: hipcc
os: ubuntu-24.04
# HIP 7.0 with a Vega/CDNA Datacentre GPU (oldest we will support?)
- hip: "7.0"
hip_arch: "gfx9-generic"
hostcxx: hipcc
os: ubuntu-24.04
config:
- name: "Release"
config: "Release"
SEATBELTS: "ON"
# Temp disabled to keep CI smaller
# - name: "Beltsoff"
# config: "Release"
# SEATBELTS: "OFF"

# Name the job based on matrix/env options
name: "build (${{ matrix.compilers.hip }}, ${{ matrix.config.name }}, ${{ matrix.compilers.os }})"

# Define job-wide env constants, and promote matrix elements to env constants for portable steps.
env:
# Workflow specific constants for building a specific example
# Note this assumes the example exists in cpp, rather than cpp_rtc subdirectory
INDIVIDUAL_EXAMPLE: ${{ fromJSON('{true:"game_of_life",false:""}')[matrix.config.name == 'Release' && matrix.VISUALISATION == 'OFF'] }}
# Define constants
BUILD_DIR: "build"
FLAMEGPU_BUILD_TESTS: "ON"
# Port matrix options to environment, for more portability.
HIP: ${{ matrix.compilers.hip }}
HIP_ARCH: ${{ matrix.compilers.hip_arch }}
HOSTCXX: ${{ matrix.compilers.hostcxx }}
OS: ${{ matrix.compilers.os }}
CONFIG: ${{ matrix.config.config }}
FLAMEGPU_SEATBELTS: ${{ matrix.config.SEATBELTS }}

steps:
- uses: actions/checkout@v4

- name: Install HIP
if: ${{ startswith(env.OS, 'ubuntu') && env.HIP != '' }}
env:
hip: ${{ env.HIP }}
run: .github/scripts/install_hip_ubuntu.sh

- name: Install/Select host compiler (HIPCC only)
run: |
echo "CC=hipcc" >> $GITHUB_ENV
echo "CXX=hipcc" >> $GITHUB_ENV

- name: Add custom problem matchers for annotations
run: echo "::add-matcher::.github/problem-matchers.json"

# This pre-emptively patches a bug from ManyLinux where git dir is owned by diff user, blocking buildnumber generation
- name: Enable git safe-directory
run: git config --global --add safe.directory $GITHUB_WORKSPACE

- name: Configure cmake
run: >
cmake . -B "${{ env.BUILD_DIR }}"
-DCMAKE_BUILD_TYPE="${{ env.CONFIG }}"
-Werror=dev
-DCMAKE_WARN_DEPRECATED="OFF"
-DFLAMEGPU_WARNINGS_AS_ERRORS="ON"
-DFLAMEGPU_GPU="HIP"
-DCMAKE_HIP_ARCHITECTURES="${{ env.HIP_ARCH }}"
-DFLAMEGPU_SEATBELTS="${{ env.FLAMEGPU_SEATBELTS }}"
-DFLAMEGPU_BUILD_TESTS="${{ env.FLAMEGPU_BUILD_TESTS }}"

# Check for bugs when cmake is reconfigured, i.e. fetch content patching
- name: Re-configure cmake
run: >
cmake . -B "${{ env.BUILD_DIR }}"

- name: Build static library
working-directory: ${{ env.BUILD_DIR }}
run: cmake --build . --target flamegpu --verbose -j `nproc`

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

- name: Build all remaining targets
working-directory: ${{ env.BUILD_DIR }}
run: cmake --build . --target all --verbose -j `nproc`

- name: Configure Individual example
if: ${{ env.INDIVIDUAL_EXAMPLE != '' }}
working-directory: examples/cpp/${{ env.INDIVIDUAL_EXAMPLE }}
run: >
cmake . -B "${{ env.BUILD_DIR }}"
-DCMAKE_BUILD_TYPE="${{ env.CONFIG }}"
-Werror=dev
-DCMAKE_WARN_DEPRECATED="OFF"
-DFLAMEGPU_WARNINGS_AS_ERRORS="ON"
-DFLAMEGPU_SEATBELTS="${{ env.FLAMEGPU_SEATBELTS }}"
-DFLAMEGPU_GPU="HIP"
-DCMAKE_HIP_ARCHITECTURES="${{ env.HIP_ARCH }}"

- name: Build Individual example
if: ${{ env.INDIVIDUAL_EXAMPLE != '' }}
working-directory: examples/cpp/${{ env.INDIVIDUAL_EXAMPLE }}/${{ env.BUILD_DIR }}
run: cmake --build . --target ${{ env.INDIVIDUAL_EXAMPLE }} --verbose -j `nproc`

4 changes: 2 additions & 2 deletions .github/workflows/Ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ jobs:
cuda_arch: "120"
hostcxx: gcc-12
os: ubuntu-24.04
- cuda: "12.0"
- cuda: "12.4"
cuda_arch: "50"
hostcxx: gcc-10
hostcxx: gcc-11
os: ubuntu-22.04
python:
- "3.14"
Expand Down
Loading
Loading