Skip to content

Commit e8556af

Browse files
committed
ci: Try to fix Windows build
1 parent f1b91cb commit e8556af

2 files changed

Lines changed: 22 additions & 19 deletions

File tree

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: pinocchio-minimal
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- cmake
6+
- cxx-compiler
7+
- pkg-config
8+
- ninja
9+
- libpinocchio

.github/workflows/test.yml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,13 @@ jobs:
5050
# conda
5151
- if: matrix.pm == 'conda'
5252
uses: conda-incubator/setup-miniconda@v3
53-
- if: matrix.pm == 'conda'
54-
run: conda install -n test -c conda-forge cmake cxx-compiler eigen eigenpy libboost-devel libboost-python-devel pinocchio
55-
- if: matrix.pm == 'conda'
56-
run: echo "CMAKE_PREFIX_PATH=$CONDA/envs/test" >> $GITHUB_ENV
53+
with:
54+
miniforge-version: latest
55+
activate-environment: pinocchio-minimal
56+
environment-file: .github/workflows/conda/environment.yml
57+
auto-activate-base: false
58+
auto-update-conda: true
59+
conda-remove-defaults: true
5760

5861
# nix
5962
- if: matrix.pm == 'nix'
@@ -98,21 +101,12 @@ jobs:
98101
- if: matrix.pm == 'ros'
99102
run: echo "CMAKE_PREFIX_PATH=/opt/ros/${ROS}" >> $GITHUB_ENV
100103

101-
# windows
102-
# thx https://gist.github.com/justinian/81a2e55c89e8301a8a96 & https://stackoverflow.com/a/74547513/1368502
103-
- if: matrix.os == 'windows'
104-
run: >
105-
cmd /c '"%programfiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64 && set'
106-
| Select-String -Pattern "^(.*?)=(.*)$"
107-
| Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
108-
109-
110-
- run: cmake -B build -DCMAKE_BUILD_TYPE=Release
111-
- run: cmake --build build
112-
- if: matrix.os != 'windows-latest'
113-
run: ./build/main
114-
- if: matrix.os == 'windows-latest'
115-
run: .\build\Debug\main.exe
104+
- name: Build and configure
105+
shell: bash -l {0}
106+
run: |
107+
cmake -B build -DCMAKE_BUILD_TYPE=Release -GNinja
108+
cmake --build build
109+
./build/main
116110
117111
docker:
118112
runs-on: "ubuntu-latest"

0 commit comments

Comments
 (0)