@@ -11,75 +11,44 @@ on: [push, pull_request]
11
11
12
12
jobs :
13
13
build :
14
- name : " Build on ${{ matrix.platform }} with ${{ matrix.compiler }} "
14
+ name : " Build on ${{ matrix.platform }}"
15
15
strategy :
16
16
fail-fast : false
17
17
matrix :
18
- platform : [windows-latest, ubuntu-latest, macos-latest]
19
- compiler : [gcc, clang, msvc]
18
+ platform : [ubuntu-latest, macos-latest, windows-latest]
20
19
runs-on : ${{ matrix.platform }}
21
20
22
21
steps :
23
22
# Checkout the code
24
23
- uses : actions/checkout@v3
25
24
26
- # Install dependencies for Ubuntu
27
- - name : Install Dependencies ( Linux)
25
+ # Install dependencies and build on Ubuntu
26
+ - name : Build on Linux
28
27
if : runner.os == 'Linux'
29
28
run : |
30
29
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
36
35
37
- # Install dependencies for macOS
38
- - name : Install Dependencies ( macOS)
36
+ # Install dependencies and build on macOS
37
+ - name : Build on macOS
39
38
if : runner.os == 'macOS'
40
39
run : |
41
40
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
63
42
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
67
45
68
- - name : Configure (Windows)
46
+ # Set up environment and build on Windows
47
+ - name : Build on Windows
69
48
if : runner.os == 'Windows'
49
+ shell : cmd
70
50
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