Skip to content

Commit

Permalink
nix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Jun 28, 2024
1 parent 3df40ec commit e847622
Showing 1 changed file with 12 additions and 23 deletions.
35 changes: 12 additions & 23 deletions .github/workflows/macos-linux-pip.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,20 @@
name: Build ndcurves for Mac OS X/Linux via pip
name: "Nix CI"

on: [push, pull_request]

env:
CTEST_OUTPUT_ON_FAILURE: 1
CTEST_PARALLEL_LEVEL: 4
on: [pull_request, push]

jobs:
ndcurves-pip:
name: "CI on ${{ matrix.os }} / python ${{ matrix.python-version }} with pip"
runs-on: "${{ matrix.os }}"

tests:
name: "Nix build on ${{ matrix.os }}"
runs-on: "${{ matrix.os }}-latest"
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu]
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
with:
submodules: 'true'
- uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"
- run: python -m pip install -U pip
- run: python -m pip install pin[build]
- run: echo "CMAKE_PREFIX_PATH=$(python -m cmeel cmake)" >> $GITHUB_ENV
- run: echo "LD_LIBRARY_PATH=$(python -m cmeel lib)" >> $GITHUB_ENV
- run: cmake -B build -S .
- run: cmake --build build
- run: cmake --build build -t test
extra-conf: |
trusted-substituters = https://gepetto.cachix.org
trusted-public-keys = gepetto.cachix.org-1:toswMl31VewC0jGkN6+gOelO2Yom0SOHzPwJMY2XiDY=
- uses: DeterminateSystems/magic-nix-cache-action@main
- run: nix build --accept-flake-config

0 comments on commit e847622

Please sign in to comment.