Context: not a singleton #81
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- 'docs/**' | |
- '**.md' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
libmamba_tests_win: | |
name: libmamba tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-2019] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Create build environment | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: ./libmamba/environment-dev.yml | |
environment-name: build_env | |
cache-environment: true | |
init-shell: bash cmd.exe | |
- uses: hendrikmuhs/ccache-action@main | |
with: | |
variant: sccache | |
key: ${{ github.job }}-${{ matrix.os }} | |
restore-keys: | | |
libmamba-${{ matrix.os }} | |
- name: Build libmamba | |
shell: cmd /C call {0} | |
run: | | |
cmake -B build/ ^ | |
-G Ninja ^ | |
-D CMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^ | |
-D CMAKE_BUILD_TYPE="Release" ^ | |
-D BUILD_LIBMAMBA_TESTS=ON ^ | |
-D BUILD_LIBMAMBA=ON ^ | |
-D BUILD_SHARED=ON ^ | |
-D CMAKE_CXX_COMPILER_LAUNCHER=sccache ^ | |
-D CMAKE_C_COMPILER_LAUNCHER=sccache | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
cmake --build build/ --parallel --target test_libmamba testing_libmamba_lock | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
- name: Run libmamba tests | |
shell: cmd /C call {0} | |
run: | | |
cd build | |
ninja install | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
@REM Interferes with tests | |
set CONDARC= | |
ninja test | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
- name: Show build cache statistics | |
run: sccache --show-stats | |
mamba_python_tests_win: | |
name: Mamba tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-2019] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: create build environment | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: ./mamba/environment-dev.yml | |
environment-name: build_env | |
cache-environment: true | |
init-shell: bash cmd.exe | |
create-args: >- | |
conda-build | |
curl | |
- uses: hendrikmuhs/ccache-action@main | |
with: | |
variant: sccache | |
key: ${{ github.job }}-${{ matrix.os }} | |
restore-keys: | | |
libmamba-${{ matrix.os }} | |
- name: run conda init | |
shell: bash -l {0} | |
run: conda init | |
- name: Build libmambapy | |
shell: cmd /C call {0} | |
run: | | |
cmake -B build/ ^ | |
-G Ninja ^ | |
-D CMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^ | |
-D CMAKE_BUILD_TYPE="Release" ^ | |
-D BUILD_LIBMAMBAPY=ON ^ | |
-D BUILD_LIBMAMBA=ON ^ | |
-D BUILD_SHARED=ON ^ | |
-D BUILD_MAMBA_PACKAGE=ON ^ | |
-D CMAKE_CXX_COMPILER_LAUNCHER=sccache ^ | |
-D CMAKE_C_COMPILER_LAUNCHER=sccache | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
cmake --build build/ --parallel | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
cmake --install build/ | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
- name: Install libmambapy | |
shell: cmd /C call {0} | |
run: | | |
pip install -e .\libmambapy\ --no-deps | |
- name: Show build cache statistics | |
run: sccache --show-stats | |
- name: install mamba | |
shell: bash -l {0} | |
run: | | |
python --version | |
pip install ./mamba[test] --no-deps | |
- name: Run mamba tests suite | |
shell: bash -l {0} | |
run: pytest -v --capture=tee-sys mamba/tests | |
- name: Run create command | |
shell: bash -l {0} | |
run: mamba create -n test_env xtensor -c conda-forge -y | |
- name: Run env create command | |
shell: bash -l {0} | |
run: mamba env create -f mamba/tests/test_env.yml | |
- name: Run env update command | |
shell: bash -l {0} | |
run: mamba env update -f mamba/tests/update_env.yml | |
- name: Run local channel checks | |
shell: bash -l {0} | |
run: | | |
mkdir -p $CONDA_PREFIX/conda-bld/win-64 | |
echo $PATH | |
micromamba list | |
micromamba info | |
curl --version | |
curl https://anaconda.org/conda-forge/xtensor/0.21.7/download/win-64/xtensor-0.21.7-h7ef1ec2_0.tar.bz2 -L -o $CONDA_PREFIX/conda-bld/win-64/xtensor-0.21.7-h7ef1ec2_0.tar.bz2 | |
curl https://anaconda.org/conda-forge/xtl/0.6.21/download/win-64/xtl-0.6.21-h5362a0b_0.tar.bz2 -L -o $CONDA_PREFIX/conda-bld/win-64/xtl-0.6.21-h5362a0b_0.tar.bz2 | |
conda index $CONDA_PREFIX/conda-bld | |
mamba create -n l_o_cal_test xtensor -c local -c conda-forge -y | |
conda list -n l_o_cal_test | |
# cut first couple of lines to remove prefix path | |
conda list -n l_o_cal_test | tail -n +3 > list.txt | |
if [ "$(grep -c "local" list.txt)" -ne 2 ]; then | |
exit 1 | |
fi | |
umamba_build_win: | |
name: Build micromamba | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-2019] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: create build environment | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: ./micromamba/environment-dev.yml | |
environment-name: build_env | |
cache-environment: true | |
init-shell: bash cmd.exe | |
- uses: hendrikmuhs/ccache-action@main | |
with: | |
variant: sccache | |
key: ${{ github.job }}-${{ matrix.os }} | |
restore-keys: | | |
libmamba-${{ matrix.os }} | |
- name: build micromamba | |
shell: cmd /C call {0} | |
run: | | |
cmake -B build/ ^ | |
-G Ninja ^ | |
-D CMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library ^ | |
-D BUILD_MICROMAMBA=ON ^ | |
-D BUILD_LIBMAMBA=ON ^ | |
-D BUILD_SHARED=ON ^ | |
-D CMAKE_CXX_COMPILER_LAUNCHER=sccache ^ | |
-D CMAKE_C_COMPILER_LAUNCHER=sccache | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
cmake --build build/ --parallel | |
if %errorlevel% neq 0 exit /b %errorlevel% | |
cmake --install build/ | |
- name: check that micromamba runs | |
shell: cmd /C call {0} | |
run: .\build\micromamba\micromamba.exe --help | |
- name: build cache statistics | |
run: sccache --show-stats | |
- name: tar micromamba artifact | |
shell: cmd /C call {0} | |
run: | | |
cp build/libmamba/libmamba.dll build/micromamba/ | |
tar -cvf umamba.tar build/micromamba/micromamba.exe build/micromamba/libmamba.dll | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: _internal_micromamba_binary | |
path: umamba.tar | |
umamba_integration_tests_win: | |
name: Micromamba integration tests with PWSH | |
needs: [umamba_build_win] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-2019] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: _internal_micromamba_binary | |
- name: untar micromamba artifact | |
shell: bash -l -eo pipefail {0} | |
run: | | |
tar -xvf umamba.tar | |
- name: create build environment | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: ./micromamba/environment-dev.yml | |
environment-name: build_env | |
create-args: menuinst | |
init-shell: bash cmd.exe powershell | |
- name: micromamba python based tests with pwsh | |
shell: pwsh | |
run: | | |
$env:PYTHONIOENCODING='UTF-8' | |
$env:MAMBA_ROOT_PREFIX = Join-Path -Path $pwd -ChildPath 'mambaroot' | |
$env:TEST_MAMBA_EXE = Join-Path -Path $pwd -ChildPath 'build\micromamba\micromamba.exe' | |
$env:MAMBA_TEST_SHELL_TYPE='powershell' | |
Remove-Item -Path "env:CONDARC" | |
pytest -v --capture=tee-sys micromamba/tests/ |