[build] Update to 2023.2.4 native-utils and new dependencies (#4473)

* Disable class-memaccess warning in Eigen
* Shim NiFpga_OpenHostMemoryBuffer
* Don't deploy .debug files in integration tests
This commit is contained in:
Peter Johnson
2022-10-14 23:36:47 -07:00
committed by GitHub
parent 574cb41c18
commit 1f45732700
13 changed files with 87 additions and 39 deletions

View File

@@ -14,7 +14,7 @@ jobs:
include:
- os: ubuntu-latest
name: Linux
container: wpilib/roborio-cross-ubuntu:2022-20.04
container: wpilib/roborio-cross-ubuntu:2023-22.04
flags: ""
- os: macOS-11
name: macOS
@@ -27,11 +27,16 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libopencv-dev libopencv4.5-java python-is-python3
- name: Install opencv (macOS)
run: brew install opencv
if: runner.os == 'macOS'
- name: Set up Python 3.8
- name: Set up Python 3.8 (macOS)
if: runner.os == 'macOS'
uses: actions/setup-python@v2
with:
python-version: 3.8

View File

@@ -10,7 +10,7 @@ jobs:
build:
name: "Build"
runs-on: ubuntu-latest
container: wpilib/gazebo-ubuntu:20.04
container: wpilib/gazebo-ubuntu:22.04
steps:
- uses: actions/checkout@v3
with:

View File

@@ -12,16 +12,16 @@ jobs:
fail-fast: false
matrix:
include:
- container: wpilib/roborio-cross-ubuntu:2022-20.04
- container: wpilib/roborio-cross-ubuntu:2023-22.04
artifact-name: Athena
build-options: "-Ponlylinuxathena"
- container: wpilib/raspbian-cross-ubuntu:10-20.04
- container: wpilib/raspbian-cross-ubuntu:bullseye-22.04
artifact-name: Arm32
build-options: "-Ponlylinuxarm32"
- container: wpilib/aarch64-cross-ubuntu:bionic-20.04
- container: wpilib/aarch64-cross-ubuntu:bullseye-22.04
artifact-name: Arm64
build-options: "-Ponlylinuxarm64"
- container: wpilib/ubuntu-base:20.04
- container: wpilib/ubuntu-base:22.04
artifact-name: Linux
build-options: "-Ponlylinuxx86-64"
name: "Build - ${{ matrix.artifact-name }}"

View File

@@ -49,7 +49,7 @@ jobs:
tidy:
name: "clang-tidy"
runs-on: ubuntu-latest
container: wpilib/roborio-cross-ubuntu:2022-20.04
container: wpilib/roborio-cross-ubuntu:2023-22.04
steps:
- uses: actions/checkout@v3
- name: Fetch all history and metadata
@@ -79,7 +79,7 @@ jobs:
javaformat:
name: "Java format"
runs-on: ubuntu-latest
container: wpilib/ubuntu-base:20.04
container: wpilib/ubuntu-base:22.04
steps:
- uses: actions/checkout@v3
- name: Fetch all history and metadata

View File

@@ -26,23 +26,12 @@ jobs:
ctest-flags: ""
name: "${{ matrix.name }}"
runs-on: ubuntu-latest
container: wpilib/roborio-cross-ubuntu:2022-20.04
container: wpilib/roborio-cross-ubuntu:2023-22.04
steps:
- uses: actions/checkout@v3
- name: Install Dependencies
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt install -y gcc-11 g++-11
sudo update-alternatives \
--install /usr/bin/gcc gcc /usr/bin/gcc-11 11 \
--slave /usr/bin/g++ g++ /usr/bin/g++-11
sudo update-alternatives --set gcc /usr/bin/gcc-11
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
run: sudo apt-get update && sudo apt-get install -y libopencv-dev libopencv4.5-java python-is-python3
- name: Install jinja
run: python -m pip install jinja2

View File

@@ -15,7 +15,7 @@ stages:
vmImage: 'ubuntu-latest'
container:
image: wpilib/roborio-cross-ubuntu:2022-18.04
image: wpilib/roborio-cross-ubuntu:2023-22.04
timeoutInMinutes: 0

View File

@@ -5,5 +5,5 @@ repositories {
}
}
dependencies {
implementation "edu.wpi.first:native-utils:2023.1.0"
implementation "edu.wpi.first:native-utils:2023.2.4"
}

View File

@@ -21,6 +21,51 @@
using namespace hal;
extern "C" {
NiFpga_Status NiFpga_ClientFunctionCall(NiFpga_Session session, uint32_t group,
uint32_t functionId,
const void* inBuffer,
size_t inBufferSize, void* outBuffer,
size_t outBufferSize);
} // extern "C"
// Shim for broken ChipObject function
static const uint32_t clientFeature_hostMemoryBuffer = 0;
static const uint32_t hostMemoryBufferFunction_open = 2;
// Input arguments for HMB open
struct AtomicHMBOpenInputs {
const char* memoryName;
};
// Output arguments for HMB open
struct AtomicHMBOpenOutputs {
size_t size;
void* virtualAddress;
};
static NiFpga_Status OpenHostMemoryBuffer(NiFpga_Session session,
const char* memoryName,
void** virtualAddress, size_t* size) {
struct AtomicHMBOpenOutputs outputs;
struct AtomicHMBOpenInputs inputs;
inputs.memoryName = memoryName;
NiFpga_Status retval = NiFpga_ClientFunctionCall(
session, clientFeature_hostMemoryBuffer, hostMemoryBufferFunction_open,
&inputs, sizeof(struct AtomicHMBOpenInputs), &outputs,
sizeof(struct AtomicHMBOpenOutputs));
if (NiFpga_IsError(retval)) {
return retval;
}
*virtualAddress = outputs.virtualAddress;
if (size) {
*size = outputs.size;
}
return retval;
}
namespace {
struct AddressableLED {
std::unique_ptr<tLED> led;
@@ -101,8 +146,8 @@ HAL_AddressableLEDHandle HAL_InitializeAddressableLED(
uint32_t session = led->led->getSystemInterface()->getHandle();
*status = NiFpga_OpenHostMemoryBuffer(session, "HMB_0_LED", &led->ledBuffer,
&led->ledBufferSize);
*status = OpenHostMemoryBuffer(session, "HMB_0_LED", &led->ledBuffer,
&led->ledBufferSize);
if (*status != 0) {
addressableLEDHandles->Free(handle);

View File

@@ -14,10 +14,10 @@ nativeUtils {
wpi {
configureDependencies {
wpiVersion = "-1"
niLibVersion = "2022.4.0"
opencvVersion = "4.5.5-3"
googleTestVersion = "1.11.0-2"
imguiVersion = "1.88-4"
niLibVersion = "2023.1.0"
opencvVersion = "4.6.0-2"
googleTestVersion = "1.11.0-3"
imguiVersion = "1.88-5"
wpimathVersion = "-1"
}
}

View File

@@ -1,4 +1,4 @@
def opencvVersion = '4.5.2-1'
def opencvVersion = '4.6.0-2'
if (project.hasProperty('useCpp') && project.useCpp) {
model {
@@ -22,12 +22,12 @@ if (project.hasProperty('useCpp') && project.useCpp) {
if (project.hasProperty('useJava') && project.useJava) {
dependencies {
implementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:${opencvVersion}"
implementation "edu.wpi.first.thirdparty.frc2023.opencv:opencv-java:${opencvVersion}"
if (!project.hasProperty('skipDev') || !project.skipDev) {
devImplementation "edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:${opencvVersion}"
devImplementation "edu.wpi.first.thirdparty.frc2023.opencv:opencv-java:${opencvVersion}"
}
if (project.hasProperty('useDocumentation') && project.useDocumentation) {
javaSource "edu.wpi.first.thirdparty.frc2022.opencv:opencv-java:${opencvVersion}:sources"
javaSource "edu.wpi.first.thirdparty.frc2023.opencv:opencv-java:${opencvVersion}:sources"
}
}
}

View File

@@ -1,20 +1,23 @@
From bfd3aa822ff70908c44ad2880b91d9a8dbc1ce7e Mon Sep 17 00:00:00 2001
From 3bfc3d1e3cbc9d7032446cc4aa6246d1c7750901 Mon Sep 17 00:00:00 2001
From: Tyler Veness <calcmogul@gmail.com>
Date: Wed, 18 May 2022 09:14:24 -0700
Subject: [PATCH] Disable warnings
---
Eigen/src/Core/util/DisableStupidWarnings.h | 8 ++++++++
1 file changed, 8 insertions(+)
Eigen/src/Core/util/DisableStupidWarnings.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/Eigen/src/Core/util/DisableStupidWarnings.h b/Eigen/src/Core/util/DisableStupidWarnings.h
index fe0cfec0b..9e8a0e7a9 100755
index fe0cfec..d973255 100755
--- a/Eigen/src/Core/util/DisableStupidWarnings.h
+++ b/Eigen/src/Core/util/DisableStupidWarnings.h
@@ -71,6 +71,14 @@
@@ -71,6 +71,17 @@
// See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89325
#pragma GCC diagnostic ignored "-Wattributes"
#endif
+ #if __GNUC__>=8
+ #pragma GCC diagnostic ignored "-Wclass-memaccess"
+ #endif
+ #if __GNUC__>=11
+ // This warning is a false positive
+ #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"

View File

@@ -85,6 +85,9 @@ model {
into '/cpp'
}
installTask.libs.each {
if (it.absolutePath.endsWith('.debug')) {
return
}
task.from(it) {
into '/libs'
}

View File

@@ -71,6 +71,9 @@
// See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89325
#pragma GCC diagnostic ignored "-Wattributes"
#endif
#if __GNUC__>=8
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#endif
#if __GNUC__>=11
// This warning is a false positive
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"