mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-01-17 09:28:05 +00:00
Add nightly builds workflow
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
cf44794bb6
commit
4bea47faca
3 changed files with 69 additions and 8 deletions
34
.github/workflows/nightly.yml
vendored
Normal file
34
.github/workflows/nightly.yml
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
name: "Nightly deploy"
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 2 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
nightly:
|
||||||
|
name: Deploy nightly
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
refs: [main, development]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ matrix.refs }}
|
||||||
|
submodules: 'recursive'
|
||||||
|
- name : Build
|
||||||
|
env:
|
||||||
|
PICO_SDK_PATH: ../pico-sdk
|
||||||
|
run: |
|
||||||
|
./workflows/autobuild.sh pico
|
||||||
|
./build_pico_hsm.sh
|
||||||
|
- name: Update nightly release
|
||||||
|
uses: pyTooling/Actions/releaser@main
|
||||||
|
with:
|
||||||
|
tag: nightly-${{ matrix.refs }}
|
||||||
|
rm: true
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
files: release/*.*
|
||||||
|
|
@ -2,8 +2,14 @@
|
||||||
|
|
||||||
VERSION_MAJOR="4"
|
VERSION_MAJOR="4"
|
||||||
VERSION_MINOR="2"
|
VERSION_MINOR="2"
|
||||||
|
SUFFIX="${VERSION_MAJOR}.${VERSION_MINOR}"
|
||||||
|
#if ! [[ -z "${GITHUB_SHA}" ]]; then
|
||||||
|
# SUFFIX="${SUFFIX}.${GITHUB_SHA}"
|
||||||
|
#fi
|
||||||
|
|
||||||
rm -rf release/*
|
rm -rf release/*
|
||||||
|
mkdir -p build_release
|
||||||
|
mkdir -p release
|
||||||
cd build_release
|
cd build_release
|
||||||
|
|
||||||
for board in 0xcb_helios \
|
for board in 0xcb_helios \
|
||||||
|
|
@ -96,8 +102,7 @@ for board in 0xcb_helios \
|
||||||
wiznet_w5100s_evb_pico
|
wiznet_w5100s_evb_pico
|
||||||
do
|
do
|
||||||
rm -rf *
|
rm -rf *
|
||||||
PICO_SDK_PATH=~/Devel/pico/pico-sdk cmake .. -DPICO_BOARD=$board
|
PICO_SDK_PATH="${PICO_SDK_PATH:-../../pico-sdk}" cmake .. -DPICO_BOARD=$board
|
||||||
make -kj20
|
make -j`nproc`
|
||||||
mv pico_hsm.uf2 ../release/pico_hsm_$board-$VERSION_MAJOR.$VERSION_MINOR.uf2
|
mv pico_hsm.uf2 ../release/pico_hsm_$board-$SUFFIX.uf2
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
|
||||||
|
|
@ -2,16 +2,38 @@
|
||||||
|
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
sudo apt update
|
sudo apt update
|
||||||
|
|
||||||
|
if [[ $1 == "pico" ]]; then
|
||||||
sudo apt install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
|
sudo apt install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib
|
||||||
git clone https://github.com/raspberrypi/pico-sdk
|
git clone https://github.com/raspberrypi/pico-sdk
|
||||||
cd pico-sdk
|
cd pico-sdk
|
||||||
git submodule update --init
|
git submodule update --init
|
||||||
cd ..
|
cd ..
|
||||||
|
git clone https://github.com/raspberrypi/picotool
|
||||||
|
cd picotool
|
||||||
|
git submodule update --init
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
if [[ $1 == "pico" ]]; then
|
cmake -DPICO_SDK_PATH=../../pico-sdk ..
|
||||||
|
make -j`nproc`
|
||||||
|
sudo make install
|
||||||
|
cd ../..
|
||||||
|
mkdir build_pico
|
||||||
|
cd build_pico
|
||||||
cmake -DPICO_SDK_PATH=../pico-sdk ..
|
cmake -DPICO_SDK_PATH=../pico-sdk ..
|
||||||
else
|
|
||||||
cmake -DENABLE_EMULATION=1 ..
|
|
||||||
fi
|
|
||||||
make
|
make
|
||||||
|
elif [[ $1 == "esp32" ]]; then
|
||||||
|
sudo apt install -y git wget flex bison gperf python3 python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0
|
||||||
|
git clone --recursive https://github.com/espressif/esp-idf.git
|
||||||
|
cd esp-idf
|
||||||
|
./install.sh esp32s3
|
||||||
|
. ./export.sh
|
||||||
|
cd ..
|
||||||
|
idf.py set-target esp32s3
|
||||||
|
idf.py all
|
||||||
|
else
|
||||||
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake -DENABLE_EMULATION=1 ..
|
||||||
|
make
|
||||||
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue