From 3d334af0a211143ee19bc6abd046a8cd24ec29dd Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Tue, 28 Nov 2023 10:04:01 +0100 Subject: [PATCH] Migrated GHA to setup-micromamba --- .github/workflows/main.yml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d63fd74e..93f4a8f1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,7 +37,7 @@ jobs: uses: SimenB/github-actions-cpu-cores@v1 - name: install mamba - uses: mamba-org/provision-with-micromamba@main + uses: mamba-org/setup-micromamba@v1 with: environment-file: environment-dev.yml environment-name: xeus @@ -86,6 +86,10 @@ jobs: win: runs-on: ${{ matrix.os }} + defaults: + run: + # micromamba activation + shell: cmd /C call {0} strategy: fail-fast: false @@ -96,23 +100,17 @@ jobs: - uses: actions/checkout@v4 - name: install mamba - uses: mamba-org/provision-with-micromamba@main + uses: mamba-org/setup-micromamba@v1 with: environment-file: environment-dev.yml environment-name: xeus - - - name: micromamba shell hook - shell: powershell - run: | - micromamba shell hook -s cmd.exe -p C:\Users\runneradmin\micromamba-root + init-shell: cmd.exe - name: Make build directory run: mkdir build - name: cmake configure - shell: cmd run: | - call C:\Users\runneradmin\micromamba-root\condabin\micromamba.bat activate xeus cmake .. ^ -G Ninja ^ -DCMAKE_BUILD_TYPE=Release ^ @@ -123,9 +121,7 @@ jobs: working-directory: build - name: build - shell: cmd run: | - call C:\Users\runneradmin\micromamba-root\condabin\micromamba.bat activate xeus set CL=/MP ninja install working-directory: build @@ -135,9 +131,7 @@ jobs: with: timeout_minutes: 4 max_attempts: 4 - shell: cmd command: | - call C:\Users\runneradmin\micromamba-root\condabin\micromamba.bat activate xeus set PATH=%CONDA_PREFIX%;%CONDA_PREFIX%\\Scripts;%CONDA_PREFIX%\\Library;%CONDA_PREFIX%\\Library\\bin;%PATH% cd build ctest --output-on-failure