mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-16 18:12:07 +00:00
Merge branch 'master' into bug-1821
This commit is contained in:
commit
f02c6c49ee
6
.github/workflows/main_matrix.yml
vendored
6
.github/workflows/main_matrix.yml
vendored
@ -130,24 +130,26 @@ jobs:
|
|||||||
release/meshtasticd_linux_amd64
|
release/meshtasticd_linux_amd64
|
||||||
release/device-*.sh
|
release/device-*.sh
|
||||||
release/device-*.bat
|
release/device-*.bat
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
- name: Docker login
|
- name: Docker login
|
||||||
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: meshtastic
|
username: meshtastic
|
||||||
password: ${{ secrets.DOCKER_TOKEN }}
|
password: ${{ secrets.DOCKER_TOKEN }}
|
||||||
|
|
||||||
- name: Docker setup
|
- name: Docker setup
|
||||||
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Docker build and push
|
- name: Docker build and push
|
||||||
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: meshtastic/device:simulator
|
tags: meshtastic/device-simulator:latest
|
||||||
|
|
||||||
after-checks:
|
after-checks:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
1
.semgrepignore
Normal file
1
.semgrepignore
Normal file
@ -0,0 +1 @@
|
|||||||
|
.github/workflows/main_matrix.yml
|
48
Dockerfile
48
Dockerfile
@ -1,15 +1,41 @@
|
|||||||
FROM debian:bullseye-slim AS builder
|
FROM debian:bullseye-slim AS builder
|
||||||
RUN apt-get update
|
|
||||||
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install wget python3 g++ zip python3-venv git vim
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
RUN wget https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py -O get-platformio.py; chmod +x get-platformio.py
|
ENV TZ=Etc/UTC
|
||||||
RUN python3 get-platformio.py
|
|
||||||
RUN git clone https://github.com/meshtastic/firmware --recurse-submodules
|
# http://bugs.python.org/issue19846
|
||||||
RUN cd firmware
|
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
|
||||||
RUN chmod +x ./firmware/bin/build-native.sh
|
ENV LANG C.UTF-8
|
||||||
RUN . ~/.platformio/penv/bin/activate; cd firmware; sh ./bin/build-native.sh
|
|
||||||
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||||
|
|
||||||
|
# Install build deps
|
||||||
|
USER root
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get -y install wget python3 g++ zip python3-venv git vim ca-certificates
|
||||||
|
|
||||||
|
# create a non-priveleged user & group
|
||||||
|
RUN groupadd -g 1000 mesh && useradd -ml -u 1000 -g 1000 mesh
|
||||||
|
|
||||||
|
USER mesh
|
||||||
|
RUN wget https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py -qO /tmp/get-platformio.py && \
|
||||||
|
chmod +x /tmp/get-platformio.py && \
|
||||||
|
python3 /tmp/get-platformio.py && \
|
||||||
|
git clone https://github.com/meshtastic/firmware --recurse-submodules /tmp/firmware && \
|
||||||
|
cd /tmp/firmware && \
|
||||||
|
chmod +x /tmp/firmware/bin/build-native.sh && \
|
||||||
|
source ~/.platformio/penv/bin/activate && \
|
||||||
|
./bin/build-native.sh
|
||||||
|
|
||||||
FROM frolvlad/alpine-glibc
|
FROM frolvlad/alpine-glibc
|
||||||
WORKDIR /root/
|
|
||||||
COPY --from=builder /firmware/release/meshtasticd_linux_amd64 ./
|
RUN apk --update add --no-cache g++ shadow && \
|
||||||
RUN apk --update add --no-cache g++
|
groupadd -g 1000 mesh && useradd -ml -u 1000 -g 1000 mesh
|
||||||
|
|
||||||
|
COPY --from=builder /tmp/firmware/release/meshtasticd_linux_amd64 /home/mesh/
|
||||||
|
|
||||||
|
USER mesh
|
||||||
|
WORKDIR /home/mesh
|
||||||
CMD sh -cx "./meshtasticd_linux_amd64 --hwid '$RANDOM'"
|
CMD sh -cx "./meshtasticd_linux_amd64 --hwid '$RANDOM'"
|
||||||
|
|
||||||
|
HEALTHCHECK NONE
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
This repository contains the device firmware for the Meshtastic project.
|
This repository contains the device firmware for the Meshtastic project.
|
||||||
|
|
||||||
**[Building Instructions](https://meshtastic.org/docs/developers/Firmware/build)**
|
**[Building Instructions](https://meshtastic.org/docs/development/firmware/build)**
|
||||||
**[Flashing Instructions](https://meshtastic.org/docs/getting-started/flashing-firmware/)**
|
**[Flashing Instructions](https://meshtastic.org/docs/getting-started/flashing-firmware/)**
|
||||||
|
|
||||||
## Stats
|
## Stats
|
||||||
|
Loading…
Reference in New Issue
Block a user