2024-01-25 00:59:13 +01:00
|
|
|
name: Build and run
|
2024-01-16 10:42:00 +01:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ "master" ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ "*" ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2024-01-25 00:59:13 +01:00
|
|
|
uses: actions/checkout@v4
|
2024-01-16 10:42:00 +01:00
|
|
|
- name: Install dependencies
|
|
|
|
run: sudo apt-get install -qy imagemagick
|
2024-01-25 00:59:13 +01:00
|
|
|
- name: Validate gcc version
|
|
|
|
run: |
|
|
|
|
if [[ $(gcc --version | awk '/gcc/ && ($3+0)>13{print "gcc-13+"}') != "gcc-13+" ]]; then
|
|
|
|
# Script courtesy of https://stackoverflow.com/a/67791068/16134571
|
|
|
|
sudo apt install gcc-13 g++-13
|
|
|
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 --slave /usr/bin/g++ g++ /usr/bin/g++-13 --slave /usr/bin/gcov gcov /usr/bin/gcov-13
|
|
|
|
sudo update-alternatives --set gcc /usr/bin/gcc-13
|
|
|
|
fi
|
2024-01-16 10:42:00 +01:00
|
|
|
- name: Build
|
|
|
|
run: make -C src
|
|
|
|
- name: Test
|
2024-01-19 20:15:19 +01:00
|
|
|
run: ./src/tiv -w 80 -h 24 /usr/share/pixmaps/debian-logo.png
|