Introduce CI.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
giomba 2023-01-08 22:05:07 +01:00
parent 004a53300e
commit 802fd5c21f
7 changed files with 53 additions and 6 deletions

11
.drone.yml Normal file
View File

@ -0,0 +1,11 @@
---
kind: pipeline
type: docker
name: default
steps:
- name: build
image: git.golem.linux.it/golem/gestionale-builder:1
commands:
- script/build

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
build/
*.pro.user
build-*

11
Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM ubuntu:22.04
RUN useradd builder
RUN apt update && apt upgrade -y && apt install -y \
git \
make \
cmake \
qtbase5-dev \
g++

View File

@ -23,9 +23,7 @@ On Debian/Ubuntu/Mint:
* TODO
# Build
$ cd $REPOSITORY
$ mkdir build-component
$ cd build-component
$ qmake ../component
$ make -j$(nproc)
```
script/build
```

11
docker Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
REPODIR=$(realpath $(dirname "$0"))
docker run --rm -ti -u builder \
-v "$REPODIR":/workspace \
-v /tmp:/tmp \
-w /workspace \
gestionale-builder \
"$@"

10
script/build Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
REPODIR=$(realpath $(dirname "$0")/..)
BUILDIR="$REPODIR"/build
mkdir -p "$BUILDIR"
cmake -B "$BUILDIR"
make -j$(nproc) -C "$BUILDIR"

6
script/setup Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
REPODIR=$(realpath $(dirname "$0")/..)
docker build -t git.golem.linux.it/golem/gestionale-builder:1 "$REPODIR"