remove e.g. #1255
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Bystro Perl Package | |
on: [push, pull_request] | |
jobs: | |
test-perl-package: | |
runs-on: ubuntu-latest | |
container: | |
image: perldocker/perl-tester:latest | |
steps: | |
- name: Perl version | |
run: perl -V | |
- name: Install system dependencies | |
shell: bash | |
run: apt-get install --no-install-recommends -y lz4 | |
# taken from https://github.com/docker-library/golang/blob/master/1.21/bullseye/Dockerfile | |
# NOTES: 1) updated paths are not usable by the step | |
# 2) if GOBIN is not set, which is the case here, `go install ...` installs binaries to ${HOME}/go/bin | |
- name: Install Go | |
shell: bash | |
run: | | |
set -eux; \ | |
arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \ | |
url=; \ | |
case "$arch" in \ | |
'amd64') \ | |
url='https://dl.google.com/go/go1.21.3.linux-amd64.tar.gz'; \ | |
sha256='1241381b2843fae5a9707eec1f8fb2ef94d827990582c7c7c32f5bdfbfd420c8'; \ | |
;; \ | |
'armel') \ | |
export GOARCH='arm' GOARM='5' GOOS='linux'; \ | |
;; \ | |
'armhf') \ | |
url='https://dl.google.com/go/go1.21.3.linux-armv6l.tar.gz'; \ | |
sha256='a1ddcaaf0821a12a800884c14cb4268ce1c1f5a0301e9060646f1e15e611c6c7'; \ | |
;; \ | |
'arm64') \ | |
url='https://dl.google.com/go/go1.21.3.linux-arm64.tar.gz'; \ | |
sha256='fc90fa48ae97ba6368eecb914343590bbb61b388089510d0c56c2dde52987ef3'; \ | |
;; \ | |
'i386') \ | |
url='https://dl.google.com/go/go1.21.3.linux-386.tar.gz'; \ | |
sha256='fb209fd070db500a84291c5a95251cceeb1723e8f6142de9baca5af70a927c0e'; \ | |
;; \ | |
'mips64el') \ | |
url='https://dl.google.com/go/go1.21.3.linux-mips64le.tar.gz'; \ | |
sha256='a569ffbc88b4e14cf2682f65cec950460665e4392b0d78b8868b4718c979bda8'; \ | |
;; \ | |
'ppc64el') \ | |
url='https://dl.google.com/go/go1.21.3.linux-ppc64le.tar.gz'; \ | |
sha256='3b0e10a3704f164a6e85e0377728ec5fd21524fabe4c925610e34076586d5826'; \ | |
;; \ | |
'riscv64') \ | |
url='https://dl.google.com/go/go1.21.3.linux-riscv64.tar.gz'; \ | |
sha256='67d14d3e513e505d1ec3ea34b55641c6c29556603c7899af94045c170c1c0f94'; \ | |
;; \ | |
's390x') \ | |
url='https://dl.google.com/go/go1.21.3.linux-s390x.tar.gz'; \ | |
sha256='4c78e2e6f4c684a3d5a9bdc97202729053f44eb7be188206f0627ef3e18716b6'; \ | |
;; \ | |
*) echo >&2 "error: unsupported architecture '$arch' (likely packaging update needed)"; exit 1 ;; \ | |
esac; \ | |
build=; \ | |
if [ -z "$url" ]; then \ | |
# https://github.com/golang/go/issues/38536#issuecomment-616897960 | |
build=1; \ | |
url='https://dl.google.com/go/go1.21.3.src.tar.gz'; \ | |
sha256='186f2b6f8c8b704e696821b09ab2041a5c1ee13dcbc3156a13adcf75931ee488'; \ | |
echo >&2; \ | |
echo >&2 "warning: current architecture ($arch) does not have a compatible Go binary release; will be building from source"; \ | |
echo >&2; \ | |
fi; \ | |
\ | |
wget -O go.tgz.asc "$url.asc"; \ | |
wget -O go.tgz "$url" --progress=dot:giga; \ | |
echo "$sha256 *go.tgz" | sha256sum -c -; \ | |
\ | |
# https://github.com/golang/go/issues/14739#issuecomment-324767697 | |
GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ | |
# https://www.google.com/linuxrepositories/ | |
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 'EB4C 1BFD 4F04 2F6D DDCC EC91 7721 F63B D38B 4796'; \ | |
# let's also fetch the specific subkey of that key explicitly that we expect "go.tgz.asc" to be signed by, just to make sure we definitely have it | |
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys '2F52 8D36 D67B 69ED F998 D857 78BD 6547 3CB3 BD13'; \ | |
gpg --batch --verify go.tgz.asc go.tgz; \ | |
gpgconf --kill all; \ | |
rm -rf "$GNUPGHOME" go.tgz.asc; \ | |
\ | |
tar -C /usr/local -xzf go.tgz; \ | |
rm go.tgz; | |
/usr/local/go/bin/go version | |
echo "/usr/local/go/bin" >> $GITHUB_PATH | |
echo "${HOME}/go/bin" >> $GITHUB_PATH | |
- name: Install one-off Bystro dependencies | |
shell: bash | |
run: | | |
go install github.com/bystrogenomics/[email protected] | |
cpm install -g https://github.com/bystrogenomics/msgpack-perl.git | |
cpm install -g --no-test MouseX::Getopt | |
git clone --depth 1 --recurse-submodules https://github.com/salortiz/LMDB_File.git \ | |
&& cd LMDB_File \ | |
&& cpanm --quiet . | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Bystro dependencies | |
run: | | |
cd perl | |
cpm install -g --show-build-log-on-failure $(dzil authordeps --missing) | |
cpm install -g --show-build-log-on-failure $(dzil listdeps --missing) | |
- name: Test Bystro | |
run: cd perl && dzil test --all | |
- name: Build Bystro tarball | |
run: cd perl && dzil build |