Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
DanNixon committed Aug 12, 2023
0 parents commit 8b04912
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: CI

on:
push:
branches:
- main
tags:
- 'v*'
pull_request:

jobs:
container-image:
name: Build and push container image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3

- name: Derive tags
run: |
echo 'tags<<EOF' >> $GITHUB_ENV
if [[ "${{ github.ref_type }}" == 'tag' ]]; then
echo "latest ${{ github.ref_name }} ${{ github.sha }}" >> $GITHUB_ENV
else
echo "${{ github.ref_name }} ${{ github.sha }}" >> $GITHUB_ENV
fi
echo 'EOF' >> $GITHUB_ENV
- name: Build container image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: esp-rs-distrobox
tags: "${{ env.tags }}"
containerfiles: Containerfile
oci: true

- name: Push image to GHCR
if: ${{ github.ref_name == 'main' || github.ref_type == 'tag' }}
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ghcr.io/dannixon
username: ${{ github.repository_owner }}
password: ${{ github.token }}

19 changes: 19 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM ubuntu:22.04

RUN apt-get update && \
apt-get install --yes \
clang \
curl \
libxml2 \
python3.10 \
python3.10-venv \
unzip

RUN curl -L 'https://github.com/esp-rs/espup/releases/latest/download/espup-x86_64-unknown-linux-gnu' -o /usr/bin/espup && \
chmod a+x /usr/bin/espup

RUN curl -L 'https://github.com/esp-rs/embuild/releases/download/ldproxy-v0.3.2/ldproxy-x86_64-unknown-linux-gnu.zip' -o ldproxy.zip && \
unzip ldproxy.zip ldproxy && \
rm ldproxy.zip && \
chmod a+x ldproxy && \
mv ldproxy /usr/bin/ldproxy
5 changes: 5 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# esp-rs-distrobox [![CI](https://github.com/DanNixon/esp-rs-distrobox/actions/workflows/ci.yml/badge.svg)](https://github.com/DanNixon/esp-rs-distrobox/actions/workflows/ci.yml)

Container images containing [esp-rs](https://github.com/esp-rs) related tooling, intended for use with [Distrobox](https://github.com/89luca89/distrobox).

Created as a result of much annoyance trying to get the ESP IDF to build in Nix and (to a much lesser extent) the fact that some tools were not yet packaged.

Included is:
- clang
- Python + venv
- [espup](https://github.com/esp-rs/espup)
- [ldproxy](https://github.com/esp-rs/embuild/tree/master/ldproxy)

0 comments on commit 8b04912

Please sign in to comment.