-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Create linux-ci.yml * Update linux-ci.yml * cancelling and python-package workflows + fixes to linux-ci workflow * Update linux-ci.yml * Update linux-ci.yml * Update linux-ci.yml * Update linux-ci.yml * Update linux-ci.yml * add_feature for Python3_EXECUTABLE * Update linux-ci.yml * rpath - enable CMAKE_INSTALL_RPATH_USE_LINK_PATH - fix to Kokkos_INSTALL_LIBDIR * Update linux-ci.yml * print Python3_SITEARCH * Update CMakeLists.txt * Python3_EXE and PYTHON_EXE sync * Fix to cmake-build install * Update KokkosPythonPackages.cmake * Update CMakeLists.txt * Update linux-ci.yml * Update linux-ci.yml * Update linux-ci.yml * removed some stuff from pyproject.toml
- Loading branch information
Showing
8 changed files
with
266 additions
and
9 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: cancel-builds-on-update | ||
on: | ||
workflow_run: | ||
workflows: ['linux-ci', 'python-package'] | ||
types: ['requested'] | ||
|
||
jobs: | ||
cancel-duplicate-workflow-runs: | ||
name: "Cancel duplicate workflow runs" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: potiuk/cancel-workflow-runs@master | ||
name: "Cancel duplicate workflow runs" | ||
with: | ||
cancelMode: duplicates | ||
cancelFutureDuplicates: true | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
sourceRunId: ${{ github.event.workflow_run.id }} | ||
notifyPRCancel: true | ||
skipEventTypes: '["schedule"]' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,173 @@ | ||
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.6, 3.7, 3.8, 3.9] | ||
|
||
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++ && | ||
python -m pip install --upgrade pip | ||
|
||
- name: Install Kokkos | ||
run: | ||
python -m pip install 'cmake==3.18.4' && | ||
git clone https://github.com/kokkos/kokkos.git /tmp/kokkos-source && | ||
cmake -B /tmp/kokkos-build | ||
-DKokkos_ENABLE_SERIAL=ON | ||
-DKokkos_ENABLE_OPENMP=ON | ||
-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 && | ||
cmake -B ${{github.workspace}}/build | ||
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} | ||
-DENABLE_LAYOUTS=OFF | ||
-DENABLE_EXAMPLES=ON | ||
-DENABLE_WERROR=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 scratch && | ||
cd scratch && | ||
export PYTHONPATH=/usr/local/lib/python${{ matrix.python-version }}/site-packages:${PYTHONPATH} && | ||
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 && | ||
python ./ex-numpy.py | ||
|
||
python-build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
|
||
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++ && | ||
python -m pip install --upgrade pip | ||
|
||
- name: Install Kokkos | ||
run: | ||
python -m pip install 'cmake==3.18.4' && | ||
git clone 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 setup.py install | ||
--enable-layouts | ||
--disable-memory-traits | ||
--enable-werror | ||
-- -DENABLE_EXAMPLES=ON | ||
|
||
- name: Import Test | ||
run: | ||
mkdir scratch && | ||
cd scratch && | ||
python -c "import kokkos; print(kokkos.__file__)" | ||
|
||
- name: Test | ||
working-directory: ${{github.workspace}}/_skbuild | ||
run: | ||
cd ./*/cmake-build && | ||
ls && | ||
python ./ex-numpy.py | ||
|
||
pip-build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
|
||
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++ && | ||
python -m pip install --upgrade pip | ||
|
||
- name: Install Kokkos | ||
run: | ||
python -m pip install 'cmake==3.18.4' && | ||
git clone https://github.com/kokkos/kokkos.git /tmp/kokkos-source && | ||
cmake -B /tmp/kokkos-build | ||
-DKokkos_ENABLE_SERIAL=ON | ||
-DKokkos_ENABLE_PTHREAD=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 && | ||
PYKOKKOS_BASE_SETUP_ARGS="-DENABLE_WERROR=ON -DENABLE_MEMORY_TRAITS=OFF -DCMAKE_CXX_STANDARD=17" | ||
python -m pip install -v --user --no-deps -e . | ||
|
||
- name: Import Test | ||
run: | ||
mkdir scratch && | ||
cd scratch && | ||
python -c "import kokkos; print(kokkos.__file__)" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: python-package | ||
|
||
on: | ||
push: | ||
branches: [ main, develop ] | ||
pull_request: | ||
branches: [ main, develop ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7, 3.8, 3.9] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 pytest | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=90 --statistics | ||
#- name: Test with pytest | ||
# run: | | ||
# pytest |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools>=42", | ||
"wheel", | ||
"scikit-build", | ||
"cmake>=3.16", | ||
] | ||
|