st/.woodpecker.yml

46 lines
1.1 KiB
YAML
Raw Permalink Normal View History

2022-04-07 21:15:30 +02:00
matrix:
# PLATFORM:
# - linux/amd64
# - linux/arm64
ARCH:
# tuur
- tigerlake
# cenny
- skylake
2022-04-07 21:15:30 +02:00
2022-01-02 11:02:36 +01:00
branches: master
platform: linux/amd64
2022-01-02 11:02:36 +01:00
2022-01-02 11:00:02 +01:00
when:
event: push
pipeline:
build:
2022-04-07 21:15:30 +02:00
image: 'menci/archlinuxarm:base-devel'
2022-01-02 11:00:02 +01:00
commands:
2022-04-09 11:32:10 +02:00
# Add my bur repo to pacman for the libxft-bgra dependency
2022-04-09 11:34:51 +02:00
- echo -e '[bur]\nServer = https://arch.r8r.be/$repo/$arch\nSigLevel = Optional' >> /etc/pacman.conf
2022-01-02 11:00:02 +01:00
# Update packages
2022-04-07 21:15:30 +02:00
- pacman -Syu --noconfirm
2022-01-02 11:00:02 +01:00
# Create non-root user to perform build & switch to their home
- groupadd -g 1000 builder
- useradd -mg builder builder
- chown -R builder:builder "$PWD"
- "echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers"
- su builder
# Build the package
- >
MAKEFLAGS="-j$(nproc)"
makepkg -s --noconfirm --needed
2022-09-04 15:26:33 +02:00
CFLAGS+=" -O3 -flto -march=${ARCH} -mtune=${ARCH}"
CARCH="x86_64_${ARCH}"
2022-01-02 11:00:02 +01:00
publish:
image: 'curlimages/curl'
2022-01-02 11:00:02 +01:00
commands:
# Publish the package
2023-08-07 09:38:47 +02:00
- 'curl --fail -s -XPOST -H "Authorization: Bearer $API_KEY" -T "$(ls *.pkg*)" https://arch2.r8r.be/jjr'
2022-01-02 11:00:02 +01:00
secrets:
- api_key