From 85e416bbe25204528904a3b8c10048469924ad4d Mon Sep 17 00:00:00 2001 From: Christophe Troestler Date: Sun, 3 Mar 2024 13:07:01 +0100 Subject: [PATCH] Initialize to conda environment for CI --- .github/workflows/rust.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index ff1adb9..b4bd57c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -57,6 +57,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.12' + if: ${{ ! startsWith(matrix.build, 'Anaconda') }} - name: Install Matplotlib (pip) if: ${{ ! startsWith(matrix.build, 'Anaconda') }} run: pip install matplotlib @@ -67,6 +68,12 @@ jobs: run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }} shell: bash - run: rustup target add ${{ matrix.target }} - - run: cargo build --verbose - - run: cargo test tests --verbose + - run: cargo build -vv + - run: cargo test + if: ${{ ! startsWith(matrix.build, 'Anaconda') }} - run: cargo run --example a_simple_example + if: ${{ ! startsWith(matrix.build, 'Anaconda') }} + - name: Run example with Anaconda + run: | + eval "$($CONDA/bin/conda shell.bash activate)" + cargo run --example a_simple_example