Bump actions/download-artifact from 1.0.0 to 4.1.7 in /.github/workflows #189
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 lnd on push, or PR to master | |
env: | |
APP: lnd | |
on: | |
push: | |
branches: [ 'master' ] | |
pull_request: | |
branches: [ 'master' ] | |
jobs: | |
build: | |
name: Build lnd | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
ver: | |
- '0.5' | |
- '0.6' | |
- '0.7' | |
- '0.8' | |
- '0.9' | |
- '0.10' | |
- '0.11' | |
- '0.12' | |
- '0.13' | |
arch: | |
- amd64 | |
- arm32v6 | |
- arm32v7 | |
- arm64v8 | |
env: | |
QEMU_VERSION: v5.1.0 | |
DOCKER_BUILDKIT: 1 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Verify all patches apply cleanly | |
run: ./scripts/verify-patches.sh "${{ matrix.ver }}" | |
# GOARCH => arm|arm64 | |
# GOARM => 6|7 | |
- name: Setup Go environment | |
if: matrix.arch != 'amd64' | |
env: | |
ARCH: ${{ matrix.arch }} | |
run: | | |
GOARCH="${ARCH%32v?}" | |
echo "GOARCH=${GOARCH%v8}" >>"$GITHUB_ENV" | |
echo "GOARM=$(echo "$ARCH" | sed -En 's|^arm32v([6-7])$|\1|p')" >>"$GITHUB_ENV" | |
- name: Build ${{ env.APP }} | |
run: > | |
docker build --no-cache "${{ matrix.ver }}/" | |
--build-arg "ARCH=${{ matrix.arch }}" | |
--build-arg "GOARCH=$GOARCH" | |
--build-arg "GOARM=$GOARM" | |
--tag "$APP" | |
- name: Show built image details | |
run: docker images "$APP" | |
- name: Register self-compiled qemu | |
if: matrix.arch != 'amd64' | |
env: | |
ARCH: ${{ matrix.arch }} | |
run: docker run --rm --privileged "meedamian/simple-qemu:$QEMU_VERSION-${ARCH%32v6}" -p yes | |
- name: Run sanity checks | |
env: | |
DIR: /usr/local/bin | |
run: | | |
run() { | |
ENTRYPOINT="${1:-$APP}"; shift; | |
ARGS=${*:-"--version"} | |
printf "\n$ %s %s\n" "$ENTRYPOINT" "$ARGS" | |
docker run --rm --entrypoint "$ENTRYPOINT" "$APP" $ARGS | |
printf "\n" | |
} | |
docker inspect "$APP" | jq '.' | |
printf "\n" | |
run lnd | |
run lncli | |
run uname -a | |
run cat /etc/os-release | |
run sha256sum "$DIR/lnd" "$DIR/lncli" | |
docker run --rm --entrypoint=sh -u=root "$APP" -c "apk add --no-cache file && file $DIR/lnd $DIR/lncli" |