Skip to content

Configure CI on self-hosted runner #75

Configure CI on self-hosted runner

Configure CI on self-hosted runner #75

Workflow file for this run

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 ]
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: "Debug"
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: NVIDIA-GeForce-GT-1030
platform: 2
device: 0
- gpu: AMD-Radeon-RX-6750-XT
platform: 1
device: 0
- 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 -q "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 }}/.*