Merge branch 'pine64:main' into main
This commit is contained in:
commit
d448e6ac91
|
@ -0,0 +1,15 @@
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "docker"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
commit-message:
|
||||||
|
prefix: "chore(deps)"
|
||||||
|
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
commit-message:
|
||||||
|
prefix: "chore(ci)"
|
|
@ -0,0 +1,34 @@
|
||||||
|
name: Container image builder workflow
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: gh-ref-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push-images:
|
||||||
|
name: Build and push container image for PineBuds Pro SDK to GHCR.io
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout sources
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Build images
|
||||||
|
id: build
|
||||||
|
uses: redhat-actions/buildah-build@v2
|
||||||
|
with:
|
||||||
|
image: ${{ github.repository }}
|
||||||
|
context: /
|
||||||
|
tags: ${{ contains(github.ref_name, 'main') && 'latest' || github.ref_name }}-sdk
|
||||||
|
containerfiles: /Dockerfile
|
||||||
|
|
||||||
|
- name: Push container
|
||||||
|
uses: redhat-actions/push-to-registry@v2
|
||||||
|
with:
|
||||||
|
image: ${{ steps.build.outputs.image }}
|
||||||
|
tags: ${{ steps.build.outputs.tags }}
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -18,6 +18,7 @@
|
||||||
!.gitignore
|
!.gitignore
|
||||||
!.gitattributes
|
!.gitattributes
|
||||||
!.mailmap
|
!.mailmap
|
||||||
|
!.github
|
||||||
|
|
||||||
# Backup files
|
# Backup files
|
||||||
*~
|
*~
|
||||||
|
|
54
Dockerfile
54
Dockerfile
|
@ -1,23 +1,47 @@
|
||||||
FROM rust:1-slim-buster as programmer_build
|
FROM debian:bullseye-slim AS base
|
||||||
LABEL maintainer="Ben V. Brown <ralim@ralimtek.com>"
|
|
||||||
|
FROM base AS rust_build
|
||||||
|
|
||||||
|
LABEL org.opencontainers.image.authors = "Ben V. Brown <ralim@ralimtek.com>, Dom Rodriguez <shymega@shymega.org.uk>"
|
||||||
|
|
||||||
WORKDIR /usr/src
|
WORKDIR /usr/src
|
||||||
RUN apt-get update && apt-get install -y git pkg-config libudev-dev bc
|
ENV PATH="/root/.cargo/bin:$PATH"
|
||||||
RUN git clone https://github.com/Ralim/bestool.git
|
|
||||||
RUN cd /usr/src/bestool/bestool/ && cargo build --release
|
|
||||||
|
|
||||||
FROM debian:buster
|
RUN apt-get update \
|
||||||
LABEL maintainer="Ben V. Brown <ralim@ralimtek.com>"
|
&& apt-get install -y \
|
||||||
|
bc \
|
||||||
|
build-essential \
|
||||||
|
curl \
|
||||||
|
git \
|
||||||
|
libudev-dev \
|
||||||
|
pkg-config \
|
||||||
|
&& curl https://sh.rustup.rs -sSf | bash -s -- -y \
|
||||||
|
&& git clone https://github.com/Ralim/bestool.git \
|
||||||
|
&& cd /usr/src/bestool/bestool/ \
|
||||||
|
&& cargo build --release
|
||||||
|
|
||||||
|
FROM base as dev_env
|
||||||
|
|
||||||
RUN apt update && apt-get install -y make git bash curl tar bzip2 bc xxd ffmpeg
|
WORKDIR /usr/src
|
||||||
|
|
||||||
WORKDIR /src
|
RUN apt-get update \
|
||||||
# Git trust
|
&& apt-get install -y \
|
||||||
RUN git config --global --add safe.directory /src
|
bash \
|
||||||
# Grab arm compiler; we have to use this ancient one or else we get boot failures. Probably subtle link issues.
|
bc \
|
||||||
|
bzip2 \
|
||||||
|
curl \
|
||||||
|
ffmpeg \
|
||||||
|
git \
|
||||||
|
make \
|
||||||
|
tar \
|
||||||
|
xxd \
|
||||||
|
&& git config --global --add safe.directory /src \
|
||||||
|
&& mkdir -pv /src \
|
||||||
|
&& curl \
|
||||||
|
https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 | tar -xj -C /src/
|
||||||
|
|
||||||
RUN curl https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/9-2019q4/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2 | tar -xj
|
|
||||||
ENV PATH="${PATH}:/src/gcc-arm-none-eabi-9-2019-q4-major/bin"
|
ENV PATH="${PATH}:/src/gcc-arm-none-eabi-9-2019-q4-major/bin"
|
||||||
WORKDIR /usr/src
|
COPY --from=rust_build /usr/src/bestool/bestool/target/release/bestool /usr/local/bin/bestool
|
||||||
COPY --from=programmer_build /usr/src/bestool/bestool/target/release/bestool /usr/local/bin/bestool
|
|
||||||
COPY . /usr/src
|
COPY . /usr/src
|
||||||
|
|
||||||
|
ENTRYPOINT ["/bin/bash"]
|
||||||
|
|
|
@ -6,7 +6,6 @@ services:
|
||||||
privileged: true
|
privileged: true
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
command: /bin/bash
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/usr/src:Z
|
- ./:/usr/src:Z
|
||||||
- /dev/:/dev/
|
- /dev/:/dev/
|
||||||
|
|
Loading…
Reference in New Issue