-
Notifications
You must be signed in to change notification settings - Fork 0
149 lines (131 loc) · 5.54 KB
/
tests.yml
File metadata and controls
149 lines (131 loc) · 5.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
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