--- kind: pipeline type: docker name: from-repo-amd64 platform: os: linux arch: amd64 environment: GOPROXY: direct GOARCH: amd64 GOAMD64: v3 GOOS: linux CFLAGS: "-march=native -Ofast" LDFLAGS: "-flto" steps: - name: music-samples image: git.gammaspectra.live/s.o.n.g/music-samples:linux-amd64 pull: if-not-exists commands: - mkdir -p resources/samples/ - cp -rvf /samples/* resources/samples/ - name: test-repo-cgo-full image: golang:1.20-alpine depends_on: - music-samples commands: - apk update - apk add --no-cache git gcc g++ musl-dev bash autoconf automake cmake make libtool gettext openssl-dev flac-dev opus-dev opusfile-dev libopusenc-dev libvorbis-dev libsamplerate-dev lame-dev libebur128-dev fdk-aac-dev --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community - 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 ./... --- kind: pipeline type: docker name: from-source-amd64 platform: os: linux arch: amd64 environment: GOPROXY: direct GOARCH: amd64 GOAMD64: v3 GOOS: linux CFLAGS: "-march=native -Ofast" LDFLAGS: "-flto" PKG_CONFIG_PATH: "/drone/src/build_deps/lib/pkgconfig" LD_LIBRARY_PATH: "/drone/src/build_deps/lib" CGO_CFLAGS: "-I/drone/src/build_deps/include" CGO_LDFLAGS: "-L/drone/src/build_deps/lib" workspace: path: /drone/src steps: - name: music-samples image: git.gammaspectra.live/s.o.n.g/music-samples:linux-amd64 pull: if-not-exists commands: - mkdir -p resources/samples/ - cp -rvf /samples/* resources/samples/ - name: build-sources image: alpine commands: - apk update - apk add --no-cache git gcc g++ musl-dev bash autoconf automake cmake make libtool gettext openssl-dev - cd /tmp - 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=/drone/src/build_deps && 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 /drone/src/build_deps && 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 /drone/src/build_deps && make && make install && cd .. - git clone --depth 1 --branch v1.3.5 https://gitlab.xiph.org/xiph/ogg.git && cd ogg && ./autogen.sh && ./configure --prefix /drone/src/build_deps && make && make install && cd .. - git clone --branch master https://gitlab.xiph.org/xiph/opus.git && cd opus && ./autogen.sh && ./configure --enable-float-approx --prefix /drone/src/build_deps && make && make install && cd .. - git clone --depth 1 --branch v0.12 https://gitlab.xiph.org/xiph/opusfile.git && cd opusfile && ./autogen.sh && ./configure --prefix /drone/src/build_deps && make && make install && cd .. - git clone --depth 1 --branch v1.3.7 https://gitlab.xiph.org/xiph/vorbis.git && cd vorbis && ./autogen.sh && ./configure --prefix /drone/src/build_deps && make && make install && cd .. - git clone --depth 1 --branch 1.4.2 https://gitlab.xiph.org/xiph/flac.git && cd flac && ./autogen.sh && ./configure --prefix /drone/src/build_deps && make && make install && cd .. - git clone --depth 1 --branch master https://gitlab.xiph.org/xiph/libopusenc.git && cd libopusenc && ./autogen.sh && ./configure --prefix /drone/src/build_deps && make && make install && cd .. - git clone --depth 1 --branch master https://github.com/mstorsjo/fdk-aac.git && cd fdk-aac && ./autogen.sh && ./configure --prefix /drone/src/build_deps && make -j$(nproc) && make install && cd .. - git clone --depth 1 --branch master https://git.gammaspectra.live/S.O.N.G/alac.git && cd alac && autoreconf -fi && ./configure --prefix /drone/src/build_deps && make && make install && cd .. - name: test-cgo-full image: golang:1.20-alpine depends_on: - music-samples - build-sources commands: - apk update - apk add --no-cache git gcc musl-dev pkgconfig - go test -p 1 -failfast -timeout 20m -cover -gcflags=-d=checkptr -v ./... - name: test-cgo-disable-codecs image: golang:1.20-alpine depends_on: - music-samples - build-sources commands: - apk update - apk add --no-cache git gcc musl-dev pkgconfig - 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,disable_codec_libvorbis ./... - name: test-cgo-disable-formats image: golang:1.20-alpine volumes: - name: deps path: /drone/src/build_deps depends_on: - music-samples - build-sources commands: - apk update - apk add --no-cache git gcc musl-dev pkgconfig - 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 ./... - name: test-nocgo image: golang:1.20-alpine depends_on: - music-samples commands: - apk update - apk add --no-cache git - CGO_ENABLED=0 go test -p 1 -failfast -timeout 20m -cover -gcflags=-d=checkptr -v ./... --- kind: pipeline type: docker name: from-source-arm64 platform: os: linux arch: arm64 environment: GOPROXY: direct GOARCH: arm64 GOOS: linux CFLAGS: "-march=native -Ofast" LDFLAGS: "-flto" PKG_CONFIG_PATH: "/drone/src/build_deps/lib/pkgconfig" LD_LIBRARY_PATH: "/drone/src/build_deps/lib" CGO_CFLAGS: "-I/drone/src/build_deps/include" CGO_LDFLAGS: "-L/drone/src/build_deps/lib" workspace: path: /drone/src steps: - name: music-samples image: git.gammaspectra.live/s.o.n.g/music-samples:linux-arm64 pull: if-not-exists commands: - mkdir -p resources/samples/ - cp -rvf /samples/* resources/samples/ - name: build-sources image: alpine volumes: - name: deps path: /drone/src/build_deps commands: - apk update - apk add --no-cache git gcc g++ musl-dev bash autoconf automake cmake make libtool gettext openssl-dev - cd /tmp - 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=/drone/src/build_deps && 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 /drone/src/build_deps && 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 /drone/src/build_deps && make && make install && cd .. - git clone --depth 1 --branch v1.3.5 https://gitlab.xiph.org/xiph/ogg.git && cd ogg && ./autogen.sh && ./configure --prefix /drone/src/build_deps && make && make install && cd .. - git clone --branch master https://gitlab.xiph.org/xiph/opus.git && cd opus && ./autogen.sh && ./configure --enable-float-approx --prefix /drone/src/build_deps && make && make install && cd .. - git clone --depth 1 --branch v0.12 https://gitlab.xiph.org/xiph/opusfile.git && cd opusfile && ./autogen.sh && ./configure --prefix /drone/src/build_deps && make && make install && cd .. - git clone --depth 1 --branch v1.3.7 https://gitlab.xiph.org/xiph/vorbis.git && cd vorbis && ./autogen.sh && ./configure --prefix /drone/src/build_deps && make && make install && cd .. - git clone --depth 1 --branch 1.4.2 https://gitlab.xiph.org/xiph/flac.git && cd flac && ./autogen.sh && ./configure --prefix /drone/src/build_deps && make && make install && cd .. - git clone --depth 1 --branch master https://gitlab.xiph.org/xiph/libopusenc.git && cd libopusenc && ./autogen.sh && ./configure --prefix /drone/src/build_deps && make && make install && cd .. - git clone --depth 1 --branch master https://github.com/mstorsjo/fdk-aac.git && cd fdk-aac && ./autogen.sh && ./configure --prefix /drone/src/build_deps && make -j$(nproc) && make install && cd .. - git clone --depth 1 --branch master https://git.gammaspectra.live/S.O.N.G/alac.git && cd alac && autoreconf -fi && ./configure --prefix /drone/src/build_deps && make && make install && cd .. - name: test-cgo-full image: golang:1.20-alpine volumes: - name: deps path: /drone/src/build_deps depends_on: - music-samples - build-sources commands: - apk update - apk add --no-cache git gcc musl-dev pkgconfig - go test -p 1 -failfast -timeout 20m -cover -gcflags=-d=checkptr -v ./... - name: test-cgo-disable-codecs image: golang:1.20-alpine volumes: - name: deps path: /drone/src/build_deps depends_on: - music-samples - build-sources commands: - apk update - apk add --no-cache git gcc musl-dev pkgconfig - 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,disable_codec_libvorbis ./... - name: test-cgo-disable-formats image: golang:1.20-alpine volumes: - name: deps path: /drone/src/build_deps depends_on: - music-samples - build-sources commands: - apk update - apk add --no-cache git gcc musl-dev pkgconfig - 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 ./... - name: test-nocgo image: golang:1.20-alpine depends_on: - music-samples commands: - apk update - apk add --no-cache git - CGO_ENABLED=0 go test -p 1 -failfast -timeout 20m -cover -gcflags=-d=checkptr -v ./... ...