2020-07-08 08:10:24 -07:00
|
|
|
name: Build Firmware
|
2019-11-20 20:34:55 -08:00
|
|
|
|
2020-07-08 08:10:24 -07:00
|
|
|
on: [push, pull_request]
|
2019-11-20 20:34:55 -08:00
|
|
|
|
|
|
|
jobs:
|
2020-07-08 08:10:24 -07:00
|
|
|
build-firmware:
|
2019-11-20 20:34:55 -08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
# Let all builds finish even if one fails early
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
# What boards should we build for? In the 'include' section below,
|
|
|
|
# set up what each of these boards needs to build.
|
2020-07-08 08:10:24 -07:00
|
|
|
build-target: [frankenso_na6, kinetis, mre_f4, mre_f4_hardware_QC_special_build, mre_f7, prometheus_405, prometheus_469, proteus_f4, proteus_f7, stm32f746_nucleo, stm32f767_nucleo]
|
2019-11-20 20:34:55 -08:00
|
|
|
|
|
|
|
include:
|
|
|
|
# Board configurations
|
2020-07-08 08:10:24 -07:00
|
|
|
- build-target: frankenso_na6
|
|
|
|
folder: frankenso
|
2020-07-27 16:42:29 -07:00
|
|
|
ini-file: rusefi_frankenso_na6.ini
|
2019-11-20 20:34:55 -08:00
|
|
|
|
2020-07-08 08:10:24 -07:00
|
|
|
- build-target: kinetis
|
|
|
|
folder: kinetis
|
|
|
|
|
|
|
|
- build-target: mre_f4
|
|
|
|
folder: microrusefi
|
|
|
|
ini-file: rusefi_mre_f4.ini
|
|
|
|
|
|
|
|
- build-target: mre_f4_hardware_QC_special_build
|
|
|
|
folder: microrusefi
|
2020-07-27 16:42:29 -07:00
|
|
|
ini-file: rusefi_mre_f4.ini
|
2019-11-20 20:34:55 -08:00
|
|
|
|
2020-07-08 08:10:24 -07:00
|
|
|
- build-target: mre_f7
|
|
|
|
folder: microrusefi
|
|
|
|
ini-file: rusefi_mre_f7.ini
|
|
|
|
console-settings: firmware/config/boards/nucleo_f767/rusefi_console_properties.xml
|
2019-12-02 20:54:40 -08:00
|
|
|
|
2020-07-08 08:10:24 -07:00
|
|
|
- build-target: prometheus_405
|
|
|
|
folder: prometheus
|
|
|
|
ini-file: rusefi_prometheus_405.ini
|
|
|
|
|
|
|
|
- build-target: prometheus_469
|
|
|
|
folder: prometheus
|
|
|
|
ini-file: rusefi_prometheus_469.ini
|
|
|
|
|
|
|
|
- build-target: proteus_f4
|
|
|
|
folder: proteus
|
|
|
|
ini-file: rusefi_proteus_f4.ini
|
|
|
|
|
|
|
|
- build-target: proteus_f7
|
|
|
|
folder: proteus
|
|
|
|
ini-file: rusefi_proteus_f7.ini
|
|
|
|
|
|
|
|
- build-target: stm32f746_nucleo
|
|
|
|
folder: nucleo_f746
|
|
|
|
ini-file: no
|
|
|
|
console-settings: firmware/config/boards/nucleo_f767/rusefi_console_properties.xml
|
2020-07-14 07:28:26 -07:00
|
|
|
skip-config: yes
|
2020-07-08 08:10:24 -07:00
|
|
|
|
|
|
|
- build-target: stm32f767_nucleo
|
|
|
|
folder: nucleo_f767
|
|
|
|
ini-file: no
|
|
|
|
console-settings: firmware/config/boards/nucleo_f767/rusefi_console_properties.xml
|
2020-07-14 07:28:26 -07:00
|
|
|
skip-config: yes
|
2019-12-04 12:16:26 -08:00
|
|
|
|
2019-11-20 20:34:55 -08:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
2020-06-18 15:31:54 -07:00
|
|
|
- name: Generate Configs
|
2020-07-14 07:28:26 -07:00
|
|
|
if: ${{ matrix.skip-config != 'yes' }}
|
2020-06-18 15:31:54 -07:00
|
|
|
working-directory: ./firmware/
|
2020-07-14 07:28:26 -07:00
|
|
|
run: |
|
|
|
|
if [ "${{ matrix.build-target }}" = "kinetis" ]; then
|
|
|
|
cd config/boards/kinetis/config
|
|
|
|
bash gen_config.sh
|
|
|
|
[ $? -eq 0 ] || { echo "ERROR generating board kinetis kin"; exit 1; }
|
|
|
|
else
|
|
|
|
bash gen_config_board.sh ${{matrix.folder}} ${{matrix.build-target}}
|
|
|
|
fi
|
2020-06-18 15:31:54 -07:00
|
|
|
|
2020-07-30 09:27:20 -07:00
|
|
|
- name: Generate Enum Strings
|
|
|
|
working-directory: ./firmware/
|
|
|
|
run: bash gen_enum_to_string.sh
|
|
|
|
|
2020-07-21 18:46:39 -07:00
|
|
|
- name: Generate Default config
|
|
|
|
working-directory: ./firmware/
|
|
|
|
run: bash gen_config_default.sh
|
|
|
|
|
2020-06-18 15:31:54 -07:00
|
|
|
- name: Generate Live Documentation
|
|
|
|
working-directory: ./firmware/
|
2020-07-14 07:28:26 -07:00
|
|
|
run: bash gen_live_documentation.sh
|
2020-06-18 15:31:54 -07:00
|
|
|
|
2019-11-20 20:34:55 -08:00
|
|
|
# Build machines don't have arm-none-eabi gcc, so let's download it and put it on the path
|
|
|
|
- name: Download & Install GCC
|
2020-02-06 16:18:35 -08:00
|
|
|
run: | # Compiler hosted on our other git repo - avoids having to download from the nice folks at ARM every time
|
|
|
|
wget 'https://github.com/rusefi/build_support/raw/master/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.xz' -O compiler.tar.xz
|
|
|
|
tar -xvf compiler.tar.xz
|
2019-11-20 20:34:55 -08:00
|
|
|
echo "::add-path::`pwd`/gcc-arm-none-eabi-9-2019-q4-major/bin"
|
|
|
|
|
2020-07-08 08:10:24 -07:00
|
|
|
- name: Install multilib, mingw, and ncftp
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install gcc-multilib g++-multilib g++-mingw-w64 gcc-mingw-w64 ncftp
|
|
|
|
|
2019-11-20 20:34:55 -08:00
|
|
|
# Make sure the compiler we just downloaded works - just print out the version
|
|
|
|
- name: Test Compiler
|
|
|
|
run: arm-none-eabi-gcc -v
|
2020-07-08 08:10:24 -07:00
|
|
|
|
|
|
|
- name: Set FTP variables
|
|
|
|
run: |
|
|
|
|
if [ "${{github.event_name}}" = "push" ] && [ "${{github.ref}}" = "refs/heads/master" ]; then
|
|
|
|
echo "::set-env name=RUSEFI_FTP_SERVER::${{secrets.RUSEFI_FTP_SERVER}}";
|
|
|
|
echo "::set-env name=RUSEFI_BUILD_FTP_USER::${{secrets.RUSEFI_BUILD_FTP_USER}}";
|
|
|
|
echo "::set-env name=RUSEFI_BUILD_FTP_PASS::${{secrets.RUSEFI_BUILD_FTP_PASS}}";
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Build rusEFI console
|
|
|
|
- name: Build console
|
2020-07-14 07:28:26 -07:00
|
|
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
|
|
|
run: bash misc/jenkins/build_java_console.sh
|
2019-11-20 20:34:55 -08:00
|
|
|
|
2020-07-08 08:10:24 -07:00
|
|
|
# Build the simulator
|
|
|
|
- name: Build simulator
|
2020-07-14 07:28:26 -07:00
|
|
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
|
|
|
run: OS="Windows_NT" bash misc/jenkins/build_simulator.sh
|
2020-07-08 08:10:24 -07:00
|
|
|
|
2019-11-20 20:34:55 -08:00
|
|
|
# Build the firmware!
|
|
|
|
- name: Build Firmware
|
2020-07-14 07:28:26 -07:00
|
|
|
run: bash misc/jenkins/compile_other_versions/compile.sh ${{matrix.folder}} ${{matrix.build-target}} ${{matrix.ini-file}} ${{matrix.console-settings}}
|
|
|
|
|
|
|
|
- name: Package Bundle
|
|
|
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
2020-07-17 19:32:53 -07:00
|
|
|
run: bash misc/jenkins/compile_other_versions/prepare_bundle.sh ${{matrix.build-target}} ${{matrix.ini-file}}
|
2020-06-16 09:33:49 -07:00
|
|
|
|
2020-07-18 19:30:44 -07:00
|
|
|
- name: Attach console junit results
|
|
|
|
if: always()
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: console ${{matrix.build-target}} junit
|
|
|
|
path: ./java_console/build/*.txt
|
|
|
|
|
2020-07-19 13:05:47 -07:00
|
|
|
- name: Upload build bin
|
|
|
|
if: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
|
2020-07-19 13:09:29 -07:00
|
|
|
uses: actions/upload-artifact@v2
|
2020-07-19 13:05:47 -07:00
|
|
|
with:
|
|
|
|
name: rusefi_${{matrix.build-target}}.bin
|
2020-07-19 13:30:32 -07:00
|
|
|
path: ./firmware/deliver/rusefi_${{matrix.build-target}}.bin
|
2020-07-19 13:05:47 -07:00
|
|
|
|
|
|
|
- name: Upload build hex
|
|
|
|
if: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
|
2020-07-19 13:09:29 -07:00
|
|
|
uses: actions/upload-artifact@v2
|
2020-07-19 13:05:47 -07:00
|
|
|
with:
|
|
|
|
name: rusefi_${{matrix.build-target}}.hex
|
2020-07-19 13:30:32 -07:00
|
|
|
path: ./firmware/deliver/rusefi_${{matrix.build-target}}.hex
|
2020-07-19 13:05:47 -07:00
|
|
|
|
|
|
|
- name: Upload build dfu
|
|
|
|
if: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' }}
|
2020-07-19 13:09:29 -07:00
|
|
|
uses: actions/upload-artifact@v2
|
2020-07-19 13:05:47 -07:00
|
|
|
with:
|
|
|
|
name: rusefi_${{matrix.build-target}}.dfu
|
2020-07-19 13:30:32 -07:00
|
|
|
path: ./firmware/deliver/rusefi_${{matrix.build-target}}.dfu
|
2020-07-19 13:05:47 -07:00
|
|
|
|
2020-07-08 08:10:24 -07:00
|
|
|
- name: Upload bundle
|
2020-07-14 07:28:26 -07:00
|
|
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
2020-07-02 20:11:48 -07:00
|
|
|
uses: actions/upload-artifact@v2
|
2019-11-20 20:34:55 -08:00
|
|
|
with:
|
2020-07-08 08:10:24 -07:00
|
|
|
name: rusefi_bundle_${{matrix.build-target}}.zip
|
|
|
|
path: ./artifacts/rusefi_bundle_${{matrix.build-target}}.zip
|
|
|
|
|
|
|
|
- name: Upload autoupdate bundle
|
2020-07-14 07:28:26 -07:00
|
|
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
2020-07-02 20:11:48 -07:00
|
|
|
uses: actions/upload-artifact@v2
|
2019-11-20 20:34:55 -08:00
|
|
|
with:
|
2020-07-08 08:10:24 -07:00
|
|
|
name: rusefi_bundle_${{matrix.build-target}}_autoupdate.zip
|
|
|
|
path: ./artifacts/rusefi_bundle_${{matrix.build-target}}_autoupdate.zip
|
|
|
|
|
|
|
|
build-primary-bundle:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- name: Generate Configs
|
|
|
|
working-directory: ./firmware/
|
2020-07-14 07:28:26 -07:00
|
|
|
run: bash gen_config_default.sh
|
2020-07-08 08:10:24 -07:00
|
|
|
|
|
|
|
- name: Generate Live Documentation
|
|
|
|
working-directory: ./firmware/
|
2020-07-14 07:28:26 -07:00
|
|
|
run: bash gen_live_documentation.sh
|
2020-07-08 08:10:24 -07:00
|
|
|
|
|
|
|
# Build machines don't have arm-none-eabi gcc, so let's download it and put it on the path
|
|
|
|
- name: Download & Install GCC
|
|
|
|
run: | # Compiler hosted on our other git repo - avoids having to download from the nice folks at ARM every time
|
|
|
|
wget 'https://github.com/rusefi/build_support/raw/master/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.xz' -O compiler.tar.xz
|
|
|
|
tar -xvf compiler.tar.xz
|
|
|
|
echo "::add-path::`pwd`/gcc-arm-none-eabi-9-2019-q4-major/bin"
|
|
|
|
|
|
|
|
- name: Install multilib, mingw, and ncftp
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install gcc-multilib g++-multilib g++-mingw-w64 gcc-mingw-w64 ncftp
|
|
|
|
|
|
|
|
# Make sure the compiler we just downloaded works - just print out the version
|
|
|
|
- name: Test Compiler
|
|
|
|
run: arm-none-eabi-gcc -v
|
|
|
|
|
|
|
|
- name: Set FTP variables
|
|
|
|
run: |
|
|
|
|
if [ "${{github.event_name}}" = "push" ] && [ "${{github.ref}}" = "refs/heads/master" ]; then
|
|
|
|
echo "::set-env name=RUSEFI_FTP_SERVER::${{secrets.RUSEFI_FTP_SERVER}}";
|
|
|
|
echo "::set-env name=RUSEFI_BUILD_FTP_USER::${{secrets.RUSEFI_BUILD_FTP_USER}}";
|
|
|
|
echo "::set-env name=RUSEFI_BUILD_FTP_PASS::${{secrets.RUSEFI_BUILD_FTP_PASS}}";
|
|
|
|
fi
|
|
|
|
|
|
|
|
- name: Build Primary Bundle
|
2020-07-14 07:28:26 -07:00
|
|
|
run: OS="Windows_NT" bash misc/jenkins/functional_test_and_build_bundle/build_current_bundle.sh
|
|
|
|
|
|
|
|
- name: Package Bundle
|
|
|
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
|
|
|
run: bash misc/jenkins/compile_other_versions/prepare_bundle.sh default
|
2020-06-16 09:33:49 -07:00
|
|
|
|
2020-07-18 19:30:44 -07:00
|
|
|
- name: Attach console junit results
|
|
|
|
if: always()
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2020-07-18 19:50:32 -07:00
|
|
|
name: console primary junit
|
2020-07-18 19:30:44 -07:00
|
|
|
path: ./java_console/build/*.txt
|
|
|
|
|
2020-07-08 08:10:24 -07:00
|
|
|
- name: Upload primary bundle
|
2020-07-14 07:28:26 -07:00
|
|
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
2020-07-02 20:11:48 -07:00
|
|
|
uses: actions/upload-artifact@v2
|
2020-06-16 09:33:49 -07:00
|
|
|
with:
|
2020-07-08 08:10:24 -07:00
|
|
|
name: rusefi_bundle.zip
|
|
|
|
path: ./artifacts/rusefi_bundle.zip
|