Kirika/.drone.yml
2022-07-23 00:12:37 +02:00

117 lines
7.8 KiB
YAML

---
kind: pipeline
type: docker
name: build-from-repo-amd64
platform:
os: linux
arch: amd64
environment:
GOAMD64: v3
GOOS: linux
CFLAGS: "-march=native -Ofast"
LDFLAGS: "-flto"
steps:
- name: submodules/LFS
image: alpine/git
commands:
- apk update && apk add --no-cache git-lfs && git lfs install
- git lfs pull
- git submodule update --init --recursive
- rm -rf .git/modules/resources/samples/
- name: build-repo
image: golang:1.18-bullseye
commands:
- sed -i -e "s/ main[[:space:]]*\$/ main contrib non-free/" /etc/apt/sources.list
- DEBIAN_FRONTEND=noninteractive apt update
- DEBIAN_FRONTEND=noninteractive apt install -y git build-essential autoconf automake libtool libflac-dev libopus-dev libopusfile-dev libsamplerate0-dev libmp3lame-dev libebur128-dev libfdk-aac-dev
- git clone --depth 1 https://gitlab.xiph.org/xiph/libopusenc.git && cd libopusenc && ./autogen.sh && ./configure --prefix /usr && make && make install && cd ..
- git clone --depth 1 https://git.gammaspectra.live/S.O.N.G/alac.git && cd alac && autoreconf -fi && ./configure --prefix /usr && make && make install && cd ..
- go test -p 1 -failfast -timeout 20m -cover -gcflags=-d=checkptr -v ./...
- go test -p 1 -failfast -timeout 20m -cover -gcflags=-d=checkptr -v -tags=disable_codec_libfdk_aac,disable_codec_lame,disable_codec_tta,disable_codec_libflac ./...
- go test -p 1 -failfast -timeout 20m -cover -gcflags=-d=checkptr -v -tags=disable_format_aac,disable_format_alac,disable_format_mp3,disable_format_opus,disable_format_tta,disable_format_vorbis ./...
- CGO_ENABLED=0 go test -p 1 -failfast -timeout 20m -cover -gcflags=-d=checkptr -v ./...
---
kind: pipeline
type: docker
name: build-from-source-amd64
platform:
os: linux
arch: amd64
environment:
GOAMD64: v3
GOOS: linux
CFLAGS: "-march=native -Ofast"
LDFLAGS: "-flto"
steps:
- name: submodules/LFS
image: alpine/git
commands:
- apk update && apk add --no-cache git-lfs && git lfs install
- git lfs pull
- git submodule update --init --recursive
- name: build-repo
image: golang:1.18-bullseye
commands:
- DEBIAN_FRONTEND=noninteractive apt update
- DEBIAN_FRONTEND=noninteractive apt install -y git build-essential autoconf automake make cmake libtool libtool-bin gettext wget pkg-config libssl-dev
- git clone --depth 1 --branch v1.2.6 https://github.com/jiixyj/libebur128.git && cd libebur128 && mkdir build && cd build && cmake .. -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX:PATH=/usr && make -j$(nproc) && make install && cd ../..
- git clone --depth 1 --branch 0.2.2 https://github.com/libsndfile/libsamplerate.git && cd libsamplerate && ./autogen.sh && ./configure --prefix /usr && make && make install && cd ..
- wget https://downloads.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz -O lame-3.100.tar.gz && tar -xzvf lame-3.100.tar.gz && cd lame-3.100 && ./configure --prefix /usr && make && make install && cd ..
- git clone --depth 1 --branch v1.3.5 https://github.com/xiph/ogg.git && cd ogg && ./autogen.sh && ./configure --prefix /usr && make && make install && cd ..
- git clone --branch master https://github.com/xiph/opus.git && cd opus && ./autogen.sh && ./configure --enable-float-approx --prefix /usr && make && make install && cd ..
- git clone --depth 1 --branch v0.12 https://github.com/xiph/opusfile.git && cd opusfile && ./autogen.sh && ./configure --prefix /usr && make && make install && cd ..
- git clone --depth 1 --branch 1.3.4 https://github.com/xiph/flac.git && cd flac && ./autogen.sh && ./configure --prefix /usr && make && make install && cd ..
- git clone --depth 1 https://gitlab.xiph.org/xiph/libopusenc.git && cd libopusenc && ./autogen.sh && ./configure --prefix /usr && make && make install && cd ..
- git clone --depth 1 https://github.com/mstorsjo/fdk-aac.git && cd fdk-aac && ./autogen.sh && ./configure --prefix /usr && make -j$(nproc) && make install && cd ..
- git clone --depth 1 https://git.gammaspectra.live/S.O.N.G/alac.git && cd alac && autoreconf -fi && ./configure --prefix /usr && make && make install && cd ..
- go test -p 1 -failfast -timeout 20m -cover -gcflags=-d=checkptr -v ./...
- go test -p 1 -failfast -timeout 20m -cover -gcflags=-d=checkptr -v -tags=disable_codec_libfdk_aac,disable_codec_lame,disable_codec_tta,disable_codec_libflac ./...
- go test -p 1 -failfast -timeout 20m -cover -gcflags=-d=checkptr -v -tags=disable_format_aac,disable_format_alac,disable_format_mp3,disable_format_opus,disable_format_tta,disable_format_vorbis ./...
- CGO_ENABLED=0 go test -p 1 -failfast -timeout 20m -cover -gcflags=-d=checkptr -v ./...
---
kind: pipeline
type: docker
name: build-from-source-arm64
platform:
os: linux
arch: arm64
environment:
GOARM: 7
GOOS: linux
CFLAGS: "-march=native -Ofast"
LDFLAGS: "-flto"
steps:
- name: submodules/LFS
image: alpine/git
commands:
- apk update && apk add --no-cache git-lfs && git lfs install
- git lfs pull
- git submodule update --init --recursive
- name: build-repo
image: golang:1.18-bullseye
commands:
- DEBIAN_FRONTEND=noninteractive apt update
- DEBIAN_FRONTEND=noninteractive apt install -y git build-essential autoconf automake make cmake libtool libtool-bin gettext wget pkg-config libssl-dev
- git clone --depth 1 --branch v1.2.6 https://github.com/jiixyj/libebur128.git && cd libebur128 && mkdir build && cd build && cmake .. -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX:PATH=/usr && make -j$(nproc) && make install && cd ../..
- git clone --depth 1 --branch 0.2.2 https://github.com/libsndfile/libsamplerate.git && cd libsamplerate && ./autogen.sh && ./configure --prefix /usr && make && make install && cd ..
- wget https://downloads.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz -O lame-3.100.tar.gz && tar -xzvf lame-3.100.tar.gz && cd lame-3.100 && ./configure --prefix /usr && make && make install && cd ..
- git clone --depth 1 --branch v1.3.5 https://github.com/xiph/ogg.git && cd ogg && ./autogen.sh && ./configure --prefix /usr && make && make install && cd ..
- git clone --branch master https://github.com/xiph/opus.git && cd opus && ./autogen.sh && ./configure --enable-float-approx --prefix /usr && make && make install && cd ..
- git clone --depth 1 --branch v0.12 https://github.com/xiph/opusfile.git && cd opusfile && ./autogen.sh && ./configure --prefix /usr && make && make install && cd ..
- git clone --depth 1 --branch 1.3.4 https://github.com/xiph/flac.git && cd flac && ./autogen.sh && ./configure --prefix /usr && make && make install && cd ..
- git clone --depth 1 https://gitlab.xiph.org/xiph/libopusenc.git && cd libopusenc && ./autogen.sh && ./configure --prefix /usr && make && make install && cd ..
- git clone --depth 1 https://github.com/mstorsjo/fdk-aac.git && cd fdk-aac && ./autogen.sh && ./configure --prefix /usr && make -j$(nproc) && make install && cd ..
- git clone --depth 1 https://git.gammaspectra.live/S.O.N.G/alac.git && cd alac && autoreconf -fi && ./configure --prefix /usr && make && make install && cd ..
- go test -p 1 -failfast -timeout 20m -cover -gcflags=-d=checkptr -v ./...
- go test -p 1 -failfast -timeout 20m -cover -gcflags=-d=checkptr -v -tags=disable_codec_libfdk_aac,disable_codec_lame,disable_codec_tta,disable_codec_libflac ./...
- go test -p 1 -failfast -timeout 20m -cover -gcflags=-d=checkptr -v -tags=disable_format_aac,disable_format_alac,disable_format_mp3,disable_format_opus,disable_format_tta,disable_format_vorbis ./...
- CGO_ENABLED=0 go test -p 1 -failfast -timeout 20m -cover -gcflags=-d=checkptr -v ./...
...