mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-26 22:33:24 +00:00
meshtasticd debian: split libs for PPA (#5745)
This commit is contained in:
parent
6aabbedc00
commit
35814fd4bc
41
.github/workflows/build_debian_src.yml
vendored
Normal file
41
.github/workflows/build_debian_src.yml
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
name: Build Debian Source Package
|
||||||
|
|
||||||
|
on: workflow_call
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-debian-src:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
|
- name: Install deps
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -y --fix-missing
|
||||||
|
sudo apt-get install -y devscripts equivs
|
||||||
|
|
||||||
|
- name: Fetch libdeps, package debian source
|
||||||
|
run: debian/ci_pack_sdeb.sh
|
||||||
|
|
||||||
|
- name: Get release version string
|
||||||
|
run: |
|
||||||
|
echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
||||||
|
echo "short=$(./bin/buildinfo.py short)" >> $GITHUB_OUTPUT
|
||||||
|
id: version
|
||||||
|
|
||||||
|
- name: Store binaries as an artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: firmware-debian-${{ steps.version.outputs.long }}-src.zip
|
||||||
|
overwrite: true
|
||||||
|
path: |
|
||||||
|
../meshtasticd_${{ steps.version.outputs.short }}*
|
8
.github/workflows/main_matrix.yml
vendored
8
.github/workflows/main_matrix.yml
vendored
@ -128,6 +128,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
board: ${{ matrix.board }}
|
board: ${{ matrix.board }}
|
||||||
|
|
||||||
|
package-ppa:
|
||||||
|
uses: ./.github/workflows/package_ppa.yml
|
||||||
|
|
||||||
package-raspbian:
|
package-raspbian:
|
||||||
uses: ./.github/workflows/package_raspbian.yml
|
uses: ./.github/workflows/package_raspbian.yml
|
||||||
|
|
||||||
@ -332,12 +335,17 @@ jobs:
|
|||||||
run: >-
|
run: >-
|
||||||
bin/bump_version.py
|
bin/bump_version.py
|
||||||
|
|
||||||
|
- name: Update debian changelog
|
||||||
|
run: >-
|
||||||
|
debian/ci_changelog.sh
|
||||||
|
|
||||||
- name: Create version.properties pull request
|
- name: Create version.properties pull request
|
||||||
uses: peter-evans/create-pull-request@v7
|
uses: peter-evans/create-pull-request@v7
|
||||||
with:
|
with:
|
||||||
title: Bump version.properties
|
title: Bump version.properties
|
||||||
add-paths: |
|
add-paths: |
|
||||||
version.properties
|
version.properties
|
||||||
|
debian/changelog
|
||||||
|
|
||||||
release-firmware:
|
release-firmware:
|
||||||
strategy:
|
strategy:
|
||||||
|
58
.github/workflows/package_ppa.yml
vendored
Normal file
58
.github/workflows/package_ppa.yml
vendored
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
name: Package Launchpad PPA
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-debian-src:
|
||||||
|
uses: ./.github/workflows/build_debian_src.yml
|
||||||
|
|
||||||
|
package-ppa:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
needs: build-debian-src
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
ref: ${{github.event.pull_request.head.ref}}
|
||||||
|
repository: ${{github.event.pull_request.head.repo.full_name}}
|
||||||
|
|
||||||
|
- name: Get release version string
|
||||||
|
run: |
|
||||||
|
echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT
|
||||||
|
echo "short=$(./bin/buildinfo.py short)" >> $GITHUB_OUTPUT
|
||||||
|
id: version
|
||||||
|
|
||||||
|
- name: Download artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: firmware-debian-${{ steps.version.outputs.long }}-src.zip
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
|
# - name: Install deps
|
||||||
|
# shell: bash
|
||||||
|
# run: |
|
||||||
|
# sudo apt-get update -y --fix-missing
|
||||||
|
# sudo apt-get install -y dput
|
||||||
|
|
||||||
|
- name: Display structure of downloaded files
|
||||||
|
run: ls -R
|
||||||
|
|
||||||
|
- name: Publish PPA
|
||||||
|
if: ${{ github.event_name != 'pull_request_target' && github.event_name != 'pull_request' }}
|
||||||
|
uses: yuezk/publish-ppa-package@v2
|
||||||
|
with:
|
||||||
|
# See https://launchpad.net/~meshtastic/+archive/ubuntu/meshtastic-daily
|
||||||
|
repository: "meshtastic/meshtastic-daily"
|
||||||
|
gpg_private_key: ${{ secrets.PPA_GPG_PRIVATE_KEY }}
|
||||||
|
tarball: "meshtasticd_${{ steps.version.outputs.short }}.tar.xz"
|
||||||
|
# Supported Ubuntu versions
|
||||||
|
series: "plucky oracular noble jammy"
|
||||||
|
deb_email: "github-actions[bot]@users.noreply.github.com"
|
||||||
|
deb_fullname: "github-actions[bot]"
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
|||||||
.pio
|
.pio
|
||||||
|
pio
|
||||||
|
|
||||||
# ignore vscode IDE settings files
|
# ignore vscode IDE settings files
|
||||||
.vscode/*
|
.vscode/*
|
||||||
|
1
debian/update_changelog.sh → debian/ci_changelog.sh
vendored
Normal file → Executable file
1
debian/update_changelog.sh → debian/ci_changelog.sh
vendored
Normal file → Executable file
@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
export DEBEMAIL="github-actions[bot]@users.noreply.github.com"
|
export DEBEMAIL="github-actions[bot]@users.noreply.github.com"
|
||||||
|
|
||||||
dch --newversion "$(python3 bin/buildinfo.py short)-1" \
|
dch --newversion "$(python3 bin/buildinfo.py short)-1" \
|
||||||
--distribution unstable \
|
--distribution unstable \
|
||||||
"GitHub Actions Automatic version bump"
|
"GitHub Actions Automatic version bump"
|
9
debian/ci_pack_sdeb.sh
vendored
Executable file
9
debian/ci_pack_sdeb.sh
vendored
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
export PLATFORMIO_LIBDEPS_DIR=pio/libdeps
|
||||||
|
export PLATFORMIO_PACKAGES_DIR=pio/packages
|
||||||
|
|
||||||
|
# Download libraries to `libdeps`
|
||||||
|
platformio pkg install -e native
|
||||||
|
|
||||||
|
# Build the source deb
|
||||||
|
debuild -S
|
5
debian/control
vendored
5
debian/control
vendored
@ -3,8 +3,9 @@ Section: misc
|
|||||||
Priority: optional
|
Priority: optional
|
||||||
Maintainer: Austin Lane <vidplace7@gmail.com>
|
Maintainer: Austin Lane <vidplace7@gmail.com>
|
||||||
Build-Depends: debhelper-compat (= 13),
|
Build-Depends: debhelper-compat (= 13),
|
||||||
python3-pip,
|
platformio,
|
||||||
python3-venv,
|
python3-protobuf,
|
||||||
|
python3-grpcio,
|
||||||
git,
|
git,
|
||||||
g++,
|
g++,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
|
15
debian/rules
vendored
15
debian/rules
vendored
@ -1,17 +1,18 @@
|
|||||||
#!/usr/bin/make -f
|
#!/usr/bin/make -f
|
||||||
|
# export DH_VERBOSE = 1
|
||||||
|
|
||||||
# Use the "dh" sequencer
|
# Use the "dh" sequencer
|
||||||
%:
|
%:
|
||||||
dh $@
|
dh $@
|
||||||
|
|
||||||
|
# https://docs.platformio.org/en/latest/envvars.html
|
||||||
|
PIO_ENV:=\
|
||||||
|
PLATFORMIO_LIBDEPS_DIR=pio/libdeps \
|
||||||
|
PLATFORMIO_PACKAGES_DIR=pio/packages
|
||||||
|
|
||||||
override_dh_auto_build:
|
override_dh_auto_build:
|
||||||
# Terrible hack to use modern platformio to build the native version
|
# Build with platformio
|
||||||
# python3 -m venv venv
|
$(PIO_ENV) platformio run -e native
|
||||||
# . venv/bin/activate
|
|
||||||
pip install platformio --break-system-packages
|
|
||||||
platformio run -e native
|
|
||||||
# deactivate
|
|
||||||
# rm -rf venv
|
|
||||||
# Move the binary and default config to the correct name
|
# Move the binary and default config to the correct name
|
||||||
mv .pio/build/native/program .pio/build/native/meshtasticd
|
mv .pio/build/native/program .pio/build/native/meshtasticd
|
||||||
cp bin/config-dist.yaml bin/config.yaml
|
cp bin/config-dist.yaml bin/config.yaml
|
||||||
|
2
debian/source/include-binaries
vendored
Normal file
2
debian/source/include-binaries
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
pio/libdeps
|
||||||
|
pio/packages
|
1
debian/source/options
vendored
Normal file
1
debian/source/options
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
extend-diff-ignore = "\.pio"
|
Loading…
Reference in New Issue
Block a user