8
8
branches :
9
9
- master
10
10
11
+ defaults :
12
+ run :
13
+ shell : bash -l {0}
14
+
11
15
jobs :
12
16
run :
13
17
runs-on : ${{ matrix.os }}
@@ -21,36 +25,61 @@ jobs:
21
25
steps :
22
26
- uses : actions/checkout@v1
23
27
24
- - name : Setup conda
25
- uses : s-weigand/setup-conda@v1
28
+ - name : Install mamba
29
+ uses : mamba-org/provision-with-micromamba@main
26
30
with :
27
- update-conda : true
28
- conda-channels : conda-forge
31
+ environment-file : dev-environment.yml
32
+ environment-name : pybind11_json
33
+ micromamba-version : " 0.22.0"
34
+ extra-specs : python=${{ matrix.python-version }}*=*_cpython
35
+
36
+ - name : Make build directory
37
+ run : mkdir build
29
38
30
- - name : Conda install dependencies
31
- run : conda install python=${{ matrix.python-version }}*=*_cpython cmake=3.17 nlohmann_json pybind11
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
32
44
33
45
- name : Unix, install
34
46
if : matrix.os != 'windows-latest'
35
47
run : |
36
- mkdir build
37
- cd build
38
- $CONDA/bin/cmake -D CMAKE_INSTALL_PREFIX=$CONDA -D DOWNLOAD_GTEST=ON -D PYTHON_EXECUTABLE=$CONDA/bin/python -D CMAKE_INSTALL_LIBDIR=lib ..
39
- make install -j2
48
+ micromamba activate pybind11_json
49
+ cmake .. \
50
+ -D CMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
51
+ -D DOWNLOAD_GTEST=ON \
52
+ -D PYTHON_EXECUTABLE=`which python` \
53
+ -D CMAKE_INSTALL_LIBDIR=lib
54
+ make install -j2
55
+ working-directory : build
40
56
41
57
- name : Windows, install
42
58
if : matrix.os == 'windows-latest'
43
59
shell : cmd
44
60
run : |
45
- call "c:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
46
- mkdir build
47
- cd build
48
- %CONDA%/Library/bin/cmake -G "NMake Makefiles" -D CMAKE_INSTALL_PREFIX=%CONDA% -D DOWNLOAD_GTEST=ON -D PYTHON_EXECUTABLE=%CONDA%/python.exe -Dgtest_force_shared_crt=ON -DCMAKE_CXX_FLAGS=/D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING ..
49
- nmake install
50
-
51
- - name : Run tests
52
- shell : bash
61
+ call C:\Users\runneradmin\micromamba-root\condabin\micromamba.bat activate pybind11_json
62
+ cmake .. ^
63
+ -G "NMake Makefiles" ^
64
+ -D CMAKE_INSTALL_PREFIX="%CONDA_PREFIX%\Library" ^
65
+ -D DOWNLOAD_GTEST=ON ^
66
+ -D gtest_force_shared_crt=ON ^
67
+ -D CMAKE_CXX_FLAGS=/D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING
68
+ nmake install
69
+ working-directory : build
70
+
71
+ - name : Unix, Run tests
72
+ if : matrix.os != 'windows-latest'
73
+ run : |
74
+ micromamba activate pybind11_json
75
+ ./test_pybind11_json
76
+ working-directory : build/test
77
+
78
+ - name : Windows, Run tests
79
+ if : matrix.os == 'windows-latest'
80
+ shell : cmd
53
81
run : |
54
- export PYTHONHOME=$CONDA
55
- cd build
56
- ./test/test_pybind11_json
82
+ call C:\Users\runneradmin\micromamba-root\condabin\micromamba.bat activate pybind11_json
83
+ set PYTHONHOME=%CONDA_PREFIX%
84
+ test_pybind11_json
85
+ working-directory : build/test
0 commit comments