Skip to content

Commit 0072c2e

Browse files
authored
Merge pull request #2 from texthtml/armv6
compile for arm/v6 too
2 parents 9d3d7a3 + 69b0b5c commit 0072c2e

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
branches:
66
- main
7+
pull_request:
8+
branches:
9+
- main
710

811
jobs:
912
docker:
@@ -32,8 +35,8 @@ jobs:
3235
uses: docker/build-push-action@v2
3336
with:
3437
context: .
35-
platforms: linux/amd64,linux/arm64,linux/arm
36-
push: true
38+
platforms: linux/arm64,linux/arm/v6
39+
push: ${{ github.ref == 'refs/heads/master' }}
3740
tags: texthtml/midi-synthesizer-autoconnect:latest
3841
cache-from: type=gha
3942
cache-to: type=gha,mode=max

Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
FROM rust:1.54-bullseye AS builder
1+
FROM alpine AS builder
22

3-
WORKDIR /app
3+
RUN apk add cargo --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/
4+
5+
RUN apk add alsa-lib-dev
46

5-
RUN apt-get update && apt-get install -y libasound2-dev
7+
WORKDIR /app
68

79
ADD .cargo /app/.cargo/
810
ADD Cargo.toml Cargo.lock .cargo /app/
@@ -16,11 +18,9 @@ ADD src /app/src/
1618
RUN touch src/main.rs && \
1719
cargo build --release --offline
1820

19-
FROM debian:bullseye
21+
FROM alpine
2022

21-
RUN apt-get update && \
22-
apt-get install -y libasound2 && \
23-
rm -rf /var/lib/apt/lists/*
23+
RUN apk add --no-cache libgcc alsa-lib
2424

2525
COPY --from=builder /app/target/release/midi-synthesizer-autoconnect /usr/bin/
2626

0 commit comments

Comments
 (0)