Change .drone.yml in favor of more compact .drone.jsonnet
All checks were successful
continuous-integration/drone/push Build is passing

Include debian & archlinux in tests
This commit is contained in:
DataHoarder 2020-12-29 17:51:11 +01:00
parent e9ad8ad656
commit 929f438a35
2 changed files with 50 additions and 27 deletions

50
.drone.jsonnet Normal file
View file

@ -0,0 +1,50 @@
local AptPipeline(image, version, compiler) = {
kind: "pipeline",
type: "docker",
name: image+"-"+version+"-"+compiler,
steps: [
{
name: "build",
image: image+":"+version,
commands: [
"apt update",
"DEBIAN_FRONTEND=noninteractive apt install -y make "+compiler,
"make clean",
"make CC="+compiler+" CFLAGS=\"-Wall -Werror -Wno-unknown-warning-option -Wno-unknown-pragmas -Wno-packed-bitfield-compat\""
]
}
]
};
local PacManPipeline(image, version, compiler) = {
kind: "pipeline",
type: "docker",
name: image+"-"+version+"-"+compiler,
steps: [
{
name: "build",
image: image+":"+version,
commands: [
"pacman -Syy",
"pacman --noconfirm -S make "+compiler,
"make clean",
"make CC="+compiler+" CFLAGS=\"-Wall -Werror -Wno-unknown-warning-option -Wno-unknown-pragmas -Wno-packed-bitfield-compat\""
]
}
]
};
[
AptPipeline("ubuntu", "20.04", "gcc"),
AptPipeline("ubuntu", "20.04", "clang"),
AptPipeline("ubuntu", "18.04", "gcc"),
AptPipeline("ubuntu", "18.04", "clang"),
AptPipeline("debian", "buster", "gcc"),
AptPipeline("debian", "buster", "clang"),
AptPipeline("debian", "stretch", "gcc"),
AptPipeline("debian", "stretch", "clang"),
PacManPipeline("archlinux", "latest", "gcc"),
PacManPipeline("archlinux", "latest", "clang")
]

View file

@ -1,27 +0,0 @@
---
kind: pipeline
type: docker
name: build-gcc
steps:
- name: build
image: ubuntu:20.04
commands:
- apt update
- DEBIAN_FRONTEND=noninteractive apt install -y gcc make
- make clean
- make CC=gcc CFLAGS="-Wall -Werror -Wno-unknown-warning-option -Wno-packed-bitfield-compat"
---
kind: pipeline
type: docker
name: build-clang
steps:
- name: build
image: ubuntu:20.04
commands:
- apt update
- DEBIAN_FRONTEND=noninteractive apt install -y clang make
- make clean
- make CC=clang CFLAGS="-Wall -Werror -Wno-unknown-warning-option -Wno-packed-bitfield-compat"
...