Skip to content

Configure CI on self-hosted runner #686

Configure CI on self-hosted runner

Configure CI on self-hosted runner #686

Workflow file for this run

name: Build
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"
config: "Release"
artifact: "native"
nt: "4"
jobs:
windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v5
with:
submodules: true
fetch-depth: 0
- uses: seanmiddleditch/gha-setup-ninja@master
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
- name: Configure CMake
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 }} --verbose -j ${{ env.nt }}
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: windows-${{env.artifact}}
path: ${{env.build-dir}}/spla_x64.dll
macos:
runs-on: macos-14
steps:
- 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
- name: Build library sources x64
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 \
-DSPLA_BUILD_OPENCL=OFF
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
- name: Build library sources arm64
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