3
0
Fork 0
tomsfastmath/.drone.yml

125 lines
2.9 KiB
YAML

---
kind: pipeline
name: build-linux
platform:
arch: amd64
environment:
SLEEP: 600
imagedefs:
- &anchor_compiler_image
image: dctl-registry.dcinet:5000/suse-15.4/gcc-113
steps:
- name: build
<<: *anchor_compiler_image
volumes:
- name: temp
path: /tmp
- name: cache
path: /tmp/cache
commands:
- export CC=gcc
- make -f makefile.shared test_standalone >test_gcc_1.txt 2>test_gcc_2.txt
- ./test >test_std.txt 2>test_err.txt
- name: build-fail
<<: *anchor_compiler_image
volumes:
- name: temp
path: /tmp
- name: cache
path: /tmp/cache
commands:
- echo "Go do some debugging - you've got $${SLEEP} seconds"
- sleep $${SLEEP}
- cat test_gcc_1.txt
- cat test_std.txt
- cat test_err.txt
when:
status:
- failure
- name: build-success
<<: *anchor_compiler_image
volumes:
- name: temp
path: /tmp
- name: cache
path: /tmp/cache
commands:
# - echo "Go check where the binaries are - you've got $${SLEEP} seconds"
# - sleep $${SLEEP}
- cat test_gcc_2.txt
depends_on:
- build
when:
status:
- success
# ### NOTE build-install is of no use to us for fireswarm as it only installs the static library and header
# ### It is easier to pull shared lib from .libs/libtfm.so.1.0.0 and header from src/headers/tfm.h
#- name: build-install
#<<: *anchor_compiler_image
#volumes:
#- name: temp
#path: /tmp
#- name: cache
#path: /tmp/cache
#commands:
#- make install
#- ls -R -l /usr/local/* | grep tfm
#depends_on:
#- build-success
# ### TODO package up the contents of .libs and maybe the public header?
# #-rw-r--r-- 1 root root 325206 May 13 09:06 libtfm.a
# #lrwxrwxrwx 1 root root 12 May 13 09:06 libtfm.la -> ../libtfm.la
# #-rw-r--r-- 1 root root 909 May 13 09:06 libtfm.lai
# #lrwxrwxrwx 1 root root 15 May 13 09:06 libtfm.so -> libtfm.so.1.0.0
# #lrwxrwxrwx 1 root root 15 May 13 09:06 libtfm.so.1 -> libtfm.so.1.0.0
# #-rwxr-xr-x 1 root root 233136 May 13 09:06 libtfm.so.1.0.0
# #-rw-r--r-- 1 root root 671 May 13 09:06 libtfm.ver
volumes:
- name: cache
host:
path: /srv/dockerctl_icc/cache
- name: staging-icc
host:
path: /srv/dockerctl_icc/staging
- name: temp
temp: {}
trigger:
# For now we only run on demand
event:
- custom
# Disable running pipeline a second time when we promote a successful build
exclude:
- promote
# ---
# kind: pipeline
# name: build-windows
# platform:
# arch: amd64
# environment:
# MYCC: gcc" SHARED="-f makefile.shared"
# steps:
# - name: test
# image: gcc
# commands:
# - ${MYCC}" make ${SHARED} test_standalone >test_gcc_1.txt 2>test_gcc_2.txt && ./test >test_std.txt 2>test_err.txt"
...