Compare commits
3 Commits
Author | SHA1 | Date |
---|---|---|
giomba | 740e650483 | |
giomba | c6a46a7293 | |
giomba | 802fd5c21f |
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: git.golem.linux.it/golem/gestionale-builder:1
|
||||||
|
commands:
|
||||||
|
- script/build
|
||||||
|
- name: archive
|
||||||
|
image: git.golem.linux.it/golem/gcd:1-beta
|
||||||
|
pull: always
|
||||||
|
settings:
|
||||||
|
destination_host: cassone.golem.linux.it
|
||||||
|
destination_port: 7061
|
||||||
|
directory: build
|
||||||
|
ssh_key:
|
||||||
|
from_secret: gcd_secret
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
|
build/
|
||||||
*.pro.user
|
*.pro.user
|
||||||
build-*
|
|
||||||
|
|
|
@ -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++
|
||||||
|
|
31
README.md
31
README.md
|
@ -17,15 +17,26 @@ Create `~/.config/it.linux.golem/component.conf` with following content:
|
||||||
username=golem
|
username=golem
|
||||||
password=guess
|
password=guess
|
||||||
|
|
||||||
## Dependencies
|
## Build
|
||||||
On Debian/Ubuntu/Mint:
|
Download the build container:
|
||||||
* qt5-default
|
```
|
||||||
* TODO
|
docker pull git.golem.linux.it/golem/gestionale-build
|
||||||
|
```
|
||||||
|
|
||||||
# Build
|
Or, if you prefer, you can also build it by yourself:
|
||||||
$ cd $REPOSITORY
|
```
|
||||||
$ mkdir build-component
|
script/setup
|
||||||
$ cd build-component
|
```
|
||||||
$ qmake ../component
|
|
||||||
$ make -j$(nproc)
|
|
||||||
|
|
||||||
|
Then, run all the commands in the build container, simply by preceding them with `docker`.
|
||||||
|
Example:
|
||||||
|
```
|
||||||
|
./docker ls
|
||||||
|
```
|
||||||
|
|
||||||
|
Every command you'll ever need to build this software should be scripted inside the `script/` directory.
|
||||||
|
|
||||||
|
Example: compile everything and produce executable.
|
||||||
|
```
|
||||||
|
./docker script/build
|
||||||
|
```
|
||||||
|
|
|
@ -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 \
|
||||||
|
"$@"
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
REPODIR=$(realpath $(dirname "$0")/..)
|
||||||
|
|
||||||
|
BUILDIR="$REPODIR"/build
|
||||||
|
|
||||||
|
mkdir -p "$BUILDIR"
|
||||||
|
cmake -B "$BUILDIR"
|
||||||
|
make -j$(nproc) -C "$BUILDIR"
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
REPODIR=$(realpath $(dirname "$0")/..)
|
||||||
|
|
||||||
|
docker build -t git.golem.linux.it/golem/gestionale-builder:1 "$REPODIR"
|
||||||
|
|
Loading…
Reference in New Issue