mirror of
https://github.com/slint-ui/slint.git
synced 2025-09-29 21:34:50 +00:00
Add a C++ friendly docker build file
This takes an existing cross-friendly image and adds cmake, ninja, cargo, and rust. It also enables dlopen linkage for the compiler.
This commit is contained in:
parent
3bc95fd1cc
commit
83f25b200a
2 changed files with 31 additions and 1 deletions
11
.github/workflows/embedded_build.yaml
vendored
11
.github/workflows/embedded_build.yaml
vendored
|
@ -30,12 +30,21 @@ jobs:
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.CR_PAT }}
|
password: ${{ secrets.CR_PAT }}
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./docker/Dockerfile.${{ matrix.target }}
|
file: ./docker/Dockerfile.${{ matrix.target }}
|
||||||
push: true
|
push: true
|
||||||
tags: ghcr.io/slint-ui/slint/${{matrix.target}}:latest
|
tags: ghcr.io/slint-ui/slint/${{matrix.target}}:latest
|
||||||
|
- name: Build and push C++ image
|
||||||
|
uses: docker/build-push-action@v3
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./docker/Dockerfile.cpp-image
|
||||||
|
push: true
|
||||||
|
tags: ghcr.io/slint-ui/slint/${{matrix.target}}-cpp:latest
|
||||||
|
build-args:
|
||||||
|
- ARCH=${{matrix.target}}
|
||||||
|
|
||||||
build:
|
build:
|
||||||
needs: [build_containers]
|
needs: [build_containers]
|
||||||
|
|
21
docker/Dockerfile.cpp-image
Normal file
21
docker/Dockerfile.cpp-image
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
ARG arch
|
||||||
|
FROM ghcr.io/slint-ui/slint/$arch
|
||||||
|
ARG arch
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install --assume-yes gpg wget && \
|
||||||
|
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null && \
|
||||||
|
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null && \
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install --assume-yes cmake ninja-build make && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
||||||
|
ENV RUSTUP_HOME=/rust
|
||||||
|
ENV CARGO_HOME=/cargo
|
||||||
|
ENV PATH=/cargo/bin:/rust/bin:$PATH
|
||||||
|
|
||||||
|
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
|
||||||
|
RUN rustup target add $arch
|
||||||
|
|
||||||
|
ENV RUST_FONTCONFIG_DLOPEN=on
|
Loading…
Add table
Add a link
Reference in a new issue