Fix const inits for gcc 9.4 and add docker tests for old gcc compiler (#29)

This commit is contained in:
Nic Barker 2024-09-28 07:42:08 +12:00 committed by GitHub
parent 10cc866477
commit 3b4c177e58
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 54 additions and 31 deletions

7
tests/docker-compose.yml Normal file
View file

@ -0,0 +1,7 @@
services:
gcc:
build:
context: ../
dockerfile: tests/gcc/9.4/Dockerfile
volumes:
- /tmp/clay/_deps

19
tests/gcc/9.4/Dockerfile Normal file
View file

@ -0,0 +1,19 @@
FROM --platform=linux/amd64 ubuntu:20.04
RUN apt update -y
RUN DEBIAN_FRONTEND=noninteractive apt install -y build-essential
RUN DEBIAN_FRONTEND=noninteractive apt install -y wget
WORKDIR /tmp/
RUN wget https://github.com/Kitware/CMake/releases/download/v3.28.4/cmake-3.28.4-linux-x86_64.tar.gz
RUN tar zxvf cmake-3.28.4-linux-x86_64.tar.gz
RUN DEBIAN_FRONTEND=noninteractive apt install -y git
RUN DEBIAN_FRONTEND=noninteractive apt install -y libwayland-dev
RUN DEBIAN_FRONTEND=noninteractive apt install -y pkg-config
RUN DEBIAN_FRONTEND=noninteractive apt install -y libxkbcommon-dev
RUN DEBIAN_FRONTEND=noninteractive apt install -y xorg-dev
ADD . /tmp/clay
WORKDIR /tmp/clay
CMD /tmp/cmake-3.28.4-linux-x86_64/bin/cmake . && /tmp/cmake-3.28.4-linux-x86_64/bin/cmake --build .

1
tests/run-tests.sh Executable file
View file

@ -0,0 +1 @@
docker compose build && docker compose up && echo "Tests complete."