Skip to content

Commit

Permalink
Update test-build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
LiangliangNan committed Jan 13, 2025
1 parent e280ce8 commit 9e9811f
Showing 1 changed file with 30 additions and 10 deletions.
40 changes: 30 additions & 10 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ jobs:
if: runner.os == 'Linux'
run: |
sudo apt-get update || true
sudo apt-get install -y build-essential libglu1-mesa-dev \
mesa-common-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libboost-all-dev
sudo apt-get install -y build-essential libboost-all-dev
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ..
make
Expand All @@ -44,13 +43,34 @@ jobs:
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ..
make
# Set up environment and build on Windows
- name: Build on Windows
# Set up Conda on Windows
- name: Set up Conda (Windows)
if: runner.os == 'Windows'
shell: cmd
uses: conda-incubator/setup-miniconda@v3
with:
architecture: x64
activate-environment: AdTreeEnv
auto-activate-base: false
channels: conda-forge,defaults

# Install Boost via Conda on Windows
- name: Install Dependencies (Windows)
if: runner.os == 'Windows'
shell: bash -l {0}
run: conda install -y boost

# Configure CMake on Windows
- name: Configure (Windows)
if: runner.os == 'Windows'
shell: bash -l {0}
run: |
choco install boost cmake --installargs '"ADD_CMAKE_TO_PATH=System"'
mkdir build
cd build
cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ..
cmake --build . --config ${{ matrix.build_type }}
cmake -S . -B build/${{ matrix.build_type }} \
-G "Visual Studio 17 2022" \
-A x64 \
-DBOOST_ROOT="$CONDA_PREFIX/Library"
# Build on Windows
- name: Build (Windows)
if: runner.os == 'Windows'
shell: bash -l {0}
run: cmake --build build/${{ matrix.build_type }} --config ${{ matrix.build_type }}

0 comments on commit 9e9811f

Please sign in to comment.