Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

bobis33 RayTracer CI #17

bobis33 RayTracer CI

bobis33 RayTracer CI #17

Workflow file for this run

name: RayTracer CI
run-name: ${{github.actor}} RayTracer CI
on:
push:
branches:
- "**"
env:
EXECUTABLE: "raytracer"
LIGHT_LIBRARY: "light_ambient.so,light_directional.so,light_point.so"
MATERIAL_LIBRARY: "material_reflective.so,material_transparent.so"
RENDERER_LIBRARY: "renderer_sfml.so,renderer_ppm.so"
SHAPE_LIBRARY: "shape_cone.so,shape_cylinder.so,shape_plane.so,shape_sphere.so"
jobs:
build:
runs-on: ubuntu-latest
container:
image: epitechcontent/epitest-docker:latest
steps:
- uses: actions/checkout@v2
- name: Check compilation
run: |
mkdir ./build && cd ./build
cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
cmake --build .
cd ..
- name: Check binary
run: |
if [[ ! -x "./${EXECUTABLE}" ]]; then
echo "Error: Binary ${EXECUTABLE} not found."
exit 1
fi
- name: Check light libraries
run: |
IFS=',' read -ra ADDR <<< $LIGHT_LIBRARY
for lib in "${ADDR[@]}"; do
if [[ ! -e "./plugins/${lib}" ]]; then
echo "Error: Library $lib not found."
exit 1
fi
done
- name: Check material libraries
run: |
IFS=',' read -ra ADDR <<< $MATERIAL_LIBRARY
for lib in "${ADDR[@]}"; do
if [[ ! -e "./plugins/${lib}" ]]; then
echo "Error: Library $lib not found."
exit 1
fi
done
- name: Check renderer libraries
run: |
IFS=',' read -ra ADDR <<< $RENDERER_LIBRARY
for lib in "${ADDR[@]}"; do
if [[ ! -e "./plugins/${lib}" ]]; then
echo "Error: Library $lib not found."
exit 1
fi
done
- name: Check shape libraries
run: |
IFS=',' read -ra ADDR <<< $SHAPE_LIBRARY
for lib in "${ADDR[@]}"; do
if [[ ! -e "./plugins/${lib}" ]]; then
echo "Error: Library $lib not found."
exit 1
fi
done