-
Notifications
You must be signed in to change notification settings - Fork 128
[WIP] Release/v4.0.0 This is just to have the release 4.0 builds for testing (Please dont merge it yet #1217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -5,33 +5,31 @@ name: Java CI with Maven | |||||||||||||||||||
|
||||||||||||||||||||
on: | ||||||||||||||||||||
push: | ||||||||||||||||||||
branches: [ master ] | ||||||||||||||||||||
branches: | ||||||||||||||||||||
- master | ||||||||||||||||||||
- release/** | ||||||||||||||||||||
pull_request: | ||||||||||||||||||||
branches: [ master ] | ||||||||||||||||||||
branches: | ||||||||||||||||||||
- master | ||||||||||||||||||||
- release/** | ||||||||||||||||||||
|
||||||||||||||||||||
jobs: | ||||||||||||||||||||
build: | ||||||||||||||||||||
build_linux: | ||||||||||||||||||||
|
||||||||||||||||||||
runs-on: | ||||||||||||||||||||
- self-hosted | ||||||||||||||||||||
- eclipse | ||||||||||||||||||||
- BrnoUBU0004 | ||||||||||||||||||||
runs-on: [self-hosted, eclipse, BrnoUBU0004] | ||||||||||||||||||||
|
||||||||||||||||||||
steps: | ||||||||||||||||||||
- uses: actions/checkout@v2 | ||||||||||||||||||||
|
||||||||||||||||||||
- name: Clone IDF Release From Github | ||||||||||||||||||||
uses: actions/checkout@v2 | ||||||||||||||||||||
with: | ||||||||||||||||||||
repository: espressif/esp-idf | ||||||||||||||||||||
path: dependencies/idf-tools | ||||||||||||||||||||
submodules: 'true' | ||||||||||||||||||||
ref: release/v5.1 | ||||||||||||||||||||
- uses: actions/checkout@v4 | ||||||||||||||||||||
|
||||||||||||||||||||
- name: Set up Python | ||||||||||||||||||||
uses: actions/setup-python@v2 | ||||||||||||||||||||
with: | ||||||||||||||||||||
python-version: '3.10' | ||||||||||||||||||||
python-version: '3.10' | ||||||||||||||||||||
Comment on lines
24
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Update Python setup action to latest version - uses: actions/setup-python@v2
+ uses: actions/setup-python@v4 📝 Committable suggestion
Suggested change
🧰 Tools🪛 actionlint (1.7.4)25-25: the runner of "actions/setup-python@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue (action) |
||||||||||||||||||||
|
||||||||||||||||||||
- name: Install ESP-IDF via eim | ||||||||||||||||||||
uses: espressif/install-esp-idf-action@v1 | ||||||||||||||||||||
with: | ||||||||||||||||||||
version: 'v5.3' | ||||||||||||||||||||
|
||||||||||||||||||||
Comment on lines
+29
to
33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove tab characters to fix YAML syntax error - uses: espressif/install-esp-idf-action@v1 # contains tabs
+ uses: espressif/install-esp-idf-action@v1 # tabs → spaces 📝 Committable suggestion
Suggested change
🧰 Tools🪛 YAMLlint (1.35.1)[error] 29-29: syntax error: found character '\t' that cannot start any token (syntax) |
||||||||||||||||||||
- name: Set up Maven | ||||||||||||||||||||
uses: stCarolas/setup-maven@v5 | ||||||||||||||||||||
|
@@ -42,8 +40,9 @@ jobs: | |||||||||||||||||||
uses: actions/setup-java@v4 | ||||||||||||||||||||
with: | ||||||||||||||||||||
java-version: '21' | ||||||||||||||||||||
distribution: 'temurin' | ||||||||||||||||||||
|
||||||||||||||||||||
distribution: 'temurin' | ||||||||||||||||||||
cache: 'maven' | ||||||||||||||||||||
|
||||||||||||||||||||
- name: Build with Maven | ||||||||||||||||||||
run: export NO_AT_BRIDGE=1 && mvn clean verify -Djarsigner.skip=true -DskipTests=false -DtestWorkspace=/opt/actions-runner/_work/workspace | ||||||||||||||||||||
|
||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -5,9 +5,13 @@ name: Java CI with Maven on Windows | |||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
on: | ||||||||||||||||||||||||||||||||||||
push: | ||||||||||||||||||||||||||||||||||||
branches: [ master ] | ||||||||||||||||||||||||||||||||||||
branches: | ||||||||||||||||||||||||||||||||||||
- master | ||||||||||||||||||||||||||||||||||||
- release/** | ||||||||||||||||||||||||||||||||||||
pull_request: | ||||||||||||||||||||||||||||||||||||
branches: [ master ] | ||||||||||||||||||||||||||||||||||||
branches: | ||||||||||||||||||||||||||||||||||||
- master | ||||||||||||||||||||||||||||||||||||
- release/** | ||||||||||||||||||||||||||||||||||||
Comment on lines
+8
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix YAML indentation under triggers Proposed patch: on:
push:
- branches:
- - master
- - release/**
+ branches:
+ - master
+ - release/**
pull_request:
- branches:
- - master
- - release/**
+ branches:
+ - master
+ - release/** 📝 Committable suggestion
Suggested change
🧰 Tools🪛 YAMLlint (1.35.1)[warning] 9-9: wrong indentation: expected 6 but found 5 (indentation) [warning] 13-13: wrong indentation: expected 6 but found 5 (indentation) |
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
jobs: | ||||||||||||||||||||||||||||||||||||
build_windows: | ||||||||||||||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.espressif.idf.core.tools; | ||
|
||
public interface EimConstants | ||
{ | ||
String EIM_JSON = "eim_idf.json"; //$NON-NLS-1$ | ||
|
||
String EIM_POSIX_DIR = System.getProperty("user.home").concat("/.espressif/tools/"); //$NON-NLS-1$//$NON-NLS-2$ | ||
|
||
String EIM_WIN_DIR = "C:\\Espressif\\tools\\"; //$NON-NLS-1$ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Avoid hardcoding installation paths The Windows installation directory is hardcoded, which may not respect user customizations or non-standard installation locations. Consider using environment variables or configuration settings to allow for customization. |
||
|
||
String EIM_WIN_PATH = EIM_WIN_DIR + EIM_JSON; | ||
|
||
String EIM_URL = "https://dl.espressif.com/dl/eim/"; //$NON-NLS-1$ | ||
|
||
String EIM_POSIX_PATH = EIM_POSIX_DIR + EIM_JSON; | ||
|
||
String INSTALL_TOOLS_FLAG = "INSTALL_TOOLS_FLAG"; //$NON-NLS-1$ | ||
|
||
String TOOL_SET_CONFIG_LEGACY_CONFIG_FILE = "tool_set_config.json"; //$NON-NLS-1$ | ||
|
||
String OLD_CONFIG_EXPORTED_FLAG = "OLD_CONFIG_EXPORTED_FLAG"; //$NON-NLS-1$ | ||
} |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,47 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||
package com.espressif.idf.core.tools; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
import java.io.FileReader; | ||||||||||||||||||||||||||||||||||||||||||||||||||
import java.io.IOException; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
import org.eclipse.core.runtime.Platform; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
import com.espressif.idf.core.tools.vo.EimJson; | ||||||||||||||||||||||||||||||||||||||||||||||||||
import com.google.gson.Gson; | ||||||||||||||||||||||||||||||||||||||||||||||||||
import com.google.gson.GsonBuilder; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
public class EimIdfConfiguratinParser | ||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||
private EimJson eimJson; | ||||||||||||||||||||||||||||||||||||||||||||||||||
private Gson gson; | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
public EimIdfConfiguratinParser() | ||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||
gson = new GsonBuilder().setPrettyPrinting().enableComplexMapKeySerialization() | ||||||||||||||||||||||||||||||||||||||||||||||||||
.excludeFieldsWithoutExposeAnnotation().create(); | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
private void load() throws IOException | ||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||
try (FileReader fileReader = new FileReader( | ||||||||||||||||||||||||||||||||||||||||||||||||||
Platform.getOS().equals(Platform.OS_WIN32) ? EimConstants.EIM_WIN_PATH : EimConstants.EIM_POSIX_PATH)) | ||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||
eimJson = gson.fromJson(fileReader, EimJson.class); | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+23
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Add file existence check before attempting to read The private void load() throws IOException
{
+ File file = new File(Platform.getOS().equals(Platform.OS_WIN32) ? EimConstants.EIM_WIN_PATH : EimConstants.EIM_POSIX_PATH);
+ if (!file.exists()) {
+ throw new FileNotFoundException("EIM JSON configuration file not found: " + file.getAbsolutePath());
+ }
try (FileReader fileReader = new FileReader(
- Platform.getOS().equals(Platform.OS_WIN32) ? EimConstants.EIM_WIN_PATH : EimConstants.EIM_POSIX_PATH))
+ file))
{
eimJson = gson.fromJson(fileReader, EimJson.class);
}
} 📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
public EimJson getEimJson(boolean reload) throws IOException | ||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||
if (reload) | ||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||
load(); | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
if (eimJson == null) | ||||||||||||||||||||||||||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||||||||||||||||||||||||||
load(); | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
return eimJson; | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+32
to
+46
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Improve method efficiency and thread safety The -public EimJson getEimJson(boolean reload) throws IOException
+public synchronized EimJson getEimJson(boolean reload) throws IOException
{
- if (reload)
+ if (reload || eimJson == null)
{
load();
}
-
- if (eimJson == null)
- {
- load();
- }
return eimJson;
} |
||||||||||||||||||||||||||||||||||||||||||||||||||
} |
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix YAML indentation under triggers
The list items for
push.branches
andpull_request.branches
are mis-indented (5 spaces instead of 6). Correcting this will prevent YAML parsing issues.🧰 Tools
🪛 YAMLlint (1.35.1)
[warning] 9-9: wrong indentation: expected 6 but found 5
(indentation)
[warning] 13-13: wrong indentation: expected 6 but found 5
(indentation)