Skip to content

Commit 02f3ac3

Browse files
committed
Modified workflow to try and build sfml 3 manually
1 parent 5c67c25 commit 02f3ac3

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

.github/workflows/c-cpp.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,34 @@ on:
77
branches: [ "main" ]
88

99
jobs:
10-
ubuntu:
10+
ubuntu:
1111
runs-on: ubuntu-latest
1212

1313
steps:
1414
- name: Checkout Repository
1515
uses: actions/checkout@v4
1616

1717
- name: Install Dependencies
18-
run: sudo apt-get update && sudo apt-get install -y cmake g++ libx11-dev libxrandr-dev libgl1-mesa-dev libfreetype6-dev libjpeg-dev libopenal-dev libxcursor-dev libxi-dev libudev-dev libogg-dev libvorbis-dev libflac-dev libsndfile-dev libpthread-stubs0-dev
18+
run: sudo apt-get update && sudo apt-get install -y g++ libx11-dev libxrandr-dev libgl1-mesa-dev libfreetype6-dev libjpeg-dev libopenal-dev libxcursor-dev libxi-dev libudev-dev libogg-dev libvorbis-dev libflac-dev libsndfile-dev libpthread-stubs0-dev libsfml-dev
1919

2020
- name: Clone SFML 3.0
2121
run: git clone --branch 3.0.0 https://github.com/SFML/SFML.git
2222

23-
- name: Configure CMake with Install Support
23+
- name: Build SFML 3.0 Manually
2424
run: |
25-
cd SFML
26-
cmake -B build -DCMAKE_INSTALL_PREFIX=/usr/local
25+
cd SFML/src
26+
g++ -std=c++17 -c SFML/Window/*.cpp SFML/Graphics/*.cpp SFML/System/*.cpp
27+
ar rcs libsfml.a *.o
28+
sudo cp libsfml.a /usr/local/lib/
29+
sudo cp -r SFML /usr/local/include/
2730
28-
- name: Build SFML 3.0 from Source
29-
run: |
30-
cd SFML
31-
cmake --build build -- -j$(nproc)
32-
sudo make install
33-
34-
- name: Compile Project with SFML 3.0
31+
- name: Compile C++ Project with SFML
3532
run: g++ -std=c++17 main.cpp -o main -I/usr/local/include -L/usr/local/lib -lsfml-graphics -lsfml-window -lsfml-system
3633

3734
- name: Verify SFML Version
3835
run: sfml-config --version
3936

37+
4038
# Windows test doesn't work due to missing dependencies error
4139
# windows:
4240
# runs-on: windows-latest

0 commit comments

Comments
 (0)