Skip to content

Commit

Permalink
CI: updates and more OpenMP and CUDA builds
Browse files Browse the repository at this point in the history
 - update checkout action to v3, setup-python action to v4
 - add a Windows OpenMP build using LLVM
 - add an Ubuntu 22.04 CUDA build
  • Loading branch information
GPMueller committed Feb 11, 2023
1 parent 53f3a0a commit ecba59e
Showing 1 changed file with 44 additions and 19 deletions.
63 changes: 44 additions & 19 deletions .github/workflows/ci.yml
Expand Up @@ -25,14 +25,18 @@ jobs:
name-suffix: "-openmp"
os: macos-latest
build-type: Release
- openmp: true
name-suffix: "-openmp"
os: windows-latest
build-type: Release
env:
BUILD_TYPE: ${{ matrix.build-type }}
CMAKE_FLAGS: -DSPIRIT_UI_USE_IMGUI=ON -DSPIRIT_UI_CXX_USE_QT=OFF
OMP_NUM_THREADS: 4
EXCLUDETESTS: ${{ matrix.excludetests }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: πŸ“š Install required system packages
if: matrix.os == 'ubuntu-latest'
Expand All @@ -43,7 +47,7 @@ jobs:
- name: πŸ“ Create build folder
run: cmake -E make_directory ${{runner.workspace}}/build

- name: βš™ Install OpenMP on macos
- name: βš™ Install LLVM (for OpenMP) on macOS
if: matrix.openmp == true && matrix.os == 'macos-latest'
shell: bash
working-directory: ${{runner.workspace}}/build
Expand All @@ -58,6 +62,23 @@ jobs:
echo llvm_path $llvm_path
echo CMAKE_FLAGS="$CMAKE_FLAGS -DUSER_COMPILER_C=${USER_COMPILER_C} -DUSER_COMPILER_CXX=${USER_COMPILER_CXX} -DUSER_PATH_COMPILER=${USER_PATH_COMPILER}" >> $GITHUB_ENV
- name: βš™ Install LLVM (for OpenMP) on Windows
if: matrix.openmp == true && matrix.os == 'windows-latest'
shell: pwsh
working-directory: ${{runner.workspace}}/build
run: |
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install llvm -y
llvm_path="/c/Program\ Files/LLVM"
USER_PATH_COMPILER="${llvm_path}/bin/"
USER_COMPILER_C="clang"
USER_COMPILER_CXX="clang++"
echo llvm_path $llvm_path
"{CMAKE_FLAGS}={\"$CMAKE_FLAGS -DUSER_COMPILER_C=${USER_COMPILER_C} -DUSER_COMPILER_CXX=${USER_COMPILER_CXX} -DUSER_PATH_COMPILER=${USER_PATH_COMPILER}\"}" >> $env:GITHUB_ENV
- name: βš™ Configure with OpenMP
if: matrix.openmp == true
shell: bash
Expand Down Expand Up @@ -90,8 +111,8 @@ jobs:
CMAKE_FLAGS: -DSPIRIT_UI_USE_IMGUI=OFF -DSPIRIT_UI_CXX_USE_QT=OFF -DSPIRIT_TEST_COVERAGE=ON

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'

Expand Down Expand Up @@ -147,7 +168,7 @@ jobs:
CMAKE_FLAGS: -DSPIRIT_UI_USE_IMGUI=OFF -DSPIRIT_UI_CXX_USE_QT=OFF -DSPIRIT_ENABLE_PINNING=ON -DSPIRIT_ENABLE_DEFECTS=ON

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: πŸ“ Create build folder
run: cmake -E make_directory ${{runner.workspace}}/build
Expand Down Expand Up @@ -180,7 +201,7 @@ jobs:
SOURCES: "find core/include/ core/src/ ui-cpp/utility/ ui-cpp/ui-imgui/include/ ui-cpp/ui-imgui/src/ -iname *.hpp -o -iname *.cpp"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: πŸ“š Install required system packages
run: |
Expand Down Expand Up @@ -214,9 +235,9 @@ jobs:
run: |
clang-tidy-15 --version
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.10'

- name: πŸ“š Install python packages
run: pip install --user numpy pylint black
Expand All @@ -237,19 +258,23 @@ jobs:
fail-fast: false
matrix:
config:
- os: ubuntu-22.04
- os: ubuntu-20.04
- os: ubuntu-18.04
env:
BUILD_TYPE: Release
CMAKE_FLAGS: -DSPIRIT_UI_USE_IMGUI=OFF -DSPIRIT_UI_CXX_USE_QT=OFF -DSPIRIT_USE_CUDA=ON -DSPIRIT_CUDA_ARCH=sm_70

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: πŸ“š Install CUDA
shell: bash
run: |
sudo apt update
sudo apt install nvidia-cuda-toolkit
if [ ${{ matrix.os == 'ubuntu-22.04' }} ]; then wget -O install_cuda.run https://developer.download.nvidia.com/compute/cuda/12.0.1/local_installers/cuda_12.0.1_525.85.12_linux.run; fi
if [ ${{ matrix.os == 'ubuntu-20.04' }} ]; then wget -O install_cuda.run https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run; fi
if [ ${{ matrix.os == 'ubuntu-18.04' }} ]; then wget -O install_cuda.run https://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda_10.2.89_440.33.01_linux.run; fi
sudo sh install_cuda.run
- name: πŸ“ Create build folder
run: cmake -E make_directory ${{runner.workspace}}/build
Expand All @@ -271,7 +296,7 @@ jobs:
CMAKE_FLAGS: -DSPIRIT_UI_USE_IMGUI=OFF -DSPIRIT_UI_CXX_USE_QT=ON

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: πŸ“š Install Qt5
run: |
Expand Down Expand Up @@ -299,7 +324,7 @@ jobs:
EMSCRIPTEN_VERSION: "1.39.20"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: πŸ“š Install Emscripten
working-directory: ${{runner.workspace}}
Expand Down Expand Up @@ -340,7 +365,7 @@ jobs:
EMSCRIPTEN_VERSION: "1.39.20"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: πŸ“š Install Emscripten
working-directory: ${{runner.workspace}}
Expand Down Expand Up @@ -387,8 +412,8 @@ jobs:
SPIRIT_ADD_VERSION_SUFFIX: true

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'

Expand Down Expand Up @@ -452,7 +477,7 @@ jobs:
CMAKE_FLAGS: -DSPIRIT_UI_USE_IMGUI=ON -DSPIRIT_UI_CXX_USE_QT=OFF -DSPIRIT_BUNDLE_APP=ON

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: πŸ“š Install required system packages
if: matrix.os == 'ubuntu-latest'
Expand Down Expand Up @@ -484,7 +509,7 @@ jobs:
path: |
${{runner.workspace}}/build/*.tar.gz
- name: πŸ“¦ Archive macos package
- name: πŸ“¦ Archive macOS package
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v2
with:
Expand Down Expand Up @@ -512,7 +537,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: πŸ“„ Generate a changelog
id: changelog
Expand Down

0 comments on commit ecba59e

Please sign in to comment.