Skip to content

Commit e922f1a

Browse files
authored
Merge pull request #3 from hvalev/armv7
Armv7
2 parents 4646409 + f9c1a63 commit e922f1a

File tree

3 files changed

+250
-9
lines changed

3 files changed

+250
-9
lines changed

.github/workflows/build.yml

+146-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- '**'
88

99
jobs:
10-
buildx:
10+
buildx-armv7:
1111
runs-on: ubuntu-20.04
1212
steps:
1313
-
@@ -47,19 +47,160 @@ jobs:
4747
with:
4848
context: .
4949
builder: ${{ steps.buildx.outputs.name }}
50-
platforms: linux/arm64,linux/amd64
51-
#linux/arm/v7,
50+
platforms: linux/arm/v7
5251
push: true
5352
tags: |
54-
hvalev/monero-node:${{ steps.get_version.outputs.version }}
55-
hvalev/monero-node:latest
53+
hvalev/monero-node:${{ steps.get_version.outputs.version }}-armv7
54+
hvalev/monero-node:latest-armv7
5655
cache-from: type=local,src=/tmp/.buildx-cache
5756
cache-to: type=local,dest=/tmp/.buildx-cache-new
5857
-
5958
name: Move cache
6059
run: |
6160
rm -rf /tmp/.buildx-cache
6261
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
62+
63+
buildx-arm64:
64+
runs-on: ubuntu-20.04
65+
steps:
66+
-
67+
name: Checkout
68+
uses: actions/checkout@v2
69+
-
70+
name: Get Version
71+
id: get_version
72+
uses: battila7/[email protected]
73+
-
74+
name: Set up QEMU
75+
uses: docker/setup-qemu-action@v1
76+
-
77+
name: Set up Docker Buildx
78+
id: buildx
79+
uses: docker/setup-buildx-action@v1
80+
-
81+
name: Cache Docker layers
82+
uses: actions/[email protected]
83+
with:
84+
path: /tmp/.buildx-cache
85+
key: ${{ runner.os }}-buildx-${{ github.sha }}
86+
restore-keys: |
87+
${{ runner.os }}-buildx-
88+
-
89+
name: Available platforms
90+
run: echo ${{ steps.buildx.outputs.platforms }}
91+
-
92+
name: Login to DockerHub
93+
uses: docker/login-action@v1
94+
with:
95+
username: ${{ secrets.DOCKERHUBUNAME }}
96+
password: ${{ secrets.DOCKERHUBTOKEN }}
97+
-
98+
name: Build and push
99+
uses: docker/build-push-action@v2
100+
with:
101+
context: .
102+
builder: ${{ steps.buildx.outputs.name }}
103+
platforms: linux/arm64
104+
push: true
105+
tags: |
106+
hvalev/monero-node:${{ steps.get_version.outputs.version }}-arm64
107+
hvalev/monero-node:latest-arm64
108+
cache-from: type=local,src=/tmp/.buildx-cache
109+
cache-to: type=local,dest=/tmp/.buildx-cache-new
110+
-
111+
name: Move cache
112+
run: |
113+
rm -rf /tmp/.buildx-cache
114+
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
115+
116+
buildx-amd64:
117+
runs-on: ubuntu-20.04
118+
steps:
119+
-
120+
name: Checkout
121+
uses: actions/checkout@v2
122+
-
123+
name: Get Version
124+
id: get_version
125+
uses: battila7/[email protected]
126+
-
127+
name: Set up QEMU
128+
uses: docker/setup-qemu-action@v1
129+
-
130+
name: Set up Docker Buildx
131+
id: buildx
132+
uses: docker/setup-buildx-action@v1
133+
-
134+
name: Cache Docker layers
135+
uses: actions/[email protected]
136+
with:
137+
path: /tmp/.buildx-cache
138+
key: ${{ runner.os }}-buildx-${{ github.sha }}
139+
restore-keys: |
140+
${{ runner.os }}-buildx-
141+
-
142+
name: Available platforms
143+
run: echo ${{ steps.buildx.outputs.platforms }}
144+
-
145+
name: Login to DockerHub
146+
uses: docker/login-action@v1
147+
with:
148+
username: ${{ secrets.DOCKERHUBUNAME }}
149+
password: ${{ secrets.DOCKERHUBTOKEN }}
150+
-
151+
name: Build and push
152+
uses: docker/build-push-action@v2
153+
with:
154+
context: .
155+
builder: ${{ steps.buildx.outputs.name }}
156+
platforms: linux/amd64
157+
push: true
158+
tags: |
159+
hvalev/monero-node:${{ steps.get_version.outputs.version }}-amd64
160+
hvalev/monero-node:latest-amd64
161+
cache-from: type=local,src=/tmp/.buildx-cache
162+
cache-to: type=local,dest=/tmp/.buildx-cache-new
163+
-
164+
name: Move cache
165+
run: |
166+
rm -rf /tmp/.buildx-cache
167+
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
168+
169+
collate:
170+
needs: [buildx-armv7,buildx-arm64,buildx-amd64]
171+
runs-on: ubuntu-20.04
172+
steps:
173+
-
174+
name: Checkout
175+
uses: actions/checkout@v2
176+
-
177+
name: Get Version
178+
id: get_version
179+
uses: battila7/[email protected]
180+
-
181+
name: Login to Docker Hub
182+
uses: docker/login-action@v1
183+
with:
184+
username: ${{ secrets.DOCKERHUBUNAME }}
185+
password: ${{ secrets.DOCKERHUBTOKEN }}
186+
-
187+
name: Create and push versioned multi-architecture image manifest
188+
env:
189+
IMAGE_TAG: ${{ steps.get_version.outputs.version }}
190+
run: |
191+
docker buildx imagetools create --tag hvalev/monero-node:${{ steps.get_version.outputs.version }} \
192+
hvalev/monero-node:${{ steps.get_version.outputs.version }}-armv7 \
193+
hvalev/monero-node:${{ steps.get_version.outputs.version }}-arm64 \
194+
hvalev/monero-node:${{ steps.get_version.outputs.version }}-amd64
195+
-
196+
name: Create and push latest multi-architecture image manifest
197+
env:
198+
IMAGE_TAG: latest
199+
run: |
200+
docker buildx imagetools create --tag hvalev/monero-node:latest \
201+
hvalev/monero-node:latest-armv7 \
202+
hvalev/monero-node:latest-arm64 \
203+
hvalev/monero-node:latest-amd64
63204
-
64205
name: Docker Hub Description
65206
uses: peter-evans/dockerhub-description@v2

.github/workflows/ci.yml

+102-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- '**'
88

99
jobs:
10-
buildx:
10+
buildx-armv7:
1111
runs-on: ubuntu-20.04
1212
steps:
1313
-
@@ -48,8 +48,107 @@ jobs:
4848
context: .
4949
file: ./Dockerfile
5050
builder: ${{ steps.buildx.outputs.name }}
51-
platforms: linux/arm64,linux/amd64
52-
#linux/arm/v7,
51+
platforms: linux/arm/v7
52+
cache-from: type=local,src=/tmp/.buildx-cache
53+
cache-to: type=local,dest=/tmp/.buildx-cache-new
54+
-
55+
name: Move cache
56+
run: |
57+
rm -rf /tmp/.buildx-cache
58+
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
59+
60+
buildx-arm64:
61+
runs-on: ubuntu-20.04
62+
steps:
63+
-
64+
name: Checkout
65+
uses: actions/checkout@v2
66+
-
67+
name: Get Version
68+
id: get_version
69+
uses: battila7/[email protected]
70+
-
71+
name: Set up QEMU
72+
uses: docker/setup-qemu-action@v1
73+
-
74+
name: Set up Docker Buildx
75+
id: buildx
76+
uses: docker/setup-buildx-action@v1
77+
-
78+
name: Cache Docker layers
79+
uses: actions/[email protected]
80+
with:
81+
path: /tmp/.buildx-cache
82+
key: ${{ runner.os }}-buildx-${{ github.sha }}
83+
restore-keys: |
84+
${{ runner.os }}-buildx-
85+
-
86+
name: Available platforms
87+
run: echo ${{ steps.buildx.outputs.platforms }}
88+
-
89+
name: Login to DockerHub
90+
uses: docker/login-action@v1
91+
with:
92+
username: ${{ secrets.DOCKERHUBUNAME }}
93+
password: ${{ secrets.DOCKERHUBTOKEN }}
94+
-
95+
name: Build only
96+
uses: docker/build-push-action@v2
97+
with:
98+
context: .
99+
file: ./Dockerfile
100+
builder: ${{ steps.buildx.outputs.name }}
101+
platforms: linux/arm64
102+
cache-from: type=local,src=/tmp/.buildx-cache
103+
cache-to: type=local,dest=/tmp/.buildx-cache-new
104+
-
105+
name: Move cache
106+
run: |
107+
rm -rf /tmp/.buildx-cache
108+
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
109+
110+
buildx-amd64:
111+
runs-on: ubuntu-20.04
112+
steps:
113+
-
114+
name: Checkout
115+
uses: actions/checkout@v2
116+
-
117+
name: Get Version
118+
id: get_version
119+
uses: battila7/[email protected]
120+
-
121+
name: Set up QEMU
122+
uses: docker/setup-qemu-action@v1
123+
-
124+
name: Set up Docker Buildx
125+
id: buildx
126+
uses: docker/setup-buildx-action@v1
127+
-
128+
name: Cache Docker layers
129+
uses: actions/[email protected]
130+
with:
131+
path: /tmp/.buildx-cache
132+
key: ${{ runner.os }}-buildx-${{ github.sha }}
133+
restore-keys: |
134+
${{ runner.os }}-buildx-
135+
-
136+
name: Available platforms
137+
run: echo ${{ steps.buildx.outputs.platforms }}
138+
-
139+
name: Login to DockerHub
140+
uses: docker/login-action@v1
141+
with:
142+
username: ${{ secrets.DOCKERHUBUNAME }}
143+
password: ${{ secrets.DOCKERHUBTOKEN }}
144+
-
145+
name: Build only
146+
uses: docker/build-push-action@v2
147+
with:
148+
context: .
149+
file: ./Dockerfile
150+
builder: ${{ steps.buildx.outputs.name }}
151+
platforms: linux/amd64
53152
cache-from: type=local,src=/tmp/.buildx-cache
54153
cache-to: type=local,dest=/tmp/.buildx-cache-new
55154
-

Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ RUN apt-get install libgtest-dev -y && \
1919
make -j4 && \
2020
mv libg* /usr/lib/
2121

22+
# git config --global http.postBuffer 1048576000 && \
2223
RUN apt-get install git -y && \
23-
git clone -b v${MONERO_V} --recursive https://github.com/monero-project/monero && \
24+
git clone -b v${MONERO_V} --recursive --depth=1 https://github.com/monero-project/monero && \
2425
cd monero && git submodule init && git submodule update && \
2526
make -j2
2627

0 commit comments

Comments
 (0)