From b9aadfde16af355ee826d6da23a8b95033cdce8f Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Mon, 5 Feb 2024 13:54:49 +0100 Subject: [PATCH 1/4] Update CI --- .github/workflows/main.yml | 65 ++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 38 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f2d4ec9..22c9a42 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,55 +29,50 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Get number of CPU cores - uses: SimenB/github-actions-cpu-cores@v1 + uses: SimenB/github-actions-cpu-cores@v2 - - name: install mamba - uses: mamba-org/provision-with-micromamba@main + - name: Install micromamba + uses: mamba-org/setup-micromamba@v1 with: environment-file: environment-dev.yml environment-name: xeus-zmq + init-shell: bash - - name: install cxx compiler + - name: Create build directory shell: bash -l {0} - run: | - $HOME/micromamba-bin/micromamba install cxx-compiler libuuid -c conda-forge -y + run: mkdir -p build - - name: cmake configure + - name: Configure cmake shell: bash -l {0} run: | - mkdir -p build - cd build cmake .. \ -DXEUS_ZMQ_BUILD_TESTS=ON \ -DCMAKE_PREFIX_PATH=$CONDA_PREFIX \ -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \ -DXEUS_STATIC_DEPENDENCIES=${{ matrix.xeus_static_dependencies }} \ -DXEUS_BUILD_SHARED_LIBS=${{ matrix.xeus_build_shared_lib }} + working-directory: build - - name: build + - name: Build shell: bash -l {0} - run: | - cd build - make -j 2 - # make -j ${{ steps.cpu-cores.outputs.count }} + run: make -j ${{ steps.cpu-cores.outputs.count }} + working-directory: build - name: Test xeus-zmq - uses: nick-invision/retry@v2 + uses: nick-invision/retry@v3 with: timeout_minutes: 4 max_attempts: 4 shell: bash - command: | - cd build/test - ctest --output-on-failure + command: ctest --output-on-failure + working-directory: build/test - - - name: install xeus-zmq + - name: Install xeus-zmq shell: bash -l {0} - run: | - cd build - make install + run: make install + working-directory: build win: @@ -91,24 +86,21 @@ jobs: steps: - uses: actions/checkout@v4 - - name: install mamba - uses: mamba-org/provision-with-micromamba@main + - name: Install micromamba + uses: mamba-org/setup-micromamba@v1 with: environment-file: environment-dev.yml environment-name: xeus-zmq - - - name: micromamba shell hook - shell: powershell - run: | - micromamba shell hook -s cmd.exe -p C:\Users\runneradmin\micromamba-root + init-shell: >- + powershell + cmd - name: Make build directory run: mkdir build - - name: cmake configure + - name: Configure cmake shell: cmd run: | - call C:\Users\runneradmin\micromamba-root\condabin\micromamba.bat activate xeus-zmq cmake .. ^ -G Ninja ^ -DCMAKE_BUILD_TYPE=Release ^ @@ -118,23 +110,20 @@ jobs: -DCMAKE_INSTALL_PREFIX="%CONDA_PREFIX%" working-directory: build - - name: build + - name: Build shell: cmd run: | - call C:\Users\runneradmin\micromamba-root\condabin\micromamba.bat activate xeus-zmq set CL=/MP ninja install working-directory: build - name: ctest - uses: nick-invision/retry@v2 + uses: nick-invision/retry@v3 with: timeout_minutes: 4 max_attempts: 4 shell: cmd command: | - call C:\Users\runneradmin\micromamba-root\condabin\micromamba.bat activate xeus-zmq set PATH=%CONDA_PREFIX%;%CONDA_PREFIX%\\Scripts;%CONDA_PREFIX%\\Library;%CONDA_PREFIX%\\Library\\bin;%PATH% - cd build ctest --output-on-failure - + working-directory: build From 737b620a2518f5c06a3f0f3bdfcf560f823aac71 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Mon, 5 Feb 2024 13:58:44 +0100 Subject: [PATCH 2/4] Remove working dir for retry --- .github/workflows/main.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 22c9a42..26cc0cd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -66,8 +66,9 @@ jobs: timeout_minutes: 4 max_attempts: 4 shell: bash - command: ctest --output-on-failure - working-directory: build/test + command: | + cd build/test + ctest --output-on-failure - name: Install xeus-zmq shell: bash -l {0} @@ -125,5 +126,5 @@ jobs: shell: cmd command: | set PATH=%CONDA_PREFIX%;%CONDA_PREFIX%\\Scripts;%CONDA_PREFIX%\\Library;%CONDA_PREFIX%\\Library\\bin;%PATH% + cd build ctest --output-on-failure - working-directory: build From 178087ec14a74aea79c5b41bcc91c00627079004 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Mon, 5 Feb 2024 14:02:06 +0100 Subject: [PATCH 3/4] Fix shell name --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 26cc0cd..bc61c06 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -94,7 +94,7 @@ jobs: environment-name: xeus-zmq init-shell: >- powershell - cmd + cmd.exe - name: Make build directory run: mkdir build From 7f95b17157c0d648a85f9ca3758b3eeedee25d15 Mon Sep 17 00:00:00 2001 From: Isabel Paredes Date: Mon, 5 Feb 2024 14:05:47 +0100 Subject: [PATCH 4/4] Add shell args --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bc61c06..34bd6dc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -100,7 +100,7 @@ jobs: run: mkdir build - name: Configure cmake - shell: cmd + shell: cmd /C call {0} run: | cmake .. ^ -G Ninja ^ @@ -112,7 +112,7 @@ jobs: working-directory: build - name: Build - shell: cmd + shell: cmd /C call {0} run: | set CL=/MP ninja install