2020-09-26 00:38:56 +08:00
|
|
|
name: Build
|
|
|
|
|
|
|
|
on:
|
2020-11-30 00:03:18 +08:00
|
|
|
push
|
|
|
|
# branches:
|
|
|
|
# - master
|
|
|
|
# pull_request:
|
|
|
|
# branches:
|
|
|
|
# - master
|
2020-09-26 00:38:56 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
PC_Application_Ubuntu:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2020-11-22 21:38:52 +08:00
|
|
|
sudo apt-get install -y libusb-1.0-0-dev qt5-default qt5-qmake qtbase5-dev
|
2020-09-26 00:38:56 +08:00
|
|
|
|
|
|
|
- name: Build application
|
|
|
|
run: |
|
|
|
|
cd Software/PC_Application
|
|
|
|
qmake
|
|
|
|
make -j9
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: Application_Ubuntu
|
|
|
|
path: Software/PC_Application/Application
|
|
|
|
|
|
|
|
PC_Application_Windows:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
|
|
|
|
- name: Install Qt
|
|
|
|
uses: jurplel/install-qt-action@v2
|
|
|
|
with:
|
2020-11-30 00:03:18 +08:00
|
|
|
version: '5.15.1'
|
|
|
|
arch: 'win64_mingw81'
|
2020-09-26 00:38:56 +08:00
|
|
|
|
|
|
|
- name: Download libusb
|
|
|
|
run: |
|
|
|
|
curl -o libusb.7z -L https://github.com/libusb/libusb/releases/download/v1.0.23/libusb-1.0.23.7z
|
|
|
|
7z x libusb.7z -r -olibusb
|
2020-11-30 00:03:18 +08:00
|
|
|
Xcopy /E /I /Y libusb\include ..\Qt\5.15.1\mingw81_64\include
|
2020-11-23 21:22:19 +08:00
|
|
|
Xcopy /E /I /Y libusb\MinGW64\static Software\PC_Application
|
2020-09-26 00:38:56 +08:00
|
|
|
shell: cmd
|
|
|
|
|
|
|
|
- name: Build application
|
|
|
|
run: |
|
|
|
|
cd Software/PC_Application
|
|
|
|
qmake
|
|
|
|
make -j9
|
2020-11-23 21:22:19 +08:00
|
|
|
shell: cmd
|
|
|
|
|
|
|
|
- name: Deploy application
|
|
|
|
run: |
|
|
|
|
cd Software/PC_Application/release
|
2020-09-26 00:38:56 +08:00
|
|
|
del *.o *.cpp
|
|
|
|
windeployqt.exe .
|
2020-11-30 00:03:18 +08:00
|
|
|
copy ..\..\..\..\Qt\5.15.1\mingw81_64\bin\libwinpthread-1.dll .
|
|
|
|
copy ..\..\..\..\Qt\5.15.1\mingw81_64\bin\libgcc_s_seh-1.dll .
|
|
|
|
copy "..\..\..\..\Qt\5.15.1\mingw81_64\bin\libstdc++-6.dll" .
|
|
|
|
copy ..\..\..\..\Qt\5.15.1\mingw81_64\bin\Qt5OpenGL.dll .
|
2020-09-26 00:38:56 +08:00
|
|
|
shell: cmd
|
|
|
|
|
|
|
|
- name: Upload
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: Application_Windows
|
|
|
|
path: Software/PC_Application/release
|
|
|
|
|
|
|
|
Embedded_Firmware:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
|
|
|
|
- name: Install toolchain
|
|
|
|
run: |
|
|
|
|
sudo apt-get install -y gcc-arm-none-eabi binutils-arm-none-eabi
|
|
|
|
|
|
|
|
- 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
|
|
|
|
|
|
|
|
- name: Upload
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: EmbeddedFirmware
|
|
|
|
path: |
|
|
|
|
VNA_embedded.elf
|
|
|
|
combined.vnafw
|
2020-11-22 21:38:52 +08:00
|
|
|
|