1212 steps :
1313 - name : Checkout repository
1414 uses : actions/checkout@v4
15- with :
16- lfs : true # enable lfs support
1715
1816 - name : Setup conda environment
1917 uses : conda-incubator/setup-miniconda@v2
@@ -25,17 +23,11 @@ jobs:
2523 run : |
2624 conda env create -f environment.yml
2725
28- # - name: Update/Restore conda environment cache
29- # uses: actions/cache@v2
30- # with:
31- # path: C:\Miniconda\envs\diff_check
32- # key: ${{ runner.os }}-conda-${{ hashFiles('environment.yml') }}
33- # restore-keys: |
34- # ${{ runner.os }}-conda-
35-
36- # - name: Activate diff_check conda environment
37- # run: |
38- # conda activate diff_check
26+ - name : Update/Restore conda environment cache
27+ uses : actions/cache@v2
28+ with :
29+ path : C:\Miniconda\envs\diff_check
30+ key : ${{ runner.os }}-conda-${{ hashFiles('environment.yml') }}
3931
4032 - name : Cmake Configure
4133 run : |
@@ -44,90 +36,82 @@ jobs:
4436 - name : CMake Build
4537 run : conda run --name diff_check --no-capture-output cmake --build build --config Release
4638
47-
48- # TODO: testing copying
49- - name : Copying the dlls for python tests and c++ tests
39+ # upload artifacts
40+ - name : Move dlls and pyd files to single directories
5041 run : |
51- echo "Copying dlls/pyds for sphinx docs"
52- copy ${{github.workspace}}/build/bin/Release/*.dll ${{github.workspace}}/doc
53- copy ${{github.workspace}}/build/Release/*.pyd ${{github.workspace}}/doc
42+ mkdir $env:GITHUB_WORKSPACE\artifacts
43+ Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\Release -Filter *.pyd -Recurse | Move-Item -Destination $env:GITHUB_WORKSPACE\artifacts_pyds
44+ Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\bin\Release -Filter *.dll -Recurse | Move-Item -Destination $env:GITHUB_WORKSPACE\artifacts_dlls
45+ shell : pwsh
46+ - name : Upload artifacts - dlls
47+ uses : actions/upload-artifact@v2
48+ with :
49+ name : __build_artifacts_dlls__
50+ path : ${{ github.workspace }}/artifacts_dlls/*
51+ - name : Upload artifacts - pyds
52+ uses : actions/upload-artifact@v2
53+ with :
54+ name : __build_artifacts_pyds__
55+ path : ${{ github.workspace }}/artifacts_pyds/*
5456
55- echo "Copying dlls/pyds for python diffCheck package"
56- copy ${{github.workspace}}/build/bin/Release/*.dll ${{github.workspace}}/src/gh/diffCheck/diffCheck/dlls
57- copy ${{github.workspace}}/build/Release/*.pyd ${{github.workspace}}/src/gh/diffCheck/diffCheck
5857
59- - name : Sphinx build
60- run : |
61- conda run --name diff_check --no-capture-output sphinx-build doc _build
58+ build-docs :
59+ runs-on : windows-latest
60+ needs : build-source
61+
62+ steps :
63+ - name : Checkout repository
64+ uses : actions/checkout@v4
65+
66+ - name : Setup conda environment
67+ uses : conda-incubator/setup-miniconda@v2
68+ with :
69+ auto-update-conda : true
70+ python-version : 3.9.1
6271
72+ - name : Restore conda environment cache
73+ uses : actions/cache@v2
74+ with :
75+ path : C:\Miniconda\envs\diff_check
76+ key : ${{ runner.os }}-conda-${{ hashFiles('environment.yml') }}
77+ restore-keys : |
78+ ${{ runner.os }}-conda-
6379
80+ - name : Activate diff_check conda environment
81+ run : |
82+ conda activate diff_check
6483
65- # # FIXME: uploading artifacts
66- # - name: Move dlls and pyd files to a single directory
67- # run: |
68- # mkdir $env:GITHUB_WORKSPACE\artifacts
69- # Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\Release -Filter *.pyd -Recurse | Move-Item -Destination $env:GITHUB_WORKSPACE\artifacts
70- # Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\bin\Release -Filter *.dll -Recurse | Move-Item -Destination $env:GITHUB_WORKSPACE\artifacts
71- # shell: pwsh
72- # - name: Store the dlls/pyd as artifacts
73- # uses: actions/upload-artifact@v2
74- # with:
75- # name: __build_artifacts__
76- # path: ${{ github.workspace }}/artifacts/*
84+ # download artifacts
85+ - name : Download dlls for doc folder
86+ uses : actions/download-artifact@v2
87+ with :
88+ name : __build_artifacts_dlls__
89+ path : ${{github.workspace}}/doc
90+ - name : Download pyds for doc folder
91+ uses : actions/download-artifact@v2
92+ with :
93+ name : __build_artifacts_pyds__
94+ path : ${{github.workspace}}/doc
95+ - name : Download dlls for diffCheck py package
96+ uses : actions/download-artifact@v2
97+ with :
98+ name : __build_artifacts_dlls__
99+ path : ${{github.workspace}}/src/gh/diffCheck/diffCheck/dlls
100+ - name : Download pyds for diffCheck py package
101+ uses : actions/download-artifact@v2
102+ with :
103+ name : __build_artifacts_pyds__
104+ path : ${{github.workspace}}/src/gh/diffCheck/diffCheck
77105
106+ - name : Sphinx build
107+ run : |
108+ conda run --name diff_check --no-capture-output sphinx-build -b html -v doc _build
78109
79- # build-docs:
80- # runs-on: windows-latest
81- # needs: build-source
82-
83- # steps:
84- # - name: Checkout repository
85- # uses: actions/checkout@v4
86- # with:
87- # lfs: true # enable lfs support
88-
89- # - name: Setup conda environment
90- # uses: conda-incubator/setup-miniconda@v2
91- # with:
92- # auto-update-conda: true
93- # python-version: 3.9.1
94-
95- # - name: Restore conda environment cache
96- # uses: actions/cache@v2
97- # with:
98- # path: C:\Miniconda\envs\diff_check
99- # key: ${{ runner.os }}-conda-${{ hashFiles('environment.yml') }}
100- # restore-keys: |
101- # ${{ runner.os }}-conda-
102-
103- # - name: Activate diff_check conda environment
104- # run: |
105- # conda activate diff_check
106-
107- # - name: Download dlls/pyd artifacts
108- # uses: actions/download-artifact@v2
109- # with:
110- # name: __build_artifacts__
111- # path: ${{github.workspace}}/doc
112-
113- # # TODO: debug
114- # - name: List all the files in doc/
115- # run: |
116- # ls doc
117-
118- # # TODO: testing import with test file test_pybind_dll_smoke.py to remove
119- # - name: tester test_pybind_dll_smoke.py with conda run
120- # run: |
121- # conda run -n diff_check python doc/test_pybind_dll_smoke.py
122- # working-directory: ${{github.workspace}}
123-
124- # # -
125-
126-
127- # - name: Sphinx build
128- # run: |
129- # conda run --name diff_check --no-capture-output sphinx-build doc _build
130- # working-directory: ${{github.workspace}}
110+ - name : Upload documentation
111+ uses : actions/upload-artifact@v2
112+ with :
113+ name : __build_sphx_docs__
114+ path : ${{ github.workspace }}/_build
131115
132116
133117
0 commit comments