Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/actions/checkout-4…
Browse files Browse the repository at this point in the history
….1.4
  • Loading branch information
soumeh01 authored Apr 29, 2024
2 parents 769fd1d + d024f5a commit 1b88849
Show file tree
Hide file tree
Showing 12 changed files with 81 additions and 47 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/buildmgr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,39 +205,39 @@ jobs:
mkdir -p tools/buildmgr/cbuildgen/distribution/doc
- name: Download cbuildgen linux-amd64
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: cbuildgen-linux-amd64
path: tools/buildmgr/cbuildgen/distribution/bin/

- name: Download cbuildgen linux-arm64
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: cbuildgen-linux-arm64
path: tools/buildmgr/cbuildgen/distribution/bin/

- name: Download cbuildgen macos-amd64
if: ${{ !github.event.repository.private }}
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: cbuildgen-darwin-amd64
path: tools/buildmgr/cbuildgen/distribution/bin/

- name: Download cbuildgen macos-arm64
if: ${{ !github.event.repository.private }}
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: cbuildgen-darwin-arm64
path: tools/buildmgr/cbuildgen/distribution/bin/

- name: Download cbuildgen windows-amd64
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: cbuildgen-windows-amd64
path: tools/buildmgr/cbuildgen/distribution/bin/

- name: Download cbuildgen windows-arm64
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: cbuildgen-windows-arm64
path: tools/buildmgr/cbuildgen/distribution/bin/
Expand All @@ -248,7 +248,7 @@ jobs:
working-directory: tools/buildmgr/cbuildgen/distribution/bin

- name: Download documentation
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: documentation
path: tools/buildmgr/cbuildgen/distribution/doc/
Expand Down Expand Up @@ -371,13 +371,13 @@ jobs:
path: ${{ env.CMSIS_PACK_ROOT }}

- name: Download cbuild_install
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: cbuild_install
path: ${{ github.workspace }}

- name: Download deb_package
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: deb_package
path: ${{ github.workspace }}
Expand Down Expand Up @@ -586,7 +586,7 @@ jobs:
matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }}
steps:
- name: Download cbuild_install
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: cbuild_install
path: ${{ github.workspace }}
Expand Down Expand Up @@ -627,7 +627,7 @@ jobs:
image: [ "debian:buster" ]
steps:
- name: Download cbuild_install
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: cbuild_install
path: ${{ github.workspace }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
lcov
- name: Download coverage report
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
pattern: coverage-report-*
path: coverage/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/packchk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ jobs:
mkdir -p tools/packchk/distribution/
- name: Download coverage report
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: coverage-report-packchk
path: tools/packchk/distribution/coverage/
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/packgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,37 +97,37 @@ jobs:
cp -r tools/packgen/test/data/CMakeTestMultipleBuilds/ tools/packgen/distribution/doc/examples/
- name: Download packgen linux-amd64
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: packgen-linux-amd64
path: tools/packgen/distribution/bin/linux-amd64/

- name: Download packgen linux arm64
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: packgen-linux-arm64
path: tools/packgen/distribution/bin/linux-arm64/

- name: Download packgen macos-amd64
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: packgen-darwin-amd64
path: tools/packgen/distribution/bin/darwin-amd64/

- name: Download packgen macos-arm64
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: packgen-darwin-arm64
path: tools/packgen/distribution/bin/darwin-arm64/

- name: Download packgen windows-amd64
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: packgen-windows-amd64
path: tools/packgen/distribution/bin/windows-amd64/

- name: Download packgen windows-arm64
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: packgen-windows-arm64
path: tools/packgen/distribution/bin/windows-arm64/
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/projmgr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,69 +156,69 @@ jobs:
cp -r tools/projmgr/templates/* tools/projmgr/distribution/etc/
- name: Download projmgr linux-amd64
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: projmgr-linux-amd64
path: tools/projmgr/distribution/bin/linux-amd64/

- name: Download projmgr linux-arm64
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: projmgr-linux-arm64
path: tools/projmgr/distribution/bin/linux-arm64/

- name: Download projmgr macos-amd64
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: projmgr-darwin-amd64
path: tools/projmgr/distribution/bin/darwin-amd64/

- name: Download projmgr macos-arm64
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: projmgr-darwin-arm64
path: tools/projmgr/distribution/bin/darwin-arm64/

- name: Download projmgr windows-amd64
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: projmgr-windows-amd64
path: tools/projmgr/distribution/bin/windows-amd64/

- name: Download projmgr windows-arm64
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: projmgr-windows-arm64
path: tools/projmgr/distribution/bin/windows-arm64/

- name: Download projmgr-swig-python linux-amd64
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: projmgr-swig-python-linux-amd64
path: tools/projmgr/distribution/lib/linux-amd64/python/

- name: Download projmgr-swig-python macos-amd64
if: ${{ !github.event.repository.private }}
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: projmgr-swig-python-darwin-amd64
path: tools/projmgr/distribution/lib/darwin-amd64/python/

- name: Download projmgr-swig-python windows-amd64
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: projmgr-swig-python-windows-amd64
path: tools/projmgr/distribution/lib/windows-amd64/python/

- name: Download projmgr-swig-go linux-amd64
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: projmgr-swig-go-linux-amd64
path: tools/projmgr/distribution/lib/linux-amd64/go/

- name: Download projmgr-swig-go macos-amd64
if: ${{ !github.event.repository.private }}
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: projmgr-swig-go-darwin-amd64
path: tools/projmgr/distribution/lib/darwin-amd64/go/
Expand All @@ -237,20 +237,20 @@ jobs:
asset_name: projmgr.zip

- name: Download test report windows-amd64
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: unit_test_result_projmgr-windows-amd64
path: tools/testreport/windows-amd64/

- name: Download test report linux-amd64
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: unit_test_result_projmgr-linux-amd64
path: tools/testreport/linux-amd64/

- name: Download test report macos-amd64
if: ${{ !github.event.repository.private }}
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: unit_test_result_projmgr-darwin-amd64
path: tools/testreport/darwin-amd64/
Expand All @@ -269,7 +269,7 @@ jobs:
asset_name: testreport.zip

- name: Download coverage report
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: coverage-report-projmgr
path: tools/coverage/
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/svdconv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ jobs:
mkdir -p tools/svdconv/distribution/
- name: Download coverage report
uses: actions/download-artifact@8caf195ad4b1dee92908e23f56eeb0696f1dd42d # v4.1.5
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: coverage-report-svdconv
path: tools/svdconv/distribution/coverage/
Expand Down
6 changes: 5 additions & 1 deletion libs/rtemodel/src/RteCallback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,14 @@ string RteCallback::ExpandString(const string& str) {
if (!activeTarget) {
return RteUtils::EMPTY_STRING;
}
const auto devicePackage = activeTarget->GetDevicePackage();
if (!devicePackage) {
return RteUtils::EMPTY_STRING;
}

const string& prjPath(activeProject->GetProjectPath());
const string& prjPathFile(prjPath + activeProject->GetName() + ".cprj");
const string& packPath(activeTarget->GetDevicePackage()->GetAbsolutePackagePath());
const string& packPath(devicePackage->GetAbsolutePackagePath());
const string& deviceName(activeTarget->GetDeviceName());
const string& generatorInputFile(activeTarget->GetGeneratorInputFile());

Expand Down
7 changes: 3 additions & 4 deletions libs/rtemodel/src/RtePackage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@ void RteReleaseContainer::Construct()
{
string version;
for (auto release : GetChildren()) {
const string& releaseVersion = release->GetVersionString();
if (version.empty() || VersionCmp::Compare(releaseVersion, version) > 0) {
version = releaseVersion;
}
// First release XML node is the version of the package
version = release->GetVersionString();
break;
}
AddAttribute("version", version);
}
Expand Down
6 changes: 3 additions & 3 deletions test/packs/ARM/RteTest_DFP/0.1.1/ARM.RteTest_DFP.pdsc
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<url>http://www.keil.com/pack/</url>

<releases>
<release version="0.1.0" date="2021-02-16">
Tag to check that the latest release item version is picked up even if it is below
</release>
<release version="0.1.1+metadata" date="2021-02-17">
Initial copy from ARM.CMSIS pack
</release>
<release version="0.1.0" date="2021-02-16">
Tag to check that the latest release item version is picked up even if it is below
</release>
</releases>

<taxonomy>
Expand Down
8 changes: 4 additions & 4 deletions test/packs/ARM/RteTest_DFP/0.2.0/ARM.RteTest_DFP.pdsc
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
<url>http://www.keil.com/pack/</url>

<releases>
<release version="0.1.0" date="2021-02-16">
Tag to check that the latest release item version is picked up even if it is below
<release version="0.2.0" date="2022-02-19">
Added a new device 'RteTest_ARMCM0_Dual'
</release>
<release version="0.1.1" date="2021-02-17">
Initial copy from ARM.CMSIS pack
</release>
<release version="0.2.0" date="2022-02-19">
Added a new device 'RteTest_ARMCM0_Dual'
<release version="0.1.0" date="2021-02-16">
Tag to check that the latest release item version is picked up even if it is below
</release>
</releases>
<taxonomy>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/Open-CMSIS-Pack/devtools/main/tools/projmgr/schemas/csolution.schema.json

solution:
target-types:
- type: CM0
device: RteTestGen_ARMCM0
compiler: AC6
optimize: balanced

build-types:
- type: Debug

- type: Release
optimize: none # optimize redefinition from target-type to build-type is not allowed

projects:
- project: ./test-gpdsc.cproject.yml
14 changes: 14 additions & 0 deletions tools/projmgr/test/src/ProjMgrUnitTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5428,3 +5428,17 @@ TEST_F(ProjMgrUnitTests, Executes) {
auto errStr = streamRedirect.GetErrorString();
EXPECT_NE(string::npos, errStr.find("error csolution: context 'unknown.Debug+RteTest_ARMCM3' referenced by access sequence 'elf' is not compatible"));
}

TEST_F(ProjMgrUnitTests, RunProjMgr_GeneratorError) {
char* argv[6];
StdStreamRedirect streamRedirect;
const string& csolution = testinput_folder + "/TestGenerator/test-gpdsc-error.csolution.yml";
argv[1] = (char*)"convert";
argv[2] = (char*)"--solution";
argv[3] = (char*)csolution.c_str();
argv[4] = (char*)"-o";
argv[5] = (char*)testoutput_folder.c_str();
EXPECT_EQ(1, RunProjMgr(6, argv, 0));
auto errStr = streamRedirect.GetErrorString();
EXPECT_NE(string::npos, errStr.find("error csolution: redefinition from 'balanced' into 'none' is not allowed"));
}

0 comments on commit 1b88849

Please sign in to comment.