-
Notifications
You must be signed in to change notification settings - Fork 2
104 lines (99 loc) · 3.26 KB
/
build.yml
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
name: make build
on:
push:
branches:
- main
jobs:
build_python_3_10:
runs-on: ubuntu-latest
steps:
# check out the github repository
- uses: actions/[email protected]
# set up python
- name: set up python "3.10"
uses: actions/[email protected]
with:
python-version: "3.10"
# execute the actual make build process
- name: execute the make build
run: make
# remove moptipy
- name: purge local moptipy installation
run: |
pip uninstall -y moptipy
# attempt to install it again from github
- name: install moptipy from github
run: |
pip install git+https://github.com/thomasWeise/moptipy.git
python -c "import moptipy"
build_python_3_11:
needs: build_python_3_10
runs-on: ubuntu-latest
steps:
# check out the github repository
- uses: actions/[email protected]
# set up python
- name: set up python "3.11"
uses: actions/[email protected]
with:
python-version: "3.11"
# clean-up
- name: clean up
run: |
rm -rf /home/runner/work/moptipy/moptipy/docs/build/
rm -rf /home/runner/work/moptipy/moptipy/dist
rm -rf /home/runner/work/moptipy/moptipy/build
# execute the actual make build process
- name: execute the make build
run: make
# remove moptipy
- name: purge local moptipy installation
run: |
pip uninstall -y moptipy
# attempt to install it again from github
- name: install moptipy from github
run: |
pip install git+https://github.com/thomasWeise/moptipy.git
python -c "import moptipy"
build_python_3_12:
needs: build_python_3_11
runs-on: ubuntu-latest
steps:
# check out the github repository
- uses: actions/[email protected]
# set up python
- name: set up python "3.12"
uses: actions/[email protected]
with:
python-version: "3.12"
# clean-up
- name: clean up
run: |
rm -rf /home/runner/work/moptipy/moptipy/docs/build/
rm -rf /home/runner/work/moptipy/moptipy/dist
rm -rf /home/runner/work/moptipy/moptipy/build
# execute the actual make build process
- name: execute the make build
run: make
# remove moptipy
- name: purge local moptipy installation
run: |
pip uninstall -y moptipy
# attempt to install it again from github
- name: install moptipy from github
run: |
pip install git+https://github.com/thomasWeise/moptipy.git
python -c "import moptipy"
# fix urls in documentation
- name: fix documentation urls
run: |
find /home/runner/work/moptipy/moptipy/docs/build/ \( -type d -name .git -prune \) -o -type f -name "*.html" -print0 | xargs -0 sed -i 's/ href=\"_static\// href=\"\/moptipy\/_static\//g'
find /home/runner/work/moptipy/moptipy/docs/build/ \( -type d -name .git -prune \) -o -type f -name "*.html" -print0 | xargs -0 sed -i 's/ src=\"_static\// src=\"\/moptipy\/_static\//g'
touch /home/runner/work/moptipy/moptipy/docs/build/.nojekyll
# deploy to github pages
- name: deploy documentation
uses: JamesIves/github-pages-deploy-action@65b5dfd4f5bcd3a7403bbc2959c144256167464e
with:
branch: gh-pages
folder: /home/runner/work/moptipy/moptipy/docs/build/
single-commit: true