Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
56 changes: 19 additions & 37 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,16 @@ on:
branches: [ main ]

env:
build_dir: "build"
build-dir: "build"
config: "Release"
artifact: "native"
nt: "4"

jobs:

windows:
runs-on: windows-2019
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: true
fetch-depth: 0
Expand All @@ -43,68 +42,51 @@ jobs:
arch: amd64

- name: Configure CMake
run: cmake . -G Ninja -B ${{ env.build_dir }} -DCMAKE_BUILD_TYPE=${{ env.config }}
run: |
cmake . -G Ninja -B ${{ env.build-dir }} -DCMAKE_BUILD_TYPE=${{ env.config }} -DSPLA_BUILD_OPENCL=OFF

- name: Build library sources
run: cmake --build ${{ env.build_dir }}
run: cmake --build ${{ env.build-dir }} --verbose -j ${{ env.nt }}

- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: windows-${{env.artifact}}
path: ${{env.build_dir}}/spla_x64.dll


ubuntu:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- uses: seanmiddleditch/gha-setup-ninja@master

- name: Configure CMake
run: cmake . -G Ninja -B ${{ env.build_dir }} -DCMAKE_BUILD_TYPE=${{ env.config }}

- name: Build library sources
run: cmake --build ${{ env.build_dir }}

- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: linux-${{env.artifact}}
path: ${{env.build_dir}}/libspla_x64.so
path: ${{env.build-dir}}/spla_x64.dll

macos:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: true
fetch-depth: 0

- uses: seanmiddleditch/gha-setup-ninja@master

- name: Configure CMake x64
run: cmake . -G Ninja -B ${{ env.build_dir }} -DCMAKE_BUILD_TYPE=${{ env.config }} -DCMAKE_OSX_ARCHITECTURES=x86_64
run: cmake . -G Ninja -B ${{ env.build-dir }} -DCMAKE_BUILD_TYPE=${{ env.config }} -DCMAKE_OSX_ARCHITECTURES=x86_64

- name: Build library sources x64
run: cmake --build ${{ env.build_dir }}
run: cmake --build ${{ env.build-dir }}

- name: Configure CMake arm64
run: cmake . -G Ninja -B ${{ env.build_dir }} -DCMAKE_BUILD_TYPE=${{ env.config }} -DCMAKE_OSX_ARCHITECTURES=arm64
run: |
cmake . -G Ninja \
-B ${{ env.build-dir }} \
-DCMAKE_BUILD_TYPE=${{ env.config }} \
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DSPLA_BUILD_OPENCL=OFF
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}

- name: Build library sources arm64
run: cmake --build ${{ env.build_dir }}
run: cmake --build ${{ env.build-dir }} --verbose -j ${{ env.nt }}

- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: macos-${{env.artifact}}
path: |
${{env.build_dir}}/libspla_x64.dylib
${{env.build_dir}}/libspla_arm64.dylib
${{env.build-dir}}/libspla_x64.dylib
${{env.build-dir}}/libspla_arm64.dylib
7 changes: 4 additions & 3 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ jobs:
- 'tests'
- 'examples'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v5

- name: Run clang-format style check
uses: jidicula/clang-format-action@v4.10.1
uses: jidicula/clang-format-action@v4.15.0
with:
clang-format-version: '15'
clang-format-version: '20'
check-path: ${{ matrix.path }}
8 changes: 3 additions & 5 deletions .github/workflows/deploy-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Python Package (Test)

on:
workflow_run:
workflows: [ "Build" ]
workflows: [ Build ]
branches: [ "pre-release" ]
types:
- completed
Expand All @@ -14,10 +14,8 @@ jobs:
if: ${{ github.event.workflow_run.conclusion == 'success' }}

steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v6
with:
python-version: '3.8'

Expand All @@ -27,7 +25,7 @@ jobs:
pip install setuptools wheel twine

- name: Download artifact
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v5
with:
workflow: build.yml
workflow_conclusion: success
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ jobs:
if: ${{ github.event.workflow_run.conclusion == 'success' }}

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

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v6
with:
python-version: '3.8'
python-version: '3.12.5'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine

- name: Download artifact
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v5
with:
workflow: build.yml
workflow_conclusion: success
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docs-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
runs-on: ubuntu-latest

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

- name: Generate documentation
uses: mattnotmitt/doxygen-action@v1.3.1
uses: mattnotmitt/doxygen-action@v1.12.0

- name: Publish to Github Pages
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./html/
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docs-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.8 ]
python-version: [ 3.12.5 ]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v5

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -32,8 +32,8 @@ jobs:
SPLA_DOCS: true

- name: Publish to Github Pages
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./pydocs/
destination_dir: docs-python
destination_dir: docs-python
102 changes: 102 additions & 0 deletions .github/workflows/self-hosted.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Self-Hosted

on:
push:
branches:
- main
- release
- pre-release
paths:
- '.github/**'
- 'deps/**'
- 'include/**'
- 'src/**'
- 'tests/**'
- 'examples/**'
- 'python/**'
- '.gitignore'
- '.gitmodules'
- 'CMakeLists.txt'
pull_request:
branches: [ main, pocl-support ]

env:
build-dir: "build"

jobs:
build:
name: Build ${{ matrix.os }}
runs-on: self-hosted
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
env:
config: "Release"
nt: "4"

steps:
- uses: actions/checkout@v5
with:
submodules: true
fetch-depth: 0

- name: Configure CMake
run: |
cmake . -G Ninja \
-B ${{ env.build-dir }} \
-DCMAKE_BUILD_TYPE=${{ env.config }} \
-DSPLA_BUILD_TESTS=ON

- name: Build library sources
run: |
cmake --build ${{ env.build-dir }} \
--target all \
--verbose \
-j ${{ env.nt }}

test:
name: Test GPU ${{ matrix.gpu }}
needs: build
runs-on: self-hosted
strategy:
fail-fast: false
matrix:
include:
- gpu: Intel-Core-i7-4790
platform: 0
device: 0

env:
test-file: ${{ matrix.gpu }}_tests.log

steps:
- name: Run tests
run: |
python3 ./run_tests.py --build-dir=${{ env.build-dir }} \
--platform=${{ matrix.platform }} \
--device=${{ matrix.device }} \
| tee ${{ env.test-file }}

- name: Upload tests resutls
uses: actions/upload-artifact@v4
with:
name: ${{ env.test-file }}
path: ${{ env.test-file }}

- name: Check for tests results
run: |
! grep -qi "FAILED" ${{ env.test-file }}

clean:
name: Cleanup workspace
needs: test
if: always()
runs-on: self-hosted

steps:
- name: Cleanup workspace
run: |
rm -rf ${{ github.workspace }}/*
rm -rf ${{ github.workspace }}/.*
Loading