add CICD pipeline (untested)
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
2efe3344b4
commit
cb20f91223
44
.drone.yml
Normal file
44
.drone.yml
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
kind: pipeline
|
||||||
|
name: default
|
||||||
|
|
||||||
|
workspace:
|
||||||
|
base: /go
|
||||||
|
path: src/deadbeef.codes/steven/hyp
|
||||||
|
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: create build environment
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
repo: registry.deadbeef.codes/hyp-build
|
||||||
|
when:
|
||||||
|
target:
|
||||||
|
include:
|
||||||
|
- environment
|
||||||
|
|
||||||
|
- name: build hyp linux-amd64
|
||||||
|
image: registry.deadbeef.codes/hyp-build:latest
|
||||||
|
pull: always
|
||||||
|
environment:
|
||||||
|
GOOS: linux
|
||||||
|
GOARCH: amd64
|
||||||
|
CGO_ENABLED: 0
|
||||||
|
commands:
|
||||||
|
- mkdir /dist
|
||||||
|
- cd hyp
|
||||||
|
- go build .
|
||||||
|
- mv hyp /dist
|
||||||
|
- cd ../hypd/server
|
||||||
|
- go generate
|
||||||
|
- cd ..
|
||||||
|
- go build .
|
||||||
|
- mv hypd /dist
|
||||||
|
|
||||||
|
- name: release
|
||||||
|
image: plugins/gitea-release
|
||||||
|
settings:
|
||||||
|
api_key:
|
||||||
|
from_secret: drone_token
|
||||||
|
base_url: https://deadbeef.codes
|
||||||
|
files: dist/*
|
||||||
|
|
15
Dockerfile
Normal file
15
Dockerfile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# Build environment container
|
||||||
|
# THIS CONTAINER IS NOT FOR RUNNING HYP, IT IS FOR BUILDING IT FROM SOURCE
|
||||||
|
|
||||||
|
FROM debian:stable
|
||||||
|
LABEL maintainer="himself@stevenpolley.net"
|
||||||
|
|
||||||
|
# Install build
|
||||||
|
RUN apt update -y && \
|
||||||
|
apt upgrade -y && \
|
||||||
|
apt install -y wget git clang linux-headers-amd64 libbpf-dev
|
||||||
|
|
||||||
|
# Install golang
|
||||||
|
RUN wget https://go.dev/dl/go1.22.2.linux-amd64.tar.gz && \
|
||||||
|
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.22.2.linux-amd64.tar.gz && \
|
||||||
|
rm -rf *.tar.gz
|
Loading…
Reference in New Issue
Block a user