ENH: bump Kokkos to release 3.7.02 #188
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: linux-ci | |
on: | |
push: | |
branches: [ main, develop ] | |
pull_request: | |
branches: [ main, develop ] | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
cmake-build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.7, 3.8, 3.9, 'pypy-3.6', 'pypy-3.7'] | |
kokkos-branch: ['master', 'develop'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Update container | |
run: | |
sudo apt-get update && | |
sudo apt-get install -y build-essential gcc g++ ninja-build && | |
python -m pip install --upgrade pip && | |
python -m pip install 'cmake==3.18.4' | |
- name: Install Kokkos | |
if: ${{ matrix.python-version != 'pypy-3.6' && matrix.python-version != 'pypy-3.7' }} | |
run: | |
git clone -b ${{ matrix.kokkos-branch }} https://github.com/kokkos/kokkos.git /tmp/kokkos-source && | |
cmake -B /tmp/kokkos-build | |
-DKokkos_ENABLE_SERIAL=ON | |
-DKokkos_ENABLE_OPENMP=OFF | |
-DBUILD_SHARED_LIBS=ON | |
/tmp/kokkos-source && | |
cmake --build /tmp/kokkos-build --target all --parallel 2 && | |
sudo cmake --build /tmp/kokkos-build --target install --parallel 2 | |
- name: Configure CMake | |
run: | |
python -m pip install -r requirements.txt && | |
python -m pip install pytest && | |
cmake -B ${{github.workspace}}/build | |
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
-DENABLE_LAYOUTS=OFF | |
-DENABLE_MEMORY_TRAITS=OFF | |
-DENABLE_EXAMPLES=ON | |
-DENABLE_WERROR=ON | |
-DENABLE_PRECOMPILED_HEADERS=ON | |
-DPython3_EXECUTABLE=$(which python) | |
- name: Build | |
run: | |
cmake --build ${{github.workspace}}/build --target all --parallel 2 && | |
sudo cmake --build ${{github.workspace}}/build --target install --parallel 2 | |
- name: Import Test | |
working-directory: ${{github.workspace}}/build | |
run: | |
mkdir -p scratch && | |
cd scratch && | |
export PYTHONPATH=/usr/local/lib/python${{ matrix.python-version }}/site-packages:${PYTHONPATH} && | |
DEBUG_OUTPUT=ON python -c "import kokkos; print(kokkos.__file__)" | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
run: | |
export PYTHONPATH=${PWD}:/usr/local/lib/python${{ matrix.python-version }}/site-packages:${PYTHONPATH} && | |
ls && | |
pytest . && | |
python ./ex-numpy.py | |
python-build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.7, 3.8, 3.9, 'pypy-3.6', 'pypy-3.7'] | |
kokkos-branch: ['master'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Update container | |
run: | |
sudo apt-get update && | |
sudo apt-get install -y build-essential gcc g++ ninja-build && | |
python -m pip install --upgrade pip && | |
python -m pip install 'cmake==3.18.4' | |
- name: Install Kokkos | |
if: ${{ matrix.python-version != '3.8' && matrix.python-version != '3.9' }} | |
run: | |
git clone -b ${{ matrix.kokkos-branch }} https://github.com/kokkos/kokkos.git /tmp/kokkos-source && | |
cmake -B /tmp/kokkos-build | |
-DKokkos_ENABLE_SERIAL=ON | |
-DKokkos_ENABLE_OPENMP=ON | |
-DCMAKE_CXX_STANDARD=17 | |
-DBUILD_SHARED_LIBS=ON | |
/tmp/kokkos-source && | |
cmake --build /tmp/kokkos-build --target all --parallel 2 && | |
sudo cmake --build /tmp/kokkos-build --target install --parallel 2 | |
- name: Build | |
run: | |
python -m pip install -r requirements.txt && | |
python -m pip install pytest && | |
python setup.py install | |
--enable-layouts | |
--enable-view-ranks=4 | |
--disable-memory-traits | |
--enable-werror | |
-- -DENABLE_EXAMPLES=ON | |
-- -j1 | |
- name: Import Test | |
run: | |
mkdir -p scratch && | |
cd scratch && | |
DEBUG_OUTPUT=ON python -c "import kokkos; print(kokkos.__file__)" && | |
pytest $(dirname $(python -c "import kokkos; print(kokkos.__file__)" 2> /dev/null)) | |
- name: Test | |
working-directory: ${{github.workspace}}/_skbuild | |
run: | |
cd ./*/cmake-build && | |
ls && | |
pytest . && | |
python ./ex-numpy.py | |
pip-build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] | |
kokkos-branch: ['develop'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Update container | |
run: | |
sudo apt-get update && | |
sudo apt-get install -y build-essential gcc g++ ninja-build && | |
python -m pip install --upgrade pip && | |
python -m pip install 'cmake==3.20.2' | |
- name: Install Kokkos | |
if: ${{ matrix.python-version != '3.7' }} | |
run: | |
git clone -b ${{ matrix.kokkos-branch }} https://github.com/kokkos/kokkos.git /tmp/kokkos-source && | |
cmake -B /tmp/kokkos-build | |
-DKokkos_ENABLE_SERIAL=ON | |
-DKokkos_ENABLE_THREADS=ON | |
-DCMAKE_CXX_STANDARD=17 | |
-DCMAKE_POSITION_INDEPENDENT_CODE=ON | |
/tmp/kokkos-source && | |
cmake --build /tmp/kokkos-build --target all --parallel 2 && | |
sudo cmake --build /tmp/kokkos-build --target install --parallel 2 | |
- name: Build | |
run: | |
python -m pip install -r requirements.txt && | |
python -m pip install pytest && | |
PYKOKKOS_BASE_SETUP_ARGS="-DENABLE_WERROR=ON -DENABLE_MEMORY_TRAITS=ON -DENABLE_LAYOUTS=ON -DENABLE_VIEW_RANKS=2 -DCMAKE_CXX_STANDARD=17 -DKokkos_ENABLE_THREADS=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DBUILD_SHARED_LIBS=OFF" | |
python -m pip install -v --user --no-deps -e . | |
- name: Import Test | |
run: | |
mkdir -p scratch && | |
cd scratch && | |
DEBUG_OUTPUT=ON python -c "import kokkos; print(kokkos.__file__)" | |
- name: Test | |
working-directory: ${{github.workspace}}/scratch | |
run: | |
pytest $(dirname $(python -c "import kokkos; print(kokkos.__file__)" 2> /dev/null)) | |
subproject: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.9] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
path: ${{github.workspace}}/pykokkos-base | |
submodules: true | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Update container | |
run: | |
sudo apt-get update && | |
sudo apt-get install -y build-essential gcc g++ ninja-build && | |
python -m pip install --upgrade pip && | |
python -m pip install 'cmake==3.18.4' | |
- name: Generate Hierarchy | |
run: | | |
cp -r ${{github.workspace}}/pykokkos-base/external/kokkos ${{github.workspace}}/kokkos | |
cp -r ${{github.workspace}}/pykokkos-base/external/pybind11 ${{github.workspace}}/pybind11 | |
ls | |
ls * | |
- name: Generate CMakeLists.txt | |
run: | | |
echo -e "cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR)\nproject(pykokkos-base-as-subproject LANGUAGES CXX)\nadd_subdirectory(kokkos)\nadd_subdirectory(pybind11)\nadd_subdirectory(pykokkos-base)" > ${{github.workspace}}/CMakeLists.txt | |
cat ${{github.workspace}}/CMakeLists.txt | |
- name: Configure CMake | |
run: | |
python -m pip install -r ${{github.workspace}}/pykokkos-base/requirements.txt && | |
python -m pip install pytest && | |
cmake -B ${{github.workspace}}/build | |
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | |
-DENABLE_LAYOUTS=OFF | |
-DENABLE_MEMORY_TRAITS=OFF | |
-DENABLE_VIEW_RANKS=1 | |
-DENABLE_EXAMPLES=ON | |
-DENABLE_WERROR=ON | |
-DKokkos_ENABLE_SERIAL=ON | |
-DKokkos_ENABLE_OPENMP=ON | |
-DBUILD_SHARED_LIBS=ON | |
-DPYTHON_EXECUTABLE=$(which python) | |
-DPython3_EXECUTABLE=$(which python) | |
${{github.workspace}} | |
- name: Build | |
run: | |
cmake --build ${{github.workspace}}/build --target all --parallel 2 && | |
sudo cmake --build ${{github.workspace}}/build --target install --parallel 2 | |
- name: Setup PYTHONPATH | |
run: | |
echo "PYTHONPATH=/usr/local/lib/python${{ matrix.python-version }}/site-packages:${PYTHONPATH}" >> $GITHUB_ENV | |
- name: Import Test | |
run: | |
DEBUG_OUTPUT=ON python -c "import kokkos; print(kokkos.__file__)" | |
- name: Test | |
run: | |
python -m kokkos.test |