Skip to content

Commit

Permalink
Migrated GHA to setup-micromamba
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanMabille committed Nov 28, 2023
1 parent 3fc567a commit 155afa4
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -86,6 +86,10 @@ jobs:
win:

runs-on: ${{ matrix.os }}
defaults:
run:
# micromamba activation
shell: cmd /C call {0}

strategy:
fail-fast: false
Expand All @@ -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 ^
Expand All @@ -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
Expand All @@ -135,9 +131,8 @@ jobs:
with:
timeout_minutes: 4
max_attempts: 4
shell: cmd
command: |
call C:\Users\runneradmin\micromamba-root\condabin\micromamba.bat activate xeus
micromamba activate xeus
set PATH=%CONDA_PREFIX%;%CONDA_PREFIX%\\Scripts;%CONDA_PREFIX%\\Library;%CONDA_PREFIX%\\Library\\bin;%PATH%
cd build
ctest --output-on-failure
Expand Down

0 comments on commit 155afa4

Please sign in to comment.