px4-firmware/.ci/Jenkinsfile-compile

221 lines
8.0 KiB
Plaintext
Raw Normal View History

#!/usr/bin/env groovy
pipeline {
agent none
stages {
stage('Build') {
steps {
script {
def build_nodes = [:]
def docker_images = [
armhf: "px4io/px4-dev-armhf:2023-06-26",
2023-01-17 12:20:51 -04:00
arm64: "px4io/px4-dev-aarch64:2022-08-12",
base: "px4io/px4-dev-ros2-foxy:2022-08-12",
nuttx: "px4io/px4-dev-nuttx-focal:2022-08-12",
]
def armhf_builds = [
2021-02-26 16:14:21 -04:00
target: ["beaglebone_blue_default", "emlid_navio2_default", "px4_raspberrypi_default", "scumaker_pilotpi_default"],
image: docker_images.armhf,
archive: false
]
def arm64_builds = [
target: ["scumaker_pilotpi_arm64"],
image: docker_images.arm64,
archive: false
]
def base_builds = [
target: ["px4_sitl_default"],
image: docker_images.base,
archive: false
]
def nuttx_builds_archive = [
target: [
2020-01-22 15:58:57 -04:00
"airmind_mindpx-v2_default",
"ark_can-flow_canbootloader",
2021-01-27 22:17:40 -04:00
"ark_can-flow_default",
2021-09-30 14:32:00 -03:00
"ark_can-gps_canbootloader",
"ark_can-gps_default",
"ark_can-rtk-gps_canbootloader",
"ark_can-rtk-gps_default",
"ark_cannode_canbootloader",
"ark_cannode_default",
2022-09-15 14:13:49 -03:00
"ark_fmu-v6x_bootloader",
"ark_fmu-v6x_default",
"atl_mantis-edu_default",
2020-01-22 15:58:57 -04:00
"av_x-v1_default",
"bitcraze_crazyflie21_default",
"bitcraze_crazyflie_default",
"cuav_can-gps-v1_canbootloader",
"cuav_can-gps-v1_default",
2020-08-12 14:02:16 -03:00
"cuav_nora_default",
"cuav_x7pro_default",
"cubepilot_cubeorange_default",
2023-07-18 12:25:51 -03:00
"cubepilot_cubeorangeplus_default",
"cubepilot_cubeyellow_default",
2022-04-25 22:53:58 -03:00
"diatone_mamba-f405-mk2_default",
2023-07-18 12:25:51 -03:00
"flywoo_gn-f405_default",
"freefly_can-rtk-gps_canbootloader",
"freefly_can-rtk-gps_default",
"holybro_can-gps-v1_canbootloader",
"holybro_can-gps-v1_default",
"holybro_durandal-v1_default",
2020-08-09 12:48:38 -03:00
"holybro_kakutef7_default",
2022-04-07 16:56:51 -03:00
"holybro_kakuteh7_default",
"holybro_kakuteh7mini_default",
"holybro_kakuteh7v2_default",
2020-08-09 12:48:38 -03:00
"holybro_pix32v5_default",
"matek_gnss-m9n-f4_canbootloader",
"matek_gnss-m9n-f4_default",
"matek_h743-mini_default",
"matek_h743-slim_default",
"matek_h743_default",
2020-01-22 15:58:57 -04:00
"modalai_fc-v1_default",
"modalai_fc-v2_default",
2023-07-18 12:25:51 -03:00
"mro_ctrl-zero-classic_default",
2021-02-24 13:22:31 -04:00
"mro_ctrl-zero-f7-oem_default",
"mro_ctrl-zero-f7_default",
2021-02-24 13:22:31 -04:00
"mro_ctrl-zero-h7-oem_default",
"mro_ctrl-zero-h7_default",
"mro_pixracerpro_default",
"mro_x21-777_default",
"mro_x21_default",
"nxp_fmuk66-e_default",
2021-03-02 13:05:19 -04:00
"nxp_fmuk66-e_socketcan",
2020-01-22 15:58:57 -04:00
"nxp_fmuk66-v3_default",
2021-01-10 23:02:24 -04:00
"nxp_fmuk66-v3_socketcan",
2023-07-18 12:25:51 -03:00
"nxp_mr-canhubk3_default",
"nxp_ucans32k146_canbootloader",
"nxp_ucans32k146_default",
2020-01-22 15:58:57 -04:00
"omnibus_f4sd_default",
"px4_fmu-v2_default",
"px4_fmu-v2_fixedwing",
"px4_fmu-v2_lto",
"px4_fmu-v2_multicopter",
"px4_fmu-v2_rover",
"px4_fmu-v3_default",
"px4_fmu-v4_default",
"px4_fmu-v4pro_default",
"px4_fmu-v5_cyphal",
"px4_fmu-v5_debug",
2021-01-10 23:02:24 -04:00
"px4_fmu-v5_default",
"px4_fmu-v5_lto",
"px4_fmu-v5_rover",
"px4_fmu-v5_stackcheck",
"px4_fmu-v5_uavcanv0periph",
"px4_fmu-v5x_default",
"px4_fmu-v5x_rover",
"px4_fmu-v6c_default",
"px4_fmu-v6c_rover",
2021-02-02 11:50:26 -04:00
"px4_fmu-v6u_default",
"px4_fmu-v6u_rover",
"px4_fmu-v6x_default",
"px4_fmu-v6x_rover",
Intial Commit PX4 FMUV6RT nxp/rt117x:Fix Pin IRQ nxp/rt117x:Support 4 i2c busses nxp/rt117x:Add px4io_serial support nxp/imxrt:Expand ToneAlarmInterface to GPT 3 & 4 px4_fmu-6xrt:Using imxrt_flexspi_nor_octal px4_fmu-6xrt:Entry is start px4_fmu-6xrt:Add Proper MTD px4_fmu-6xrt:Set I2C Buses px4_fmu-6xrt:Proper SPI usage px4_fmu-6xrt:Adjust memory Map to use the 2 MB px4_fmu-6xrt:Bring in ROMAPI px4_fmu-6xrt:Push FLASH to 200Mhz px4_fmu-6xrt:Use BOARD_I2C_LATEINIT px4_fmu-6xrt:Clock Config remove unused devices px4_fmu-6xrt:Remove EVK SDRAM IO px4_fmu-6xrt:Enable SE550 using HW_VER_REV_DRIVE px4_fmu-6xrt:Use MTD to mount FRAM on Flex SPI px4_fmu-6xrt:Manifest px4_fmu-6xrt:Restore board_peripheral_reset px4_fmu-6xrt:Set I2C buss Interna/Externa and startup nxp/rt117x:Set 6 I2C busses px4_fmu-6xrt:Correct Clock Sources and Freqency Settings px4_fmu-6xrt:Correct ADC Settings px4_fmu-6xrt:Tune FlexSPI config and sync header with debug variant Linker prep for rodata ahb partitioning px4_fmu-6xrt:FlexSPI prefetch partition split .text and .rodata Current config 1KB Prefetch .rodata 3KB Prefetch .text px4_fmu-6xrt:Run imxrt_flash_setup_prefetch_partition from ram with barriers px4_fmu-6xrt:Use All OCTL setting from FLASH g_flash_config SANS lookupTable px4_fmu-6xrt:Octal spi boot/debug problem bypass px4_fmu-6xrt:Add PWM test px4_fmu-6xrt:Fix clockconfig and USB vbus sense px4_fmu-6xrt: Use TCM px4_fmu-6xrt: Ethernet bringup imxrt: use unique_id register for board_identity px4_fmu-6xrt: update ITCM mapping, todo proper trap on pc hitting 0x0 px4_fmu-6xrt:correct rotation icm42688p onboard imu rt117x: Add SSARC HP RAM driver for memory dumps px4_fmu-6xrt: Enable hardfault_log px4_fmu-6xrt: Enable DMA pool px4_fmu-6xrt: fix uart mapping px4_fmu-6xrt: enable SocketCAN & DroneCAN px4_fmu-6xrt:Command line history TAB completion px4_fmu-6xrt:Fix pinning duplication px4_fmu-6xrt:Support conditional PHY address based on selected PHY px4_fmu-6xrt:Add Pull Downs on CTS, use GPIO for RTS px4_fmu-6xrt:Set TelemN TX Slew rate and Drive Strenth to max px4_fmu-6xrt::Set TELEM Buffers add HW HS px4_fmu-6xrt:Turn off DMA poll px4_fmu-6xrt:RC_SERIAL_PORT needed to be px4io to disable rc_input using TELEM2! px4_fmu-6xrt: bootloader (#22228) * imxrt:Add bootloader support * bootloader:imxrt clear BOOT_RTC_SIGNATURE * px4_fmu-6xrt:Add bootloader * px4_fmu-6xrt:bootloader removed ADC * px4_fmu-6xrt:bootloader base bootloader script off of script.ld * px4_fmu-6xrt:add _bootdelay_signature & change entry from 0x30000000 to 0x30040000 * px4_fmu-6xrt:hw_config Bootloader has to have 12 bytes px4_fmu-6xrt:Default to use LAN8742A PHY px4_fmu-v6xrt:VID Set to Drone Code board_reset:Enable ability to write RTC GP regs px4_fmu-6xrt:Fix CMP0079 error rt117x:micro_hal Add a PX4_MAKE_GPIO_PULLED_INPUT px4_fmu-v6xrt:Set CTS High before VDD_5V applided to ports to avoid radios fro entering bootloaders fmu-v6xrt: increase 5v down time fmu-v6xrt:Ready for Release DEBUGASSERTS off and Console 57600, Bootloder updated. imxrt:board_hw_rev_ver Rework for 3.893V Ref px4_fmu-v6xrt:Move ADC to Port3
2023-05-02 11:00:24 -03:00
"px4_fmu-v6xrt_bootloader",
"px4_fmu-v6xrt_default",
"px4_fmu-v6xrt_rover",
2020-01-22 15:58:57 -04:00
"px4_io-v2_default",
"raspberrypi_pico_default",
"siyi_n7_default",
"sky-drones_smartap-airlink_default",
"spracing_h7extreme_default",
2023-02-19 22:45:39 -04:00
"thepeach_k1_default",
"thepeach_r1_default",
"uvify_core_default",
2020-01-22 16:02:55 -04:00
],
image: docker_images.nuttx,
archive: true
]
def docker_builds = [
armhf_builds, base_builds, nuttx_builds_archive
]
for (def build_type = 0; build_type < docker_builds.size(); build_type++) {
for (def build_target = 0; build_target < docker_builds[build_type].target.size(); build_target++) {
build_nodes.put(docker_builds[build_type].target[build_target],
createBuildNode(docker_builds[build_type].archive, docker_builds[build_type].image, docker_builds[build_type].target[build_target])
)
}
}
parallel build_nodes
} // script
} // steps
} // stage Build
// TODO: actually upload artifacts to S3
// stage('S3 Upload') {
// agent {
// docker { image 'px4io/px4-dev-base-focal:2021-09-08' }
// }
// options {
// skipDefaultCheckout()
// }
// when {
// anyOf {
// branch 'master'
// branch 'beta'
// branch 'stable'
// branch 'pr-jenkins' // for testing
// }
// }
// steps {
// sh 'echo "uploading to S3"'
// }
// }
} // stages
environment {
CCACHE_DIR = '/tmp/ccache'
CI = true
}
options {
buildDiscarder(logRotator(numToKeepStr: '5', artifactDaysToKeepStr: '14'))
2023-07-25 11:56:45 -03:00
timeout(time: 120, unit: 'MINUTES')
}
}
def createBuildNode(Boolean archive, String docker_image, String target) {
return {
bypass_entrypoint = ''
node {
docker.withRegistry('https://registry.hub.docker.com', 'docker_hub_dagar') {
docker.image(docker_image).inside('-e CCACHE_BASEDIR=${WORKSPACE} -v ${CCACHE_DIR}:${CCACHE_DIR}:rw' + bypass_entrypoint) {
stage(target) {
try {
sh('export')
checkout(scm)
sh('make distclean; git clean -ff -x -d .')
sh('git fetch --tags')
sh('ccache -s')
sh('make ' + target)
sh('ccache -s')
sh('make sizes')
if (archive) {
archiveArtifacts(allowEmptyArchive: false, artifacts: 'build/*/*.px4, build/*/*.elf, build/*/*.bin', fingerprint: true, onlyIfSuccessful: true)
}
sh('make ' + target + ' package')
archiveArtifacts(allowEmptyArchive: true, artifacts: 'build/*/*.tar.bz2', fingerprint: true, onlyIfSuccessful: true)
archiveArtifacts(allowEmptyArchive: true, artifacts: 'build/*/*.deb', fingerprint: true, onlyIfSuccessful: true)
}
catch (exc) {
throw (exc)
}
finally {
sh('make distclean; git clean -ff -x -d .')
}
}
}
}
}
}
}