Skip to content

Commit 745545c

Browse files
committed
Fix Windows build
1 parent 3698ef5 commit 745545c

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ jobs:
3636
- name: Make build directory
3737
run: mkdir build
3838

39+
- name: Micromamba shell hook
40+
if: matrix.os == 'windows-latest'
41+
shell: powershell
42+
run: |
43+
micromamba shell hook -s cmd.exe -p C:\Users\runneradmin\micromamba-root
44+
3945
- name: Unix, install
4046
if: matrix.os != 'windows-latest'
4147
run: |
@@ -46,9 +52,9 @@ jobs:
4652

4753
- name: Windows, install
4854
if: matrix.os == 'windows-latest'
49-
shell: cmd /C call {0}
55+
shell: cmd
5056
run: |
51-
micromamba activate pybind11_json
57+
call C:\Users\runneradmin\micromamba-root\condabin\micromamba.bat activate pybind11_json
5258
cmake -G "NMake Makefiles" -D CMAKE_INSTALL_PREFIX="%CONDA_PREFIX%\Library" -D DOWNLOAD_GTEST=ON -D PYTHON_EXECUTABLE=%CONDA_PREFIX%/python.exe -Dgtest_force_shared_crt=ON -DCMAKE_CXX_FLAGS=/D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING ..
5359
nmake install
5460
working-directory: build
@@ -62,8 +68,8 @@ jobs:
6268

6369
- name: Windows, Run tests
6470
if: matrix.os == 'windows-latest'
65-
shell: cmd /C call {0}
71+
shell: cmd
6672
run: |
67-
micromamba activate pybind11_json
73+
call C:\Users\runneradmin\micromamba-root\condabin\micromamba.bat activate pybind11_json
6874
./test/test_pybind11_json
6975
working-directory: build

0 commit comments

Comments
 (0)