Skip to content

Commit e497aef

Browse files
committed
Update test-build.yml
1 parent ad0015a commit e497aef

File tree

1 file changed

+21
-52
lines changed

1 file changed

+21
-52
lines changed

.github/workflows/test-build.yml

Lines changed: 21 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -11,75 +11,44 @@ on: [push, pull_request]
1111

1212
jobs:
1313
build:
14-
name: "Build on ${{ matrix.platform }} with ${{ matrix.compiler }}"
14+
name: "Build on ${{ matrix.platform }}"
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
platform: [windows-latest, ubuntu-latest, macos-latest]
19-
compiler: [gcc, clang, msvc]
18+
platform: [ubuntu-latest, macos-latest, windows-latest]
2019
runs-on: ${{ matrix.platform }}
2120

2221
steps:
2322
# Checkout the code
2423
- uses: actions/checkout@v3
2524

26-
# Install dependencies for Ubuntu
27-
- name: Install Dependencies (Linux)
25+
# Install dependencies and build on Ubuntu
26+
- name: Build on Linux
2827
if: runner.os == 'Linux'
2928
run: |
3029
sudo apt-get update || true
31-
sudo apt-get install -y \
32-
build-essential \
33-
${{ matrix.compiler }} \
34-
libglu1-mesa-dev mesa-common-dev \
35-
libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libboost-all-dev
30+
sudo apt-get install -y build-essential libglu1-mesa-dev \
31+
mesa-common-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev
32+
mkdir -p build && cd build
33+
cmake -DCMAKE_BUILD_TYPE=Release ..
34+
make
3635
37-
# Install dependencies for macOS
38-
- name: Install Dependencies (macOS)
36+
# Install dependencies and build on macOS
37+
- name: Build on macOS
3938
if: runner.os == 'macOS'
4039
run: |
4140
brew update || true
42-
brew install cmake boost
43-
44-
# Set up Miniconda on Windows
45-
- name: Set up Conda (Windows)
46-
if: runner.os == 'Windows'
47-
uses: conda-incubator/setup-miniconda@v3
48-
with:
49-
architecture: x64
50-
auto-activate-base: true
51-
channels: conda-forge,defaults
52-
53-
# Install dependencies for Windows using Conda
54-
- name: Install Dependencies (Windows)
55-
if: runner.os == 'Windows'
56-
run: |
57-
conda install -y ninja boost
58-
59-
# Configure the project
60-
- name: Configure (Linux & macOS)
61-
if: runner.os != 'Windows'
62-
run: |
41+
brew install cmake
6342
mkdir -p build && cd build
64-
cmake .. \
65-
-DCMAKE_BUILD_TYPE=Release \
66-
-DCMAKE_CXX_COMPILER=$([[ ${{ matrix.platform }} == "ubuntu-latest" ]] && echo ${{ matrix.compiler }} || echo "clang++")
43+
cmake -DCMAKE_BUILD_TYPE=Release ..
44+
make
6745
68-
- name: Configure (Windows)
46+
# Set up environment and build on Windows
47+
- name: Build on Windows
6948
if: runner.os == 'Windows'
49+
shell: cmd
7050
run: |
71-
mkdir -p build && cd build
72-
cmake .. \
73-
-G "Visual Studio 17 2022" \
74-
-A x64 \
75-
-DCMAKE_BUILD_TYPE=Release
76-
77-
# Build the project
78-
- name: Build (Linux & macOS)
79-
if: runner.os != 'Windows'
80-
run: |
81-
cmake --build build -- -j$(nproc)
82-
83-
- name: Build (Windows)
84-
if: runner.os == 'Windows'
85-
run: cmake --build build --config Release
51+
mkdir build
52+
cd build
53+
cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release ..
54+
cmake --build . --config Release

0 commit comments

Comments
 (0)