Skip to content

Commit

Permalink
nvhpc ci expansionn
Browse files Browse the repository at this point in the history
  • Loading branch information
ptheywood committed Jan 8, 2024
1 parent 82add6a commit bb6864f
Showing 1 changed file with 40 additions and 38 deletions.
78 changes: 40 additions & 38 deletions .github/workflows/NVHPC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,13 @@ jobs:
os: ubuntu-22.04
container: nvcr.io/nvidia/nvhpc:23.11-devel-cuda12.3-ubuntu22.04
python:
- ""
# - "3.12"
- "3.12"
config:
- name: "Release"
config: "Release"
SEATBELTS: "ON"
VISUALISATION:
# - "ON"
- "ON"
- "OFF"

# Name the job based on matrix/env options
Expand Down Expand Up @@ -73,56 +72,59 @@ jobs:
- name: Add custom problem matchers for annotations
run: echo "::add-matcher::.github/problem-matchers.json"

# - name: Select Python
# if: ${{ env.PYTHON != '' && env.FLAMEGPU_BUILD_PYTHON == 'ON' }}
# uses: actions/setup-python@v4
# with:
# python-version: ${{ env.PYTHON }}
- name: Select Python
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.FLAMEGPU_BUILD_PYTHON == 'ON' }}
# run: |
# sudo apt-get install python3-venv
# python3 -m pip install --upgrade wheel build setuptools
- name: Install python dependencies
if: ${{ env.PYTHON != '' && env.FLAMEGPU_BUILD_PYTHON == 'ON' }}
run: |
apt-get install python3-venv
python3 -m pip install --upgrade wheel build setuptools
# these conditions need to be based on the version in the container, not the host. Might want tweaking, or just relies on the yml being correct.
- name: Install Visualisation Dependencies
if: ${{ startswith(env.OS, 'ubuntu') && env.VISUALISATION == 'ON' }}
run: |
# Install ubuntu-20.04 packages
if [ "$OS" == 'ubuntu-22.04' ]; then
sudo apt-get install -y libglew-dev libfontconfig1-dev libsdl2-dev libdevil-dev libfreetype-dev
apt-get install -y libglew-dev libfontconfig1-dev libsdl2-dev libdevil-dev libfreetype-dev
fi
if [ "$OS" == 'ubuntu-20.04' ]; then
sudo apt-get install -y libglew-dev libfontconfig1-dev libsdl2-dev libdevil-dev libfreetype-dev
apt-get install -y libglew-dev libfontconfig1-dev libsdl2-dev libdevil-dev libfreetype-dev
fi
# Install Ubuntu 18.04 packages
if [ "$OS" == 'ubuntu-18.04' ]; then
sudo apt-get install -y libglew-dev libfontconfig1-dev libsdl2-dev libdevil-dev libfreetype6-dev libgl1-mesa-dev
apt-get install -y libglew-dev libfontconfig1-dev libsdl2-dev libdevil-dev libfreetype6-dev libgl1-mesa-dev
fi
# - name: Install Swig >= 4.0.2
# run: |
# # Remove existing swig install, so CMake finds the correct swig
# if [ "$OS" == 'ubuntu-20.04' ]; then
# sudo apt-get remove -y swig swig4.0
# fi
# # Install Ubuntu 18.04 packages
# if [ "$OS" == 'ubuntu-18.04' ]; then
# sudo apt-get remove -y swig
# fi
# # Install additional apt-based dependencies required to build swig 4.0.2
# sudo apt-get install -y bison
# # Create a local directory to build swig in.
# mkdir -p swig-from-source && cd swig-from-source
# # Install SWIG building from source dependencies
# wget https://github.com/swig/swig/archive/refs/tags/v4.0.2.tar.gz
# tar -zxf v4.0.2.tar.gz
# cd swig-4.0.2/
# ./autogen.sh
# ./configure
# make
# sudo make install
# @todo - enforce that $OS is correct. maybe parse lsb_release instead?
# @tood - doubel check this builds with gcc and not nvhpc within the container
- name: Install Swig >= 4.0.2
run: |
# Remove existing swig install, so CMake finds the correct swig
if [ "$OS" == 'ubuntu-20.04' ]; then
apt-get remove -y swig swig4.0
fi
# Install Ubuntu 18.04 packages
if [ "$OS" == 'ubuntu-18.04' ]; then
apt-get remove -y swig
fi
# Install additional apt-based dependencies required to build swig 4.0.2
sudo apt-get install -y bison
# Create a local directory to build swig in.
mkdir -p swig-from-source && cd swig-from-source
# Install SWIG building from source dependencies
wget https://github.com/swig/swig/archive/refs/tags/v4.0.2.tar.gz
tar -zxf v4.0.2.tar.gz
cd swig-4.0.2/
./autogen.sh
./configure
make
make install
- name: Configure cmake
Expand Down

0 comments on commit bb6864f

Please sign in to comment.