Skip to content

Commit

Permalink
Refactor CI and libamambapy tests (on Win) (#2955)
Browse files Browse the repository at this point in the history
* TMP disable Unix tests

* Try refactor win CI

* Add libmambapy tests

* Run Windows libamamba tests via CMake

* Add Windows menuinst dependency

* Fix typo

* Debug libmambapy tests Win

* Add micromamba tests windows

* Call test_libmamba from different paths

* Merge workflow launchers

* Fix libmamba tests win

* Fxi

* Fix workspace key

* DEbug win

* Implement local channel tests as part of the intergration tests

* Try Win libmamba tests bash

* Cleanup

* Restore Unix tests

* Make test local channel noarch

* Fix workspace action number

* No error on test cleanup in CI

* Reduce number of threads to conda-index

* Disable local channel tests on Windows
  • Loading branch information
AntoinePrv authored Nov 3, 2023
1 parent fdf2b65 commit 8683078
Show file tree
Hide file tree
Showing 9 changed files with 242 additions and 214 deletions.
2 changes: 1 addition & 1 deletion .github/actions/workspace/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ inputs:
default: workspace
key_base:
required: true
default: ${{ github.workflow }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}-${{ github.sha }}
default: ${{ github.workflow }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.sha }}
key_suffix:
default: ''
token:
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/unix.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unix tests
name: Tests

on:
push:
Expand Down Expand Up @@ -27,3 +27,15 @@ jobs:
with:
os: ${{ matrix.os }}
build_type: ${{ matrix.build_type }}

win_tests:
name: Windows tests
strategy:
matrix:
os: [windows-2019]
build_type: [release]
fail-fast: true
uses: ./.github/workflows/windows_impl.yml
with:
os: ${{ matrix.os }}
build_type: ${{ matrix.build_type }}
25 changes: 2 additions & 23 deletions .github/workflows/unix_impl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ jobs:
- name: Run libmamba tests
run: |
unset CONDARC # Interferes with tests
cd build/libmamba/tests/ && ./test_libmamba
./build/libmamba/tests/test_libmamba
libmambay_tests_unix:
libmambapy_tests_unix:
name: Test libmamba Python bindings
needs: ["build_shared_unix"]
runs-on: ${{ inputs.os }}
Expand Down Expand Up @@ -135,24 +135,3 @@ jobs:
export TEST_MAMBA_EXE=$(pwd)/build/micromamba/micromamba
unset CONDARC # Interferes with tests
pytest -v --capture=tee-sys micromamba/tests/
- name: micromamba local channel test
run: |
unset CONDARC # Interferes with tests
export TEST_MAMBA_EXE=$(pwd)/build/micromamba/micromamba
if [ "$RUNNER_OS" == "Linux" ]; then
mkdir -p $MAMBA_ROOT_PREFIX/conda-bld/linux-64
wget -P $MAMBA_ROOT_PREFIX/conda-bld/linux-64 https://anaconda.org/conda-forge/xtensor/0.21.8/download/linux-64/xtensor-0.21.8-hc9558a2_0.tar.bz2
wget -P $MAMBA_ROOT_PREFIX/conda-bld/linux-64 https://anaconda.org/conda-forge/xtl/0.6.21/download/linux-64/xtl-0.6.21-h0efe328_0.tar.bz2
else
mkdir -p $MAMBA_ROOT_PREFIX/conda-bld/osx-64
wget -P $MAMBA_ROOT_PREFIX/conda-bld/osx-64 https://anaconda.org/conda-forge/xtensor/0.21.8/download/osx-64/xtensor-0.21.8-h879752b_0.tar.bz2
wget -P $MAMBA_ROOT_PREFIX/conda-bld/osx-64 https://anaconda.org/conda-forge/xtl/0.6.21/download/osx-64/xtl-0.6.21-h6516342_0.tar.bz2
fi
conda index $MAMBA_ROOT_PREFIX/conda-bld
"${TEST_MAMBA_EXE}" create -n l_o_cal_test xtensor -c local -c conda-forge -y
"${TEST_MAMBA_EXE}" list -n l_o_cal_test
"${TEST_MAMBA_EXE}" list -n l_o_cal_test | tail -n +3 > list.txt
if [ "$(grep -c "conda-bld" list.txt)" -ne 2 ]; then
exit 1
fi
177 changes: 0 additions & 177 deletions .github/workflows/windows.yml

This file was deleted.

Loading

0 comments on commit 8683078

Please sign in to comment.