This repository has been archived by the owner on Aug 29, 2024. It is now read-only.
Follow-up of #408: Color class improvements #170
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build (Linux) | |
on: [workflow_dispatch, push, pull_request] | |
env: | |
SFML_DIR: extern/sfml/linux | |
#!! None of these work here: | |
#!!... LD_LIBRARY_PATH: extern/sfml/${{ matrix.target }}/lib | |
#!!... LD_LIBRARY_PATH: ${{ env.CWD }}/extern/sfml/linux/lib | |
#!!... LD_LIBRARY_PATH: $CWD/extern/sfml/linux/lib | |
jobs: | |
build: | |
name: Multi-Build (Only GCC on Linux is enabled currently!) | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
#!! Clang can no longer share the same prepackaged SFML libs with GCC! | |
#!! And my setup script doesn't care about that yet, so, disabling: | |
# cc: [clang++, g++] | |
#!! Also, as it turns out, the default g++ version is 11 on GitHub!... :-/ | |
cc: [g++] | |
target: [linux] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install SFML dependencies... | |
run: | | |
cat /etc/os-release; cat /etc/issue | |
g++ --version | |
# Bummer: Ubuntu 22.04 still doesn't have GNU make 4.4 (e.g. for .WAIT)! :-o :-/ | |
make --version | |
sudo apt install libgl-dev | |
# The rest is only needed for static builds: | |
sudo apt install libx11-dev | |
sudo apt install libxrandr-dev | |
sudo apt install libxcursor-dev | |
sudo apt install libxi-dev | |
sudo apt install libudev-dev | |
- name: Download & setup SFML/master... | |
run: ./tooling/sfml-setup ${{ matrix.target }} | |
- name: Build (Ubuntu only! Windows is being manually tested locally for now...) | |
run: make CXX=${{ matrix.cc }} TOOLCHAIN=${{ matrix.target }} | |
- name: Smoke test - Set PATH for the SFML shared libs... | |
run: echo "LD_LIBRARY_PATH=${{ github.workspace }}/${{ env.SFML_DIR }}/lib" >> $GITHUB_ENV | |
- name: Smoke test - Start dummy headless X server... | |
# Already installed on the Ubuntu runner: | |
# run: sudo apt install xvfb | |
run: | | |
Xvfb :0 -ac & | |
sleep 5 | |
echo "DISPLAY=:0" >> $GITHUB_ENV | |
- name: Smoke test... | |
run: | | |
./test/smoke-linux |