Building and Testing Display #167
Workflow file for this run
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 Project | |
run-name: Building and Testing Display | |
on: [push] | |
jobs: | |
Environment: | |
name: Compile and Test | |
# TODO: Add Windows and Mac(?) tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: ouzi-dev/commit-status-updater@v2 | |
with: | |
name: "Compile and Unit Tests" | |
status: pending | |
url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Get deps | |
run: | | |
sudo apt update | |
sudo apt install libasound2-dev libjack-jackd2-dev \ | |
ladspa-sdk \ | |
libcurl4-openssl-dev \ | |
libfreetype6-dev \ | |
libx11-dev libxcomposite-dev libxcursor-dev libxcursor-dev \ | |
libxext-dev libxinerama-dev libxrandr-dev libxrender-dev \ | |
libwebkit2gtk-4.0-dev libusb-1.0-0-dev \ | |
libglu1-mesa-dev mesa-common-dev xserver-xorg-video-dummy gcc ninja-build | |
- name: Configure XServer | |
run: | | |
sudo X -config \ | |
/home/runner/work/SupermilageDisplay/SupermilageDisplay/XServer-Headless-Settings/dummy-1920x1080.conf & | |
- name: Build project | |
run: | | |
cd /home/runner/work/SupermilageDisplay/SupermilageDisplay | |
mkdir build && cd build | |
cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE \ | |
-DCMAKE_BUILD_TYPE:STRING=Debug -G "Ninja" -D CMAKE_C_COMPILER=gcc-10 -D CMAKE_CXX_COMPILER=g++-10 .. | |
cmake --build . --config Debug --target all -j 2 -- | |
- if: ${{ failure() }} | |
uses: ouzi-dev/commit-status-updater@v2 | |
with: | |
name: "Compile and Unit Tests" | |
status: failure | |
url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
- name: Run Tests | |
run: | | |
cd build/TestApp_artefacts/Debug | |
# DISPLAY=:0 ./Test | |
- if: ${{failure()}} | |
uses: ouzi-dev/commit-status-updater@v2 | |
with: | |
name: "Compile and Unit Tests" | |
status: failure | |
url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
- if: ${{success()}} | |
uses: ouzi-dev/commit-status-updater@v2 | |
with: | |
name: "Compile and Unit Tests" | |
status: success | |
url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |