Skip to content

Commit

Permalink
Update CI (#606)
Browse files Browse the repository at this point in the history
Update CI
  • Loading branch information
IsabelParedes committed Mar 12, 2024
1 parent d6327fa commit dc8f542
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 42 deletions.
68 changes: 26 additions & 42 deletions .github/workflows/main.yml
Expand Up @@ -29,13 +29,12 @@ jobs:
- 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-python

- name: Make build directory
run: mkdir build
Expand All @@ -52,7 +51,7 @@ jobs:
CMAKE_EXTRA_ARGS="$CMAKE_EXTRA_ARGS -DXPYT_BUILD_STATIC=OFF"
echo "CMAKE_EXTRA_ARGS=$CMAKE_EXTRA_ARGS" >> $GITHUB_ENV
- name: cmake configure
- name: Configure cmake
run: |
cmake .. \
-D CMAKE_PREFIX_PATH=$CONDA_PREFIX \
Expand All @@ -72,10 +71,10 @@ jobs:
- name: Print version
run: xpython --version

#- name: Test xeus-python C++
# run: ./test_xeus_python
# timeout-minutes: 4
# working-directory: build/test
# - name: Test xeus-python C++
# run: ./test_xeus_python
# timeout-minutes: 4
# working-directory: build/test

- name: Test xeus-python Python
run: pytest . -vvv
Expand All @@ -93,16 +92,11 @@ 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:
init-shell: cmd.exe
environment-file: environment-dev.yml
environment-name: xeus-python

- name: micromamba shell hook
shell: powershell
run: |
micromamba shell hook -s cmd.exe -p C:\Users\runneradmin\micromamba-root

- name: Make build directory
run: mkdir build
Expand All @@ -119,10 +113,9 @@ jobs:
CMAKE_EXTRA_ARGS="$CMAKE_EXTRA_ARGS -DXPYT_BUILD_STATIC=OFF"
echo "CMAKE_EXTRA_ARGS=$CMAKE_EXTRA_ARGS" >> $GITHUB_ENV
- name: cmake configure
shell: cmd
- name: Configure cmake
shell: cmd /C call {0}
run: |
call C:\Users\runneradmin\micromamba-root\condabin\micromamba.bat activate xeus-python
cmake .. ^
-GNinja ^
-DCMAKE_BUILD_TYPE=Release ^
Expand All @@ -135,27 +128,24 @@ jobs:
${{ env.CMAKE_EXTRA_ARGS }}
working-directory: build

- name: build
shell: cmd
- name: Build and install
shell: cmd /C call {0}
run: |
call C:\Users\runneradmin\micromamba-root\condabin\micromamba.bat activate xeus-python
set CL=/MP
ninja install
working-directory: build

- name: Test xeus-python Python
shell: cmd /C call {0}
run: pytest . -vvv

- name: Test xeus-python C++
shell: cmd /C call {0}
run: |
micromamba activate xeus-python
test_xeus_python
timeout-minutes: 4
working-directory: build/test

- name: Test xeus-python Python
shell: cmd
run: |
call C:\Users\runneradmin\micromamba-root\condabin\micromamba.bat activate xeus-python
pytest . -vvv
working-directory: build\test

test-wasm:

Expand All @@ -170,29 +160,24 @@ jobs:
- 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-wasm-build.yml
environment-name: xeus-python-wasm-build


- name: "setup emsdk"
- name: Setup emsdk
shell: bash -l {0}
run: |
micromamba activate xeus-python-wasm-build
cd $HOME
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
cd emsdk
./emsdk install ${{ matrix.emsdk_ver }}
./emsdk activate ${{ matrix.emsdk_ver }}
- name: Build and pack xeus-python
run: |
micromamba activate xeus-python-wasm-build
$HOME/emsdk/emsdk activate ${{matrix.emsdk_ver}}
source $HOME/emsdk/emsdk_env.sh
Expand All @@ -214,5 +199,4 @@ jobs:
-DXPYT_EMSCRIPTEN_WASM_BUILD=ON \
..
make -j5
make -j5
1 change: 1 addition & 0 deletions environment-dev.yml
Expand Up @@ -21,3 +21,4 @@ dependencies:
- ipympl
- jupyter_kernel_test>=0.5,<0.6
- doctest
- pluggy=1.3

0 comments on commit dc8f542

Please sign in to comment.