From 6663906ee463826d77dccf4bdc297cfb15723498 Mon Sep 17 00:00:00 2001 From: Jason Pell Date: Fri, 22 Mar 2024 12:50:59 +1100 Subject: [PATCH] provide docker file for github builds with cmake --- .github/workflows/build.yml | 2 +- Dockerfile | 18 ++++++++++++++++++ Makefile | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 Dockerfile diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 13d50ca..8b77909 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-22.04 container: - image: ballaswag/guppydev:latest + image: pellcorp/guppydev:latest options: --user 1001 env: diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6505996 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM ubuntu:22.04 + +RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ + apt-get install -y --no-install-recommends wget build-essential cmake git ca-certificates && update-ca-certificates && \ + apt-get clean all && \ + apt-get -y autoremove + +RUN mkdir /toolchains && \ + wget "https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu.tar.xz?revision=972019b5-912f-4ae6-864a-f61f570e2e7e&rev=972019b5912f4ae6864af61f570e2e7e&hash=A973F165C6D012E0738F90FB4A0C2BA7" -O /tmp/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu.tar.xz && \ + wget https://github.com/ballaswag/k1-discovery/releases/download/1.0.0/mips-gcc720-glibc229.tar.gz -O /tmp/mips-gcc720-glibc229.tar.gz && \ + tar -Jxf /tmp/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu.tar.xz -C /toolchains && \ + tar -zxf /tmp/mips-gcc720-glibc229.tar.gz -C /toolchains && \ + rm /tmp/mips-gcc720-glibc229.tar.gz && \ + rm /tmp/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu.tar.xz + +ENV PATH=/toolchains/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu/bin:/toolchains/mips-gcc720-glibc229/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +WORKDIR /toolchains +CMD ["/bin/bash"] diff --git a/Makefile b/Makefile index 1fce29d..4f78f40 100644 --- a/Makefile +++ b/Makefile @@ -102,7 +102,7 @@ libhv.a: libspdlog.a: @mkdir -p $(SPDLOG_DIR)/build - @cmake -B $(SPDLOG_DIR)/build -S $(SPDLOG_DIR)/ + @cmake -B $(SPDLOG_DIR)/build -S $(SPDLOG_DIR)/ -DCMAKE_CXX_COMPILER=$(CXX) $(MAKE) -C $(SPDLOG_DIR)/build -j$(nproc) wpaclient: