terravisor/.gitlab-ci.yml

38 lines
1.1 KiB
YAML
Raw Normal View History

2024-08-10 23:24:51 -04:00
stages:
- setup
2024-08-10 23:29:50 -04:00
- build
2024-08-10 23:24:51 -04:00
setup:
stage: setup
2024-08-10 23:51:20 -04:00
image: alpine:latest
2024-08-10 23:35:01 -04:00
script:
2024-08-10 23:51:20 -04:00
- echo "Installing dependencies..."
- apk update && apk add --no-cache curl zip unzip tar git cmake make gcc g++ bash ninja
- echo "Cloning and setting up vcpkg..."
2024-08-10 23:35:01 -04:00
- git clone https://github.com/microsoft/vcpkg.git
- cd vcpkg
2024-08-11 00:08:37 -04:00
- export VCPKG_FORCE_SYSTEM_BINARIES=1
2024-08-10 23:38:07 -04:00
- ./bootstrap-vcpkg.sh
- ./vcpkg install glew:x64-linux glfw3:x64-linux || true # Prevent script exit on failure
2024-08-10 23:51:20 -04:00
artifacts:
paths:
2024-08-11 00:10:33 -04:00
- vcpkg/
2024-08-11 00:05:30 -04:00
# Build stage to compile the project
build:
stage: build
2024-08-10 23:51:20 -04:00
image: alpine:latest
script:
2024-08-10 23:29:50 -04:00
- echo "Building the application..."
2024-08-11 00:01:52 -04:00
- apk add --no-cache cmake make gcc g++ ninja
- export PATH=$PATH:/usr/bin
2024-08-11 00:05:30 -04:00
- ls -la # List the contents to check if the vcpkg directory is present
- cd vcpkg # Ensure we can access the vcpkg directory
2024-08-11 00:01:52 -04:00
- cd ..
2024-08-10 23:29:50 -04:00
- mkdir -p build
- cd build
2024-08-10 23:38:07 -04:00
- cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE=$CI_PROJECT_DIR/vcpkg/scripts/buildsystems/vcpkg.cmake
- ninja
2024-08-10 23:51:20 -04:00
dependencies:
2024-08-11 00:05:30 -04:00
- setup # Ensure this job depends on the setup stage and uses its artifacts