Try to carry over from setup stage
This commit is contained in:
parent
a098b5b0e3
commit
8c42618b8a
|
@ -2,6 +2,7 @@ stages:
|
|||
- setup
|
||||
- build
|
||||
|
||||
# Setup stage to prepare the environment and vcpkg
|
||||
setup:
|
||||
stage: setup
|
||||
image: alpine:latest
|
||||
|
@ -11,25 +12,27 @@ setup:
|
|||
- echo "Cloning and setting up vcpkg..."
|
||||
- git clone https://github.com/microsoft/vcpkg.git
|
||||
- cd vcpkg
|
||||
- export VCPKG_FORCE_SYSTEM_BINARIES=1
|
||||
- ./bootstrap-vcpkg.sh
|
||||
- ./vcpkg install glew:x64-linux glfw3:x64-linux || true # Prevent script exit on failure
|
||||
- ./vcpkg install glew:x64-linux glfw3:x64-linux
|
||||
artifacts:
|
||||
paths:
|
||||
- vcpkg/buildtrees/glew/*.log
|
||||
- vcpkg/ # Save the entire vcpkg directory as an artifact
|
||||
|
||||
# Build stage to compile the project
|
||||
build:
|
||||
stage: build
|
||||
image: alpine:latest
|
||||
script:
|
||||
- echo "Building the application..."
|
||||
- apk add --no-cache cmake make gcc g++ ninja
|
||||
- cd vcpkg
|
||||
- export VCPKG_FORCE_SYSTEM_BINARIES=1
|
||||
- export PATH=$PATH:/usr/bin
|
||||
- ls -la # List the contents to check if the vcpkg directory is present
|
||||
- cd vcpkg # Ensure we can access the vcpkg directory
|
||||
- cd ..
|
||||
- mkdir -p build
|
||||
- cd build
|
||||
- cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE=$CI_PROJECT_DIR/vcpkg/scripts/buildsystems/vcpkg.cmake
|
||||
- ninja
|
||||
dependencies:
|
||||
- setup
|
||||
- setup # Ensure this job depends on the setup stage and uses its artifacts
|
||||
|
|
Loading…
Reference in New Issue