This repository has been archived by the owner on May 29, 2024. It is now read-only.
bobis33 RayTracer CI #11
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: RayTracer CI | |
run-name: ${{github.actor}} RayTracer CI | |
on: | |
push: | |
branches: | |
- "**" | |
pull_request: | |
branches: | |
- "**" | |
env: | |
EXECUTABLE: "raytracer" | |
LIBRARY: "raytracer_renderer.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 shared libraries | |
run: | | |
IFS=',' read -ra ADDR <<< $LIBRARY | |
for lib in "${ADDR[@]}"; do | |
if [[ ! -e "./plugins/${lib}" ]]; then | |
echo "Error: Library $lib not found." | |
exit 1 | |
fi | |
done |