Skip to content

Issue 232: add windows macos and linux tests with pixi #600

Issue 232: add windows macos and linux tests with pixi

Issue 232: add windows macos and linux tests with pixi #600

Workflow file for this run

name: Test Package
on:
push:
pull_request:
schedule:
- cron: '30 0 23 * *'
jobs:
flake8_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install flake8
run: pip install flake8
- name: Run flake8
run: flake8 .
linux_tests:
runs-on: ubuntu-latest
container:
image: debian:trixie
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: install pixi
shell: bash
run: |
apt-get update
apt-get -qq -y dist-upgrade
apt-get -qq update && apt-get install -qq -y flake8 python3 curl bash
curl -fsSL https://pixi.sh/install.sh | sh
export PATH=/github/home/.pixi/bin:$PATH
pixi shell-hook > .sh.sh
source .sh.sh
pixi add rattler-build compilers
- name: build pninexus
shell: bash
run: |
source .sh.sh
pixi run rattler-build build --recipe .github/workflows/pixi/recipe.yaml
macos-15_tests:
runs-on: macos-15
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: install pixi
shell: bash
run: |
curl -fsSL https://pixi.sh/install.sh | sh
export PATH=/Users/runner/.pixi/bin:$PATH
pixi shell-hook > .sh.sh
source .sh.sh
pixi add rattler-build
- name: build pninexus
shell: bash
run: |
source .sh.sh
pixi run rattler-build build --recipe .github/workflows/pixi/recipe.yaml
windows-2025_tests:
runs-on: windows-2025
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.62.2
cache: false
- name: build pninexus
run: |
pixi add rattler-build compilers libboost-headers=1.88.0 h5cpp libpninexus libboost=1.88.0 libboost-python=1.88.0 hdf5=1.14.6
pixi run rattler-build build --recipe .github/workflows/pixi/recipe.yaml
deb_tests:
runs-on: ubuntu-latest
strategy:
matrix:
os: [debian13, debian12, debian11, ubuntu25.10, ubuntu24.04, ubuntu22.04]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Build the docker
env:
OS: ${{ matrix.os }}
run: docker build -t ndts .ci/${OS}_py3
- name: Run the docker
run: docker run --name ndts -d -it -v `pwd`:/home/tango ndts
- name: install python-pninexus
run: .ci/install.sh 3
- name: run tests
run: .ci/run.sh 3
- name: Append documentation for the latest release version
if: github.ref == 'refs/heads/develop' && matrix.os == 'debian13'
run: |
docker exec ndts /bin/bash -c "cp doc/index.html doc/_config.yml build"
docker exec ndts /bin/bash -c "git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'"
docker exec ndts /bin/bash -c "git fetch && git checkout gh-pages && git pull"
docker exec ndts /bin/bash -c "mkdir -p ./latest && shopt -u dotglob && rm -rf ./latest/*"
docker exec ndts /bin/bash -c "mv -f build/sphinx/html/* ./latest/"
docker exec ndts /bin/bash -c "mv -f build/index.html build/_config.yml ."
# docker exec ndts /bin/bash -c "mv -f build/devel ./latest/api/doxygen"
docker exec ndts /bin/bash -c "rm -rf ./latest/_sources"
docker exec --user root ndts /bin/bash -c "rm -rf build build_tools *.h5 src test"
- name: Extract the code version from the branch name
if: startsWith(github.ref, 'refs/heads/docs_') && matrix.os == 'debian13'
shell: bash
run: echo "##[set-output name=docver;]$(echo ${GITHUB_REF#refs/heads/docs_})"
id: extract_docver
- name: Append documentation for the extracted release version
if: startsWith(github.ref, 'refs/heads/docs_') && matrix.os == 'debian13'
run: |
echo Version: ${{ steps.extract_docver.outputs.docver }}
docker exec ndts /bin/bash -c "git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'"
docker exec ndts /bin/bash -c "git fetch && git checkout gh-pages && git pull"
docker exec ndts /bin/bash -c "mkdir -p ./${{ steps.extract_docver.outputs.docver }}"
docker exec ndts /bin/bash -c "shopt -u dotglob && rm -rf ./${{ steps.extract_docver.outputs.docver }}/* "
docker exec ndts /bin/bash -c "mv -f build/sphinx/html/* ./${{ steps.extract_docver.outputs.docver }}/"
# docker exec ndts /bin/bash -c "mv -f build/devel ./${{ steps.extract_docver.outputs.docver }}/api/doxygen"
docker exec ndts /bin/bash -c "rm -rf ./${{ steps.extract_docver.outputs.docver }}/_sources"
docker exec --user root ndts /bin/bash -c "rm -rf build build_tools *.h5 src test"
- name: Deploy documentation
if: (github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/docs_')) && matrix.os == 'debian13'
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: gh-pages
FOLDER: .
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MESSAGE: "Build: ({sha}) {msg}"
- name: Stop the docker
run: |
docker exec --user root ndts /bin/bash -c "chown -R 1001 /home/tango "
docker container stop ndts