fileserver/.gitlab-ci.yml
2022-08-28 18:29:11 +02:00

59 lines
1.4 KiB
YAML

image: ubuntu:latest
stages:
- build
- package
build_backend:
stage: build
script:
- apt-get update
- apt-get install g++ gcc make cmake git curl zip unzip tar python3 pkg-config -y
- SRC="$PWD"
- TMP=$(mktemp -d)
- cd $TMP
- git clone https://github.com/Microsoft/vcpkg.git .
- ./bootstrap-vcpkg.sh -disableMetrics
- cd $SRC
- cmake -B build -S backend -DCMAKE_TOOLCHAIN_FILE=$TMP/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release
- cmake --build build
- cp build/backend server
artifacts:
paths:
- backend
expire_in: 1h
test_and_build_frontend:
image: node:latest
stage: build
cache:
paths:
- frontend/.yarn
- frontend/node_modules
script:
- cd frontend
- yarn install --cache-folder .yarn --frozen-lockfile
- yarn lint
- yarn build
artifacts:
paths:
- frontend/dist/
expire_in: 1h
package_server:
stage: package
cache: []
before_script: []
needs:
- job: build_backend
artifacts: true
- job: test_and_build_frontend
artifacts: true
script:
- mkdir static
- mv frontend/dist/* static/
artifacts:
paths:
- server
- static/