55
66env :
77 PROJECT_ROOT : ${{ github.workspace }}
8+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 : true
89
910jobs :
1011 tests :
@@ -14,98 +15,70 @@ jobs:
1415 strategy :
1516 fail-fast : false
1617 matrix :
17- os : ["ubuntu-latest", "macos-latest", "windows-latest", "windows-2019" ]
18+ os : ["ubuntu-latest", "macos-latest", "windows-latest"]
1819 python-version : ["3.9", "3.10", "3.11"]
1920
20- exclude :
21- # Due to nbconvert TypeError
22- - os : windows-latest
23- python-version : " 3.7"
24- # Due to nbconvert TypeError
25- - os : windows-2019
26- python-version : " 3.7"
27-
2821 steps :
29- - uses : " actions/checkout@v3 "
30- - uses : " actions/setup-python@v4 "
22+ - uses : " actions/checkout@v4 "
23+ - uses : " actions/setup-python@v5 "
3124 with :
3225 python-version : " ${{ matrix.python-version }}"
3326 - name : " Install package dependencies"
3427 run : |
3528 python -VV
36- python -m site
3729 python -m pip install --upgrade pip setuptools wheel
38- python -m pip install --upgrade coverage[toml] virtualenv tox tox-gh-actions
39- python -m pip install -r requirements.txt
40- python -m pip install .
41- - name : " Run package tests for ${{ matrix.python-version }}, ${{ matrix.os }}"
42- run : " python -m pytest -vv -m 'not latex and not notebook'"
30+ python -m pip install -r requirements-py${{ matrix.python-version }}.txt
31+ python -m pip install --upgrade pytest nbformat flake8
32+ python -m pip install -e .
4333 - name : " Run notebook tests for ${{ matrix.python-version }} if ubuntu os"
4434 run : |
4535 echo "${{ matrix.os }}"
46- sudo apt-get install graphviz
4736 python -m pytest -vv -m notebook
4837 if : matrix.os == 'ubuntu-latest'
4938 - name : " Run notebook tests for ${{ matrix.python-version }} if mac os"
5039 run : |
5140 echo "${{ matrix.os }}"
52- brew install graphviz
5341 python -m pytest -vv -m notebook
5442 if : matrix.os == 'macos-latest'
5543 - name : " Run notebook tests for ${{ matrix.python-version }} if windows os"
5644 run : |
5745 echo "${{ matrix.os }}"
58- choco install graphviz
5946 python -m pytest -vv -m notebook
6047 if : matrix.os == 'windows-latest'
61- - name : " Run latex tests for ${{ matrix.python-version }} if ubuntu os"
62- run : |
63- echo "${{ matrix.os }}"
64- sudo apt-get install texlive-latex-extra
65- python -m pytest -vv -m latex
66- if : matrix.os == 'ubuntu-latest'
67-
6848 deliver :
6949 runs-on : ubuntu-latest
7050 needs : tests
7151 steps :
7252 - name : Checkout repository
73- uses : actions/checkout@v2
74- - uses : " actions/checkout@v2 "
75- - uses : " actions/setup-python@v2 "
53+ uses : actions/checkout@v4
54+ - name : Setup Python
55+ uses : actions/setup-python@v5
7656 with :
77- python-version : " ${{ matrix.python-version }} "
78- - name : " Install dependencies for latex and marp slide delivery "
57+ python-version : " 3.11 "
58+ - name : " Install Python dependencies "
7959 run : |
80- sudo apt-get install texlive-latex-extra
81- npm install -g @marp-team/marp-cli
8260 python -VV
83- python -m site
84- python -m pip install .
85-
61+ python -m pip install --upgrade pip setuptools wheel
62+ python -m pip install -r requirements-py3.11.txt
63+ python -m pip install -e .
64+ - name : " Install marp"
65+ run : npm install -g @marp-team/marp-cli
8666 - name : " Create slides"
8767 run : |
88- mkdir -p tex_out
89-
90- # python risk_learning/tex.py --filepath ${{ github.workspace }}/slides/intro/ai-risk-and-discrete-geometry.tex --outdir ${{ github.workspace }}/tex_out
91- marp --html 'slides/intro/intro' -o "${{ github.workspace }}/tex_out/intro.pdf"--allow-local-files
92- python risk_learning/tex.py --filepath ${{ github.workspace }}/slides/discrete-geometry/discrete-geometry.tex --outdir ${{ github.workspace }}/tex_out
93- python risk_learning/tex.py --filepath ${{ github.workspace }}/slides/correlation-causality/correlation-causality.tex --outdir ${{ github.workspace }}/tex_out
94- python risk_learning/tex.py --filepath ${{ github.workspace }}/slides/adversarial-regularization-regimes/adversarial.tex --outdir ${{ github.workspace }}/tex_out
95-
96- cd tex_out
97- ls -al
68+ mkdir -p slides_out
69+ marp --html 'slides/intro/intro.md' -o "${{ github.workspace }}/slides_out/intro.pdf" --allow-local-files
70+ marp --html 'slides/high-risk-ai/high-risk-ai.md' -o "${{ github.workspace }}/slides_out/high-risk-ai.pdf" --allow-local-files
71+ ls -al slides_out
9872 - name : " Archive slide artifacts"
99- uses : actions/upload-artifact@v3
73+ uses : actions/upload-artifact@v4
10074 with :
10175 name : risk-ai-slides
102- path : ${{ github.workspace }}/tex_out/*.pdf
103-
76+ path : ${{ github.workspace }}/slides_out/*.pdf
10477 - name : Release
10578 uses : softprops/action-gh-release@v1
10679 if : startsWith(github.ref, 'refs/tags/')
10780 env :
10881 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
10982 with :
11083 files : |
111- ${{ github.workspace }}/tex_out /*.pdf
84+ ${{ github.workspace }}/slides_out /*.pdf
0 commit comments