Skip to content

Commit 9e9811f

Browse files
committed
Update test-build.yml
1 parent e280ce8 commit 9e9811f

File tree

1 file changed

+30
-10
lines changed

1 file changed

+30
-10
lines changed

.github/workflows/test-build.yml

+30-10
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ jobs:
2828
if: runner.os == 'Linux'
2929
run: |
3030
sudo apt-get update || true
31-
sudo apt-get install -y build-essential libglu1-mesa-dev \
32-
mesa-common-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libboost-all-dev
31+
sudo apt-get install -y build-essential libboost-all-dev
3332
mkdir -p build && cd build
3433
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ..
3534
make
@@ -44,13 +43,34 @@ jobs:
4443
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ..
4544
make
4645
47-
# Set up environment and build on Windows
48-
- name: Build on Windows
46+
# Set up Conda on Windows
47+
- name: Set up Conda (Windows)
4948
if: runner.os == 'Windows'
50-
shell: cmd
49+
uses: conda-incubator/setup-miniconda@v3
50+
with:
51+
architecture: x64
52+
activate-environment: AdTreeEnv
53+
auto-activate-base: false
54+
channels: conda-forge,defaults
55+
56+
# Install Boost via Conda on Windows
57+
- name: Install Dependencies (Windows)
58+
if: runner.os == 'Windows'
59+
shell: bash -l {0}
60+
run: conda install -y boost
61+
62+
# Configure CMake on Windows
63+
- name: Configure (Windows)
64+
if: runner.os == 'Windows'
65+
shell: bash -l {0}
5166
run: |
52-
choco install boost cmake --installargs '"ADD_CMAKE_TO_PATH=System"'
53-
mkdir build
54-
cd build
55-
cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ..
56-
cmake --build . --config ${{ matrix.build_type }}
67+
cmake -S . -B build/${{ matrix.build_type }} \
68+
-G "Visual Studio 17 2022" \
69+
-A x64 \
70+
-DBOOST_ROOT="$CONDA_PREFIX/Library"
71+
72+
# Build on Windows
73+
- name: Build (Windows)
74+
if: runner.os == 'Windows'
75+
shell: bash -l {0}
76+
run: cmake --build build/${{ matrix.build_type }} --config ${{ matrix.build_type }}

0 commit comments

Comments
 (0)