自动编译测试

This commit is contained in:
2024-08-07 17:32:25 +08:00
parent 66c96b30ee
commit d3daa23b83
+33
View File
@@ -0,0 +1,33 @@
stages:
- build
- test
- deploy
variables:
BUILD_DIR: "build"
before_script:
- mkdir -p $BUILD_DIR
- cd $BUILD_DIR
build:
stage: build
script:
- cmake ..
- cmake --build .
artifacts:
paths:
- $BUILD_DIR
test:
stage: test
script:
- cd $BUILD_DIR
- ctest --output-on-failure
deploy:
stage: deploy
script:
- echo "Deploying..."
only:
- main