Build Meshtastic firmware for ARM64 #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Meshtastic firmware for ARM64 | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python 3 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install wget g++ zip ca-certificates libgpiod-dev | |
pip install --upgrade pip | |
pip install platformio | |
- name: Clone Meshtastic repository and compile firmware | |
run: | | |
git clone https://github.com/meshtastic/firmware --recurse-submodules /tmp/firmware | |
cd /tmp/firmware | |
git checkout raspi-portduino | |
chmod +x ./bin/build-native.sh | |
sed -i 's/\[env\]/\[env:upstream_develop\]\nplatform = https:\/\/github.com\/meshtastic\/platform-native.git\nboard = linux_arm/' ./platformio.ini | |
./bin/build-native.sh | |
# Extract tag from version.properties | |
TAG=$(curl -s https://raw.githubusercontent.com/meshtastic/firmware/master/version.properties | sed -nE 's/major = ([0-9]+)/\1./p; s/minor = ([0-9]+)/\1./p; s/build = ([0-9]+)/\1/p' | tr -d '\n'; echo) | |
echo "TAG=$TAG" >> $GITHUB_ENV # Set variable for next steps | |
- name: Upload firmware to release | |
id: upload-release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: /tmp/firmware/release/meshtasticd_linux_arm | |
asset_name: meshtasticd_linux_arm | |
tag: ${{ env.TAG }}, arm64 | |
overwrite: true | |
body: "Meshtastic arm64 firmware" |