first test of self-hosted actions

This commit is contained in:
Jan Käberich 2024-04-22 11:57:15 +02:00
parent 3f6dad5b92
commit e3b4972025
2 changed files with 129 additions and 0 deletions

View file

@ -4,6 +4,7 @@ on:
push:
branches:
- master
- HIL_actions
pull_request:
branches:
- master
@ -49,6 +50,46 @@ jobs:
name: LibreVNA-GUI-Ubuntu-${{env.LIBREVNA_VERSION}}
path: Software/PC_Application/LibreVNA-GUI/LibreVNA-GUI
PC_Application_RPi5:
runs-on: RPi-HIL
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libusb-1.0-0-dev qt6-tools-dev qt6-base-dev
qtchooser -install qt6 $(which qmake6)
- name: Get build timestamp
id: id_date
run: echo "timestamp=$(date +%Y-%m-%d-%H-%M-%S)" >> $GITHUB_OUTPUT
- name: Get app version
id: id_version
run: |
cd Software/PC_Application/LibreVNA-GUI
fw_major=`grep -oP '(?<=FW_MAJOR=)[0-9]+' LibreVNA-GUI.pro`
fw_minor=`grep -oP '(?<=FW_MINOR=)[0-9]+' LibreVNA-GUI.pro`
fw_patch=`grep -oP '(?<=FW_PATCH=)[0-9]+' LibreVNA-GUI.pro`
echo "app_version=v$fw_major.$fw_minor.$fw_patch-${{steps.id_date.outputs.timestamp}}" >> $GITHUB_OUTPUT
- name: Build application
run: |
cd Software/PC_Application/LibreVNA-GUI
export QT_SELECT=qt6
qmake LibreVNA-GUI.pro
make -j9
shell: bash
- name: Upload artifact
env:
LIBREVNA_VERSION: "${{steps.id_version.outputs.app_version}}"
uses: actions/upload-artifact@v3
with:
name: LibreVNA-GUI-RPi5-${{env.LIBREVNA_VERSION}}
path: Software/PC_Application/LibreVNA-GUI/LibreVNA-GUI
PC_Application_Windows:
runs-on: windows-2019
steps:

88
.github/workflows/HIL_Tests.yml vendored Normal file
View file

@ -0,0 +1,88 @@
name: HIL_Tests
on:
push:
branches:
- master
- HIL_actions
pull_request:
branches:
- master
jobs:
PC_Application_RPi5:
runs-on: RPi-HIL
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libusb-1.0-0-dev qt6-tools-dev qt6-base-dev
qtchooser -install qt6 $(which qmake6)
- name: Get build timestamp
id: id_date
run: echo "timestamp=$(date +%Y-%m-%d-%H-%M-%S)" >> $GITHUB_OUTPUT
- name: Get app version
id: id_version
run: |
cd Software/PC_Application/LibreVNA-GUI
fw_major=`grep -oP '(?<=FW_MAJOR=)[0-9]+' LibreVNA-GUI.pro`
fw_minor=`grep -oP '(?<=FW_MINOR=)[0-9]+' LibreVNA-GUI.pro`
fw_patch=`grep -oP '(?<=FW_PATCH=)[0-9]+' LibreVNA-GUI.pro`
echo "app_version=v$fw_major.$fw_minor.$fw_patch-${{steps.id_date.outputs.timestamp}}" >> $GITHUB_OUTPUT
- name: Build application
run: |
cd Software/PC_Application/LibreVNA-GUI
export QT_SELECT=qt6
qmake LibreVNA-GUI.pro
make -j9
shell: bash
Embedded_Firmware:
runs-on: RPi-HIL
steps:
- uses: actions/checkout@v1
- name: Install toolchain
run: |
sudo apt-get install -y gcc-arm-none-eabi binutils-arm-none-eabi
- name: Get build timestamp
id: id_date
run: echo "timestamp=$(date +%Y-%m-%d-%H-%M-%S)" >> $GITHUB_OUTPUT
- name: Get app version
id: id_version
run: |
cd Software/VNA_embedded
fw_major=`grep -oP '(?<=FW_MAJOR=)[0-9]+' Makefile`
fw_minor=`grep -oP '(?<=FW_MINOR=)[0-9]+' Makefile`
fw_patch=`grep -oP '(?<=FW_PATCH=)[0-9]+' Makefile`
hw_revision=`grep "DHW_REVISION=" Makefile | sed "s/-DHW_REVISION=\"'//" | sed "sr'\" [\]rr"`
echo "app_version=hw-rev-$hw_revision-v$fw_major.$fw_minor.$fw_patch-${{steps.id_date.outputs.timestamp}}" >> $GITHUB_OUTPUT
- name: Build application
run: |
cd Software/VNA_embedded
make -j9
cp build/VNA_embedded.elf ../../
shell: bash
- name: Combine with FPGA bitstream
run: |
python3 AssembleFirmware.py
shell: bash
HIL:
runs-on: RPi-HIL
needs: [PC_Application_RPi5, Embedded_Firmware]
steps:
- name: Run HIL tests
run: |
cd Software/Integrationtests
python3 Integrationtest.py