Skip to content

Add nix

Add nix #120

Workflow file for this run

name: build
on:
pull_request:
branches: [ "*" ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-15, ubuntu-24.04-arm, macos-15-intel, windows-2022 ]
build_type: [Release]
staticcompile: [ON, OFF]
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Installing Numpy
run: |
pip install pip --upgrade
pip install numpy lit
- uses: actions/checkout@v4
with:
path: project
submodules: 'true'
- name: Build project
run: |
cd project
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DENABLE_TESTING=OFF -DSTATICCOMPILE=${{ matrix.staticcompile }} -S ..
cmake --build . --config ${{matrix.build_type}} -v
- name: Test
run: ctest -C ${{ matrix.build_type }}
- name: Upload Artifact - Linux x86_64
if: contains(matrix.os, 'ubuntu') && matrix.staticcompile == 'ON' && !contains(matrix.os, 'arm')
uses: actions/upload-artifact@v4
with:
name: cmsgen-linux-amd64
path: |
project/build/cmsgen
project/build/lib/*
project/build/include/*
- name: Upload Artifact - Linux Arm64
if: contains(matrix.os, 'ubuntu') && matrix.staticcompile == 'ON' && contains(matrix.os, 'arm')
uses: actions/upload-artifact@v4
with:
name: cmsgen-linux-arm64
path: |
project/build/cmsgen
project/build/lib/*
project/build/include/*
- name: Upload Artifact - Mac Arm64
if: contains(matrix.os, 'macos') && matrix.staticcompile == 'ON' && matrix.os == 'macos-15'
uses: actions/upload-artifact@v4
with:
name: cmsgen-mac-arm64
path: |
project/build/cmsgen
project/build/lib/*
project/build/include/*
- name: Upload Artifact - Mac x86_64
if: contains(matrix.os, 'macos') && matrix.staticcompile == 'ON' && matrix.os == 'macos-15-intel'
uses: actions/upload-artifact@v4
with:
name: cmsgen-mac-x86_64
path: |
project/build/cmsgen
project/build/lib/*
project/build/include/*
- name: Upload Artifact - Windows
if: matrix.os == 'windows-2022' && matrix.staticcompile == 'ON'
uses: actions/upload-artifact@v4
with:
name: cmsgen-win64.exe
path: |
project\build\Release\cmsgen.exe
project\build\Release\lib\*
project\build\Release\include\*