mirror of
https://github.com/Retropex/docker-bitcoind.git
synced 2025-05-28 13:02:33 +02:00
Remove multi-arch config from PR action
This commit is contained in:
parent
5e18ac1804
commit
0c2925421d
32
.github/workflows/pull-request.yml
vendored
32
.github/workflows/pull-request.yml
vendored
@ -7,10 +7,7 @@ jobs:
|
||||
name: Build Bitcoind
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
# NOTE: qemu v3.1.1 used instead of currently newest v4.1.0, because v4 is **much** slower for aarch64, see:
|
||||
# https://github.com/meeDamian/docker-berkeleydb/commit/9e87d11314c2522726497f0c6059e61a31298e7f/checks
|
||||
env:
|
||||
QEMU_VERSION: v3.1.1
|
||||
DOCKER_BUILDKIT: 1
|
||||
|
||||
strategy:
|
||||
@ -22,42 +19,13 @@ jobs:
|
||||
- '0.18'
|
||||
- '0.19'
|
||||
|
||||
arch:
|
||||
- amd64
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1.0.0
|
||||
|
||||
- name: Register self-compiled qemu
|
||||
if: matrix.arch != 'amd64'
|
||||
run: docker run --rm --privileged meedamian/simple-qemu:${QEMU_VERSION}-${{matrix.arch}} -p yes
|
||||
|
||||
# Alter `Dockerfile` to reference used architecture/image combos explicitly. Places changed are:
|
||||
# * all `FROM` statements (ex. `FROM alpine…` -> `FROM arm64v8/alpine…`)
|
||||
# * BerkeleyDB `COPY` statement (`COPY --from=lncm/berkeleydb:db-4.8.30.NC` gets suffixed with ex. `-arm64`)
|
||||
# `sed` `--expression`s change it in the following way:
|
||||
# 1st: Matches all occurrences of `FROM alpine`, and injects arch prefix before `alpine`, ex: `arm64v8/alpine`
|
||||
# 2nd: Matches BDB version, and appends "-${{matrix.arch}}" to it (note that `&` represents match).
|
||||
- name: Change Dockerfile to use arch-specific base images
|
||||
if: matrix.arch != 'amd64'
|
||||
run: |
|
||||
CPU=${{matrix.arch}}
|
||||
if [[ "${CPU}" == "arm64" ]]; then
|
||||
CPU="arm64v8"
|
||||
fi
|
||||
|
||||
sed -i ${{matrix.subver}}/Dockerfile \
|
||||
-e "s|^FROM alpine|FROM $CPU/alpine|g" \
|
||||
-e "s|db-4.8.30.NC|&-${{matrix.arch}}|g"
|
||||
|
||||
# NOTE: Don't build 32-bit version of 0.17.1, as it's broken & non-essential:
|
||||
# https://github.com/bitcoin/bitcoin/pull/15950
|
||||
- name: Build Bitcoind
|
||||
if: matrix.subver != '0.17' || matrix.arch != 'arm32v7'
|
||||
run: docker build -t bitcoind ${{matrix.subver}}/
|
||||
|
||||
- name: Print Bitcoind version
|
||||
if: matrix.subver != '0.17' || matrix.arch != 'arm32v7'
|
||||
run: |
|
||||
docker run --rm --entrypoint=uname bitcoind -a
|
||||
docker run --rm bitcoind --version
|
||||
|
Loading…
Reference in New Issue
Block a user