Skip to content

ci: trigger ci every 3 days #9

ci: trigger ci every 3 days

ci: trigger ci every 3 days #9

Workflow file for this run

name: Build OpenOCD Flash Loader
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
paths:
- "**"
pull_request:
paths:
- "*"
schedule:
- cron: '0 0 */3 * *'
jobs:
build:
name: build flashloader
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
sdkbranch: [master, develop]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Caching tools
uses: actions/cache@v3
with:
path: |
prebuilt_tools/*.tar.bz2
prebuilt_tools/*.zip
prebuilt_tools/*.tar.gz
key: build
- name: Prepare Tools
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get -q update
sudo apt install -yq python3 python3-pip unzip libz-dev libssl-dev libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev libncursesw5-dev libncursesw5 libgmp-dev libmpfr-dev libmpc-dev
sudo python3 -m pip install -q --upgrade pip
mkdir -p prebuilt_tools
cd prebuilt_tools
TOOLROOT=$(pwd)
TOOLVER=2024.06
echo "Prepare Nuclei Toolchain $TOOLVER ......"
toolzip=nuclei_riscv_newlibc_prebuilt_linux64_${TOOLVER}.tar.bz2
if [ ! -e $toolzip ] ; then
echo "Download Nuclei toolchain now!"
wget --progress=dot:giga --no-check-certificate https://www.nucleisys.com/upload/files/toochain/gcc/$toolzip
ls -lh $toolzip
md5sum $toolzip
fi
tar -xjf $toolzip
echo "Prepare Nuclei QEMU $TOOLVER ......."
toolzip=nuclei-qemu-${TOOLVER}-linux-x64.tar.gz
if [ ! -e $toolzip ] ; then
echo "Download Nuclei qemu now!"
wget --progress=dot:giga --no-check-certificate https://www.nucleisys.com/upload/files/toochain/qemu/$toolzip
ls -lh $toolzip
md5sum $toolzip
fi
tar -xzf $toolzip
if [ -d linux_qemu ] ; then
mv linux_qemu qemu
fi
echo "Check gcc and qemu version"
ldd ./qemu/bin/qemu-system-riscv32
./qemu/bin/qemu-system-riscv32 --version
./gcc/bin/riscv64-unknown-elf-gcc -v
cd ..
SDKBRANCH=${{ matrix.sdkbranch }}
echo "Clone Nuclei SDK using branch $SDKBRANCH"
git clone -b $SDKBRANCH --depth 1 https://github.com/Nuclei-Software/nuclei-sdk
cd nuclei-sdk
echo "NUCLEI_TOOL_ROOT=${TOOLROOT}" > setup_config.sh
cd ..
- name: Build and Test Flashloader
run: |
echo "Set NUCLEI_SDK_ROOT=$(pwd)/nuclei-sdk"
export NUCLEI_SDK_ROOT=$(pwd)/nuclei-sdk
echo "Start to do freeloader build testing"
bash .github/build.sh