File tree Expand file tree Collapse file tree 5 files changed +46
-9
lines changed
.changelog/unreleased/bug-fixes Expand file tree Collapse file tree 5 files changed +46
-9
lines changed Original file line number Diff line number Diff line change 1+ - ` [docker] ` Bring back ` arm64 ` build target
2+ ([ \# 234] ( https://github.com/cometbft/cometbft-db/issues/234 ) )
Original file line number Diff line number Diff line change 2020 - name : Check if Docker image exists
2121 id : check
2222 run : |
23- if docker manifest inspect cometbft/cometbft-db-testing:v1.0.2 &>/dev/null; then
23+ if docker manifest inspect cometbft/cometbft-db-testing:v1.0.3 &>/dev/null; then
2424 echo "exists=true" >> $GITHUB_OUTPUT
2525 else
2626 echo "exists=false" >> $GITHUB_OUTPUT
3030 needs : check-container
3131 if : needs.check-container.outputs.exists == 'true'
3232 runs-on : ubuntu-latest
33- container : cometbft/cometbft-db-testing:v1.0.2
33+ container : cometbft/cometbft-db-testing:v1.0.3
3434 steps :
3535 - uses : actions/checkout@v4
3636
@@ -61,12 +61,23 @@ jobs:
6161 with :
6262 driver : docker
6363
64- - name : Build Docker image
64+ - name : Set up QEMU
65+ uses : docker/setup-qemu-action@v3
66+
67+ - name : Build Docker image (arm64) to ensure it works
68+ uses : docker/build-push-action@v6
69+ with :
70+ context : ./tools
71+ file : ./tools/Dockerfile.arm64
72+ platforms : linux/arm64
73+
74+ - name : Build Docker image (amd64) to be used in the next step
6575 uses : docker/build-push-action@v6
6676 with :
6777 context : ./tools
6878 file : ./tools/Dockerfile
6979 tags : " cometbft/cometbft-db-testing:latest"
80+ platforms : linux/amd64
7081 load : true
7182
7283 - name : test & coverage report creation
Original file line number Diff line number Diff line change 3939 username : ${{ secrets.DOCKERHUB_USERNAME }}
4040 password : ${{ secrets.DOCKERHUB_TOKEN }}
4141
42- - name : Publish to Docker Hub
42+ - name : Publish to Docker Hub (amd64)
4343 uses : docker/build-push-action@v6
4444 with :
4545 context : ./tools
4949 tags : |
5050 cometbft/cometbft-db-testing:latest
5151 cometbft/cometbft-db-testing:${{ github.event.inputs.refName }}
52+
53+ - name : Publish to Docker Hub (arm64)
54+ uses : docker/build-push-action@v6
55+ with :
56+ context : ./tools
57+ file : ./tools/Dockerfile.arm64
58+ platforms : linux/arm64
59+ push : true
60+ tags : |
61+ cometbft/cometbft-db-testing:latest
62+ cometbft/cometbft-db-testing:${{ github.event.inputs.refName }}
Original file line number Diff line number Diff line change 1010# PLEASE BUMP THE VERSION OF THE IMAGE IN `.github/workflows/ci.yml` WHEN YOU
1111# MODIFY THIS FILE.
1212
13- FROM golang:1.23.5 AS build
13+ FROM golang:1.23.5
1414
1515ENV LD_LIBRARY_PATH=/usr/local/lib
1616
1717RUN apt update \
1818 && apt install -y \
1919 libbz2-dev libgflags-dev libsnappy-dev libzstd-dev zlib1g-dev liblz4-dev \
20- make tar wget build-essential \
20+ make tar wget build-essential g++ cmake \
2121 libleveldb-dev libleveldb1d
2222
23- FROM build AS install
2423ARG ROCKSDB=9.8.4
2524
26- # Install Rocksdb
25+ # Install RocksDB
2726RUN \
2827 wget -q https://github.com/facebook/rocksdb/archive/refs/tags/v${ROCKSDB}.tar.gz \
2928 && tar -zxf v${ROCKSDB}.tar.gz \
3029 && cd rocksdb-${ROCKSDB} \
3130 && DEBUG_LEVEL=0 make -j4 shared_lib \
3231 && make install-shared \
33- && ldconfig \
3432 && cd .. \
3533 && rm -rf v${ROCKSDB}.tar.gz rocksdb-${ROCKSDB}
Original file line number Diff line number Diff line change 1+ # This file defines the container image used to build and test tm-db in CI.
2+ # The CI workflows use the latest tag of cometbft/cometbft-db-testing built
3+ # from these settings.
4+ #
5+ # The jobs defined in the Build & Push workflow will build and update the image
6+ # when changes to this file are merged. If you have other changes that require
7+ # updates here, merge the changes here first and let the image get updated (or
8+ # push a new version manually) before PRs that depend on them.
9+
10+ # PLEASE BUMP THE VERSION OF THE IMAGE IN `.github/workflows/ci.yml` WHEN YOU
11+ # MODIFY THIS FILE.
12+
13+ FROM golang:1.23.5
14+
15+ RUN apt update && apt install -y libleveldb-dev libleveldb1d
You can’t perform that action at this time.
0 commit comments