Skip to content

Commit

Permalink
Switch to uClibc
Browse files Browse the repository at this point in the history
  • Loading branch information
navrocky committed Mar 5, 2024
1 parent a936bd7 commit 97cae16
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: ./build.sh
run: ./build-uclibc.sh

- name: Upload Artifact
uses: actions/upload-artifact@v2
Expand Down
File renamed without changes.
22 changes: 22 additions & 0 deletions Dockerfile.uclibc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM navrocky/buildroot-uclibc-toolchain:2023.11.1

RUN set -x && \
apt-get update && \
apt-get -y install cmake make python3-pip && \
pip install conan --break-system-packages

RUN conan profile detect --force

COPY conanfile.txt /sources/

RUN set -x && \
mkdir -p /build && \
cd /build && \
conan install /sources --output-folder=. --build=missing

COPY . /sources/

RUN set -x && \
cd /build && \
cmake /sources -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE=Release && \
cmake --build .
2 changes: 1 addition & 1 deletion build.sh → build-musl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

IMAGE_NAME=muenvsubst-build

docker build --progress plain --tag ${IMAGE_NAME} .
docker build --progress plain --tag ${IMAGE_NAME} -f Dockerfile.musl .

id=$(docker create ${IMAGE_NAME})
mkdir -p dist
Expand Down
10 changes: 10 additions & 0 deletions build-uclibc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

IMAGE_NAME=muenvsubst-build

docker build --progress plain --tag ${IMAGE_NAME} -f Dockerfile.uclibc .

id=$(docker create ${IMAGE_NAME})
mkdir -p dist
docker cp $id:/build/muenvsubst ./dist/
docker rm -v $id

0 comments on commit 97cae16

Please sign in to comment.