Skip to content

Commit

Permalink
Added Pants and removed deprecated Dockerfiles (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
sureshjoshi committed Jun 12, 2024
1 parent 39587f7 commit fda35a1
Show file tree
Hide file tree
Showing 24 changed files with 157 additions and 320 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/pants.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright 2020 Pants project contributors.
# Licensed under the Apache License, Version 2.0 (see LICENSE).

# See https://pants.readme.io/docs/using-pants-in-ci for tips on how to set up your CI with Pants.

name: Pants linting

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
env:
PANTS_CONFIG_FILES: pants.ci.toml
strategy:
matrix:
python-version: [3.9]

steps:
- uses: actions/checkout@v4

- uses: pantsbuild/actions/init-pants@v9
with:
# cache0 makes it easy to bust the cache if needed
gha-cache-key: cache0-py${{ matrix.python_version }}
named-caches-hash: ${{ hashFiles('build-support/lockfiles/*.lock') }}

- name: Bootstrap Pants
run: |
pants --version
- name: Lint
run: |
pants update-build-files --check lint ::
# - name: Upload pants log
# uses: actions/upload-artifact@v2
# with:
# name: pants-log
# path: .pants.d/pants.log
# if: always() # We want the log even on failures.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Pants workspace files
/.pants.d/
/dist/
/.pids
/.pants.workdir.file_lock*
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
# Dockerfiles
# Dockerfiles


## Deprecations/Removals

### TI-specific toolchains

My usage of TI-specific toolchains was dropped in favour of using Yocto or Buildroot directly, as the TI pre-packaged toolchains have a slow release/support cycle. I considered these Dockerfiles deprecated as of March 31, 2022 - and they were removed on June 12, 2024

### arm-none-eabi-gcc

Support was been dropped in favour of the similar (and more consistently named) `robotpajamas/gcc-arm-none-eabi` starting on March 31, 2022 - and the associated Dockerfile was removed on June 12, 2024.
24 changes: 0 additions & 24 deletions arm-none-eabi-gcc/Dockerfile

This file was deleted.

7 changes: 0 additions & 7 deletions arm-none-eabi-gcc/README.md

This file was deleted.

3 changes: 3 additions & 0 deletions buildroot/BUILD.pants
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
docker_image(
name="buildroot",
)
46 changes: 23 additions & 23 deletions buildroot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,30 @@ ARG DEBIAN_FRONTEND=non-interactive
USER root
RUN apt-get update \
&& apt-get install -y -qq --no-install-recommends \
bash \
bc \
binutils \
cpio \
build-essential \
bzip2 \
ca-certificates \
file \
gcc \
g++ \
git \
libncurses5-dev \
make \
nano \
patch \
perl \
python3 \
rsync \
sed \
tar \
unzip \
wget \
bash=5.1-2+deb11u1 \
bc=1.07.1-2+b2 \
binutils=2.35.2-2 \
cpio=2.13+dfsg-7.1~deb11u1 \
build-essential=12.9 \
bzip2=1.0.8-4 \
ca-certificates=20210119 \
file=1:5.39-3+deb11u1 \
g++=4:10.2.1-1 \
gcc=4:10.2.1-1 \
git=1:2.30.2-1+deb11u2 \
libncurses5-dev=6.2+20201114-2+deb11u2 \
make=4.3-4.1 \
nano=5.4-2+deb11u2 \
patch=2.7.6-7 \
perl=5.32.1-4+deb11u3 \
python3=3.9.2-3 \
rsync=3.2.3-4+deb11u1 \
sed=4.7-1 \
tar=1.34+dfsg-1+deb11u1 \
unzip=6.0-26+deb11u1 \
wget=1.21-1+deb11u1 \
&& rm -rf /var/lib/apt/lists/* \
&& wget -O- https://buildroot.org/downloads/${BUILDROOT_VERSION}.tar.gz | tar -xvz \
&& wget --progress=dot:giga -O- https://buildroot.org/downloads/${BUILDROOT_VERSION}.tar.gz | tar -xvz \
&& mv /${BUILDROOT_VERSION} /buildroot \
&& mkdir -p /app /app/cache /app/src /app/output \
&& chown -R armothy:armoire /app /buildroot
Expand Down
3 changes: 3 additions & 0 deletions gcc-arm-linux-gnueabihf/BUILD.pants
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
docker_image(
name="gcc-arm-linux-gnueabihf",
)
3 changes: 3 additions & 0 deletions gcc-arm-none-eabi/BUILD.pants
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
docker_image(
name="gcc-arm-none-eabi",
)
9 changes: 9 additions & 0 deletions gcf-cythonize/BUILD.pants
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
file(
name="entrypoint",
source="docker-entrypoint.sh",
)

docker_image(
name="gcf-cythonize",
dependencies=[":entrypoint"],
)
2 changes: 1 addition & 1 deletion gcf-cythonize/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN /opt/python/cp38-cp38/bin/python -m pip install cython==3.0a6 \
&& useradd -u 1000 -r -g cythonite cythonizer

USER cythonizer
COPY --chown=cythonizer:cythonite ./docker-entrypoint.sh /docker-entrypoint.sh
COPY --chown=cythonizer:cythonite gcf-cythonize/docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh

WORKDIR /app
Expand Down
3 changes: 3 additions & 0 deletions linux-kernel-builder/BUILD.pants
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
docker_image(
name="linux-kernel-builder",
)
21 changes: 11 additions & 10 deletions linux-kernel-builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@ ARG DEBIAN_FRONTEND=non-interactive
USER root
RUN apt-get update \
&& apt-get install -y -qq --no-install-recommends \
bash \
bc \
bison \
build-essential \
flex \
git \
libmpc-dev \
libncurses5-dev \
libssl-dev \
make \
bash=5.1-2+deb11u1 \
bc=1.07.1-2+b2 \
bison=2:3.7.5+dfsg-1 \
build-essential=12.9 \
ca-certificates=20210119 \
flex=2.6.4-8 \
git=1:2.30.2-1+deb11u2 \
libmpc-dev=1.2.0-1 \
libncurses5-dev=6.2+20201114-2+deb11u2 \
libssl-dev=1.1.1w-0+deb11u1 \
make=4.3-4.1 \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /app \
&& mkdir -p /ccache \
Expand Down
4 changes: 4 additions & 0 deletions pants.ci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[GLOBAL]
colors = true
dynamic_ui = false
pantsd = false
15 changes: 15 additions & 0 deletions pants.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[GLOBAL]
pants_version = "2.21.0"
pantsd = true
build_patterns = ["BUILD.pants", "BUILD"]

backend_packages = [
"pants.backend.docker",
"pants.backend.docker.lint.hadolint",
]

[python]
interpreter_constraints = [">=3.9,<4"]

[anonymous-telemetry]
enabled = false
83 changes: 0 additions & 83 deletions ti-arago/Dockerfile

This file was deleted.

7 changes: 0 additions & 7 deletions ti-arago/README.md

This file was deleted.

49 changes: 0 additions & 49 deletions ti-processor-sdk-linux-am335x/Dockerfile

This file was deleted.

7 changes: 0 additions & 7 deletions ti-processor-sdk-linux-am335x/README.md

This file was deleted.

7 changes: 0 additions & 7 deletions ti-processor-sdk-linux-am335x/prompts.sh

This file was deleted.

Loading

0 comments on commit fda35a1

Please sign in to comment.