-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Add renode-cli #28944
Open
MementoRC
wants to merge
63
commits into
conda-forge:main
Choose a base branch
from
MementoRC:renode-cli
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+576
−0
Open
Add renode-cli #28944
Changes from all commits
Commits
Show all changes
63 commits
Select commit
Hold shift + click to select a range
5b1d320
Add renode-cli
MementoRC fca5890
(fix) remove selectors. fix typos
MementoRC b29216e
(fix) add tests requirements
MementoRC 9e65189
(fix) separate arch/noarch
MementoRC bded9e6
(fix) update renode-cores for non-unix
MementoRC ab99f31
(fix) update renode-cores for non-unix
MementoRC c8a4e1b
(fix) use .bat for non-unix
MementoRC 37d1d27
(wip) damn working with win is like pulling teeth
MementoRC 3388248
(fix) use PS1
MementoRC e66d7d7
(ref) clean unix
MementoRC 309d872
(fix) call 'cleaned-out' function
MementoRC 35e9924
(fix) unix script args. permissions on non-unix
MementoRC 4606fb7
(fix) unix typos. ppc64 not on win?
MementoRC 51bc4e6
(wip) built non-unix till tests
MementoRC 37927b8
(ref) clean non-unix
MementoRC 413f1f9
(fix) tests fail?
MementoRC 4339a60
(fix) test script: hardcode pkg_name
MementoRC f206438
(fix) dynamic libraries loader?
MementoRC cab5f38
(fix) arm64 asm code
MementoRC 020a069
(ref) remove build.sh patch
MementoRC 0d3e416
(dev) remove patches, switch to arch renode-cli
MementoRC a663b6e
(wip) solved ppc64 non-unix. Odd 'do' fail
MementoRC 4d819f2
(wip) closing in on that wraith of an OS
MementoRC dc9010d
(dev) sed error?
MementoRC 9094271
(fix) win: .so not copied to cli. arm64: clobbered
MementoRC b306356
(fix) win build update
MementoRC 5a7e35c
(ref) cleanup
MementoRC 7348f94
(fix) corect OS for licenses
MementoRC 8f4ad8c
(wip) remove build_prefix deps
MementoRC 055d176
(fix) update licenses copy for windows
MementoRC b5d391b
(ref) skip win
MementoRC 8230d8d
(ref) odd CR ussue with patch
MementoRC 06d557a
(fix) typo
MementoRC 9b35d0b
(fix) link the cores?
MementoRC a5702cf
(fix) os mismatch
MementoRC 5ec33b3
Update recipes/renode-cli/variants.yaml
MementoRC 066057b
Update recipes/renode-cli/build.sh
MementoRC ff48eb4
Update recipes/renode-cores/variants.yaml
MementoRC e4af681
Update recipes/renode-cli/build.sh
MementoRC 37ca761
(fix) removed win build to simplify review. WIP
MementoRC f3c635e
(fix) no win for cli
MementoRC a7e1892
(fix) share, not opt
MementoRC 34ffa68
(fix) Do we need to install the tests?
MementoRC c2d515e
(fix) Simplify win cores to single ps1
MementoRC 77049f7
(fix) ninja. core one build.sh
MementoRC f6ec8e9
(fix) missing folder
MementoRC ba81074
(fix) single cli build.sh
MementoRC 9a423f1
(fix) create bin dir
MementoRC 5c24d18
(fix) missing logic in refactor
MementoRC 58b5444
(fix) typo
MementoRC 253120d
(fix) ill-placed ""
MementoRC 3a54b45
(fix) several ill-placed ""
MementoRC 3f7b5be
(fix) consolidate build.sh. adding win scaffold
MementoRC 17f0b53
(wip) updated windows recipe
MementoRC 8678248
(ref) fullpath to license-files
MementoRC b108e6e
(ref) use _NET properties
MementoRC 62d7e52
(wip) updated windows recipe
MementoRC c2494cd
(fix) sign. correct location Renode.dll
MementoRC 4c30885
(fix) simplified build (linux passes locally)
MementoRC 4ae7e8d
(fix) remove function
MementoRC 1e10379
(fix) various typos
MementoRC 8ec21af
(wip) updated windows recipe
MementoRC 1e38438
(ref) Clean-up
MementoRC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@echo off | ||
powershell -ExecutionPolicy Bypass -File "%RECIPE_DIR%\helpers\renode_build_with_dotnet.ps1" | ||
if %errorlevel% neq 0 exit /b %errorlevel% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o xtrace -o nounset -o pipefail -o errexit | ||
|
||
export PATH="${DOTNET_ROOT}/dotnet:${PATH}" | ||
|
||
dotnet_version=$(dotnet --version) | ||
framework_version=${dotnet_version%.*} | ||
|
||
# Patch project files | ||
find lib src tests -name "*.csproj" -exec sed -i -E "s/([>;])net6.0([<;])/\1net${framework_version}\2/g" {} \; | ||
|
||
# Remove obj and bin directories | ||
find . -name "obj" -o -name "bin" -type d -exec rm -rf {} + | ||
|
||
# Fix typo in Renode_NET.sln | ||
if [[ "${PKG_VERSION}" == "1.15.3" ]]; then | ||
sed -i -E 's/ReleaseHeadless\|Any (.+) = Debug/ReleaseHeadless\|Any \1 = Release/' Renode_NET.sln | ||
sed -i -E 's/GetBytes\(registers.Read\(offset\)\);/GetBytes((ushort)registers.Read(offset));/' src/Infrastructure/src/Emulator/Peripherals/Peripherals/Sensors/PAC1934.cs | ||
sed -i -E 's/"System.Drawing.Common" Version="5.0.2"/"System.Drawing.Common" Version="5.0.3"/' lib/termsharp/TermSharp_NET.csproj lib/termsharp/xwt/Xwt.Gtk/Xwt.Gtk3_NET.csproj | ||
else | ||
echo "Remove these patches from the script after 1.15.3" | ||
exit 1 | ||
fi | ||
|
||
# Prepare for build | ||
mkdir -p "${SRC_DIR}/src/Infrastructure/src/Emulator/Cores/bin/Release/lib" | ||
ln -sf ${PREFIX}/lib/renode-cores/* "${SRC_DIR}/src/Infrastructure/src/Emulator/Cores/bin/Release/lib" | ||
|
||
rm -f "${SRC_DIR}/src/Infrastructure/src/Emulator/Cores/translate*.cproj" | ||
|
||
# Build with dotnet | ||
mkdir -p "${SRC_DIR}/output/bin/Release/net${framework_version}" | ||
cp "${SRC_DIR}/src/Infrastructure/src/Emulator/Cores/${target_platform%%-*}-properties_NET.csproj" "${SRC_DIR}/output/properties.csproj" | ||
|
||
dotnet build \ | ||
-p:GUI_DISABLED=true \ | ||
-p:Configuration=ReleaseHeadless \ | ||
-p:GenerateFullPaths=true \ | ||
-p:Platform="Any CPU" \ | ||
${SRC_DIR}/Renode_NET.sln | ||
echo -n "dotnet" > "${SRC_DIR}/output/bin/Release/build_type" | ||
|
||
# Copy LLVM library (simplified logic) | ||
LLVM_LIB="libllvm-disas" | ||
cp "lib/resources/llvm/$LLVM_LIB$SHLIB_EXT" "${SRC_DIR}/output/bin/Release/libllvm-disas$SHLIB_EXT" | ||
|
||
# Install procedure | ||
mkdir -p ${PREFIX}/bin ${PREFIX}/libexec/${PKG_NAME} ${PREFIX}/share/${PKG_NAME}/{scripts,platforms,tests} ${SRC_DIR}/license-files | ||
|
||
cp -r ${SRC_DIR}/output/bin/Release/net${framework_version}/* ${PREFIX}/libexec/${PKG_NAME}/ | ||
cp -r ${SRC_DIR}/scripts/* "${PREFIX}/share/${PKG_NAME}/scripts/" | ||
cp -r ${SRC_DIR}/platforms/* "${PREFIX}/share/${PKG_NAME}/platforms/" | ||
|
||
# Remove Mono dynamic library | ||
find ${PREFIX}/libexec/${PKG_NAME} -name "libMonoPosixHelper.so" -exec rm -f {} + | ||
|
||
# if [[ "${target_platform}" == "osx-*" ]]; then | ||
# tools/packaging/common_copy_licenses.sh ${SRC_DIR}/license-files macos | ||
# else | ||
# tools/packaging/common_copy_licenses.sh ${SRC_DIR}/license-files linux | ||
# fi | ||
dotnet-project-licenses --input "$SRC_DIR/src/Renode/Renode_NET.csproj" -d "$SRC_DIR/license-files" | ||
|
||
# Create renode script (using heredoc) | ||
cat > "${PREFIX}/bin/renode" <<EOF | ||
#!/bin/sh | ||
exec "\${DOTNET_ROOT}"/dotnet exec "\${CONDA_PREFIX}"/libexec/renode-cli/Renode.dll "\$@" | ||
EOF | ||
chmod +x "${PREFIX}/bin/renode" | ||
|
||
# Install tests for post-install testing | ||
TEST_PREFIX="${SRC_DIR}/test-bundle" | ||
|
||
mkdir -p "${TEST_PREFIX}/bin" | ||
mkdir -p "${TEST_PREFIX}/share/${PKG_NAME}/tests" | ||
cp -r tests/* "${TEST_PREFIX}/share/${PKG_NAME}/tests/" | ||
cp lib/resources/styles/robot.css "${TEST_PREFIX}/share/${PKG_NAME}/tests" | ||
|
||
sed -i "s#os\.path\.join(this_path, '\.\./lib/resources/styles/robot\.css')#os.path.join(this_path,'robot.css')#g" "${TEST_PREFIX}/share/${PKG_NAME}/tests/robot_tests_provider.py" | ||
|
||
cat > "${TEST_PREFIX}/bin/renode-test" <<EOF | ||
#!/usr/bin/env bash | ||
stty_config=\$(stty -g 2>/dev/null) | ||
python3 "\${LOCAL_TEST_PREFIX:-\${CONDA_PREFIX}}"/share/"${PKG_NAME}"/tests/run_tests.py --robot-framework-remote-server-full-directory "${CONDA_PREFIX}"/libexec/renode-cli "\$@" | ||
result_code=\$? | ||
if [[ -n "\${stty_config+_}" ]]; then stty "\$stty_config"; fi | ||
exit \$result_code | ||
EOF | ||
chmod +x "${TEST_PREFIX}/bin/renode-test" | ||
|
||
exit 0 |
104 changes: 104 additions & 0 deletions
104
recipes/renode-cli/helpers/renode_build_with_dotnet.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
$ErrorActionPreference = "Stop" | ||
|
||
# Get logical processors count | ||
$cpuCount = (Get-CimInstance Win32_Processor).NumberOfLogicalProcessors | ||
|
||
# Set environment variables (using robust expansion) | ||
$SRC_DIR = & cmd.exe /c echo %SRC_DIR% | ||
$PREFIX = & cmd.exe /c echo %PREFIX% | ||
$PKG_NAME = & cmd.exe /c echo %PKG_NAME% | ||
|
||
# Check for empty environment variables | ||
if ([string]::IsNullOrEmpty($SRC_DIR)) { throw "SRC_DIR is empty" } | ||
if ([string]::IsNullOrEmpty($PREFIX)) { throw "PREFIX is empty" } | ||
if ([string]::IsNullOrEmpty($PKG_NAME)) { throw "PKG_NAME is empty" } | ||
|
||
# Set environment variables | ||
$env:PATH = "${env:BUILD_PREFIX}/Library/mingw-w64/bin;${env:BUILD_PREFIX}/Library/bin;${env:PREFIX}/Library/bin;${env:PREFIX}/bin;${env:PATH}" | ||
|
||
$dotnet_version = dotnet --version | ||
|
||
$framework_version = $dotnet_version -replace "^(\d+\.\d+).*", '$1' | ||
@" | ||
<Project> | ||
<PropertyGroup> | ||
<TargetFrameworks>net$framework_version-windows</TargetFrameworks> | ||
</PropertyGroup> | ||
</Project> | ||
"@ | Set-Content "$SRC_DIR\Directory.Build.targets" | ||
|
||
Get-ChildItem -Path . -Directory -Filter "obj" -Recurse | Remove-Item -Force -Recurse | ||
Get-ChildItem -Path . -Directory -Filter "bin" -Recurse | Remove-Item -Force -Recurse | ||
Remove-Item -Path "$SRC_DIR/src/Infrastructure/src/Emulator/Cores/translate*.cproj" -Force | ||
|
||
(Get-Content $SRC_DIR/src/Infrastructure/src/UI/UI_NET.csproj) -replace "(<\/PropertyGroup>)", " <UseWPF>true</UseWPF>`n`$1" | Set-Content $SRC_DIR/src/Infrastructure/src/UI/UI_NET.csproj | ||
if ($env:PKG_VERSION -eq "1.15.3") { | ||
(Get-Content $SRC_DIR/Renode_NET.sln) | ForEach-Object { | ||
$_ -replace '(ReleaseHeadless\|Any CPU\.(ActiveCfg|Build\.0) = )Debug', '$1Release' | ||
} | Set-Content "$SRC_DIR/Renode_NET.sln" | ||
(Get-Content $SRC_DIR/src/Infrastructure/src/Emulator/Peripherals/Peripherals/Sensors/PAC1934.cs) -replace "GetBytes\(registers.Read\(offset\)\);", "GetBytes((ushort)registers.Read(offset));" | Set-Content src/Infrastructure/src/Emulator/Peripherals/Peripherals/Sensors/PAC1934.cs | ||
(Get-Content $SRC_DIR/lib/termsharp/TermSharp_NET.csproj) -replace '"System.Drawing.Common" Version="5.0.2"', '"System.Drawing.Common" Version="5.0.3"' | Set-Content lib/termsharp/TermSharp_NET.csproj | ||
(Get-Content $SRC_DIR/lib/termsharp/xwt/Xwt.Gtk/Xwt.Gtk3_NET.csproj) -replace '"System.Drawing.Common" Version="5.0.2"', '"System.Drawing.Common" Version="5.0.3"' | Set-Content lib/termsharp/xwt/Xwt.Gtk/Xwt.Gtk3_NET.csproj | ||
} else { | ||
Write-Host "Remove these patches from the script after 1.15.3" | ||
exit 1 | ||
} | ||
|
||
# Prepare, build, and install | ||
New-Item -ItemType Directory -Path "$SRC_DIR/src/Infrastructure/src/Emulator/Cores/bin/Release/lib", "$SRC_DIR/output/bin/Release/net$framework_version", "$PREFIX/bin", "$PREFIX/libexec/$PKG_NAME", "$PREFIX/share/$PKG_NAME/{scripts,platforms,tests}", "$SRC_DIR/license-files" -Force | Out-Null | ||
Copy-Item -Path "$PREFIX/Library/lib/renode-cores/*" -Destination "$SRC_DIR/src/Infrastructure/src/Emulator/Cores/bin/Release/lib" -Force | ||
Copy-Item -Path "$SRC_DIR/src/Infrastructure/src/Emulator/Cores/windows-properties_NET.csproj" -Destination "$SRC_DIR/output/properties.csproj" -Force | ||
|
||
$OUT_BIN_DIR = "$SRC_DIR\output\bin\Release" | ||
"dotnet" | Out-File -FilePath "$SRC_DIR/output/bin/Release/build_type" -Encoding ascii | ||
dotnet build -p:GUI_DISABLED=true -p:Configuration=ReleaseHeadless -p:GenerateFullPaths=true -p:Platform="Any CPU" "$SRC_DIR/Renode_NET.sln" | ||
|
||
Copy-Item "$SRC_DIR/lib/resources/llvm/libllvm-disas.dll" "$SRC_DIR/output/bin/Release/" -Force | ||
|
||
Copy-Item -Path "$SRC_DIR/output/bin/Release/net$framework_version-windows" -Destination "$PREFIX/libexec/$PKG_NAME/" -Recurse -Force | ||
Copy-Item -Path "$SRC_DIR/scripts" -Destination "$PREFIX/share/$PKG_NAME/scripts" -Recurse -Force | ||
Copy-Item -Path "$SRC_DIR/platforms" -Destination "$PREFIX/share/$PKG_NAME/platforms" -Recurse -Force | ||
|
||
dotnet-project-licenses --input "$SRC_DIR/src/Renode/Renode_NET.csproj" -d "$SRC_DIR/license-files" -f "txt" | ||
|
||
# Create renode.cmd | ||
New-Item -ItemType File -Path "$PREFIX\bin\renode.cmd" -Force | ||
@" | ||
@echo off | ||
call %DOTNET_ROOT%\dotnet exec %CONDA_PREFIX%\libexec\renode-cli\net$framework_version-windows\Renode.dll %* | ||
"@ | Out-File -FilePath "$PREFIX\bin\renode.cmd" -Encoding ascii | ||
|
||
# Install tests for post-install testing | ||
$TEST_PREFIX = "$SRC_DIR/test-bundle" | ||
|
||
mkdir -p "$TEST_PREFIX/bin" | ||
mkdir -p "$TEST_PREFIX/share/$PKG_NAME/tests" | ||
Copy-Item -Path "tests/*" -Destination "$TEST_PREFIX/share/$PKG_NAME/tests" -Recurse -Force | ||
Copy-Item -Path "lib/resources/styles/robot.css" -Destination "$TEST_PREFIX/share/$PKG_NAME/tests" -Force | ||
|
||
# Use PowerShell's -replace operator | ||
(Get-Content "$TEST_PREFIX/share/$PKG_NAME/tests/robot_tests_provider.py") | ForEach-Object { $_ -replace "os\.path\.join\(this_path, '\.\./lib/resources/styles/robot\.css'\)", "os.path.join(this_path,'robot.css')" } | Set-Content "$TEST_PREFIX/share/$PKG_NAME/tests/robot_tests_provider.py" | ||
|
||
# Create renode-test script (using PowerShell heredoc) | ||
@" | ||
@echo off | ||
setlocal enabledelayedexpansion | ||
set "STTY_CONFIG=%stty -g 2^>nul%" | ||
IF NOT DEFINED LOCAL_TEST_PREFIX ( | ||
set "LOCAL_TEST_PREFIX=%CONDA_PREFIX%" | ||
) | ||
python "%LOCAL_TEST_PREFIX%\share\renode-cli\tests\run_tests.py" --robot-framework-remote-server-full-directory "%CONDA_PREFIX%\libexec\renode-cli" %* | ||
set "RESULT_CODE=%ERRORLEVEL%" | ||
if not "%STTY_CONFIG%"=="" stty "%STTY_CONFIG%" | ||
exit /b %RESULT_CODE% | ||
"@ | Out-File -FilePath "$TEST_PREFIX\bin\renode-test.cmd" -Encoding ascii | ||
|
||
# Terminate the dotnet processes that may hang around and prevent the build environment from being removed | ||
try { | ||
Get-Process -Name *dotnet* | Stop-Process | ||
} | ||
catch { | ||
Write-Warning "Error removing the build environment: $_" | ||
} | ||
|
||
exit 0 |
46 changes: 46 additions & 0 deletions
46
recipes/renode-cli/patches/update-cores.template_NET.csproj.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- a/src/Infrastructure/src/Emulator/Cores/cores.template_NET.csproj 2024-09-17 05:29:16.000000000 -0500 | ||
+++ b/src/Infrastructure/src/Emulator/Cores/cores.template_NET.csproj 2025-01-27 21:35:32.396468884 -0600 | ||
@@ -1,4 +1,2 @@ | ||
<Project DefaultTargets="Build"> | ||
- <UsingTask AssemblyFile="$(MSBuildProjectDirectory)/../../../../../lib/cctask/CCTask/bin/Release/net6.0/CCTask.dll" TaskName="EnvironmentTask" /> | ||
- | ||
<PropertyGroup> | ||
@@ -17,18 +15,9 @@ | ||
|
||
- <Target Name="CompileTranslationLib" DependsOnTargets="VerifyProperties"> | ||
- <!-- Due to a bug in some versions of xbuild we set default value of $(TargetWordSize) and $(TargetInsnStartExtraWords) | ||
- before passing it to 'translate.cproj' as it is impossible to overwrite them later. --> | ||
- <PropertyGroup> | ||
- <TargetWordSize Condition=" $(TargetWordSize) == '' ">32</TargetWordSize> | ||
- <TargetInsnStartExtraWords Condition=" $(TargetInsnStartExtraWords) == '' ">0</TargetInsnStartExtraWords> | ||
- </PropertyGroup> | ||
- <MSBuild Projects="./translate_NET.cproj" Properties="AdditionalCompilationFlags=$(AdditionalCompilationFlags);HostArchitecture=i386;HostEndianess=le;TargetEndianess=%(Endianess.Identity);TargetArchitecture=$(Architecture);EmulatedTarget=$(EmulatedTarget);Configuration=$(Configuration);TargetWordSize=$(TargetWordSize);TargetInsnStartExtraWords=$(TargetInsnStartExtraWords);CompilerPath=$(CompilerPath);LinkerPath=$(LinkerPath);ArPath=$(ArPath);CurrentPlatform=$(CurrentPlatform)"> | ||
- <Output TaskParameter="TargetOutputs" ItemName="TranslationLibraries" /> | ||
- </MSBuild> | ||
- </Target> | ||
- | ||
- <Target Name="PrepareEmbeddedResources" BeforeTargets="ResolveReferences" DependsOnTargets="CompileTranslationLib"> | ||
+ <Target Name="PrepareEmbeddedResources" BeforeTargets="ResolveReferences" > | ||
<ItemGroup> | ||
- <EmbeddedResource Include="@(TranslationLibraries)"> | ||
- <LogicalName>Antmicro.Renode.%(Filename)%(Extension)</LogicalName> | ||
+ <EmbeddedResource Include="..\Cores\bin\$(Configuration)\lib\translate-$(Architecture)-le.so" Condition=" '%(Endianess.Identity)' == 'le' "> | ||
+ <LogicalName>Antmicro.Renode.translate-$(Architecture)-le.so</LogicalName> | ||
+ </EmbeddedResource> | ||
+ <EmbeddedResource Include="..\Cores\bin\$(Configuration)\lib\translate-$(Architecture)-be.so" Condition=" '%(Endianess.Identity)' == 'be' "> | ||
+ <LogicalName>Antmicro.Renode.translate-$(Architecture)-be.so</LogicalName> | ||
</EmbeddedResource> | ||
@@ -36,11 +25,2 @@ | ||
</Target> | ||
- | ||
- <Target Name="ActualClean" DependsOnTargets="_PrepareProperties"> | ||
- <MSBuild Projects="translate_NET.cproj" Targets="Clean" /> | ||
- </Target> | ||
- | ||
- <!-- It is intended to have 'Clean' and 'ActualClean' targets separated. | ||
- Thanks to this multiple calling of 'Clean' from MSBuild task will not cause | ||
- 'ActualClean' to run more than once. --> | ||
- <Target Name="Clean" DependsOnTargets="ActualClean" /> | ||
-</Project> | ||
+</Project> | ||
\ No newline at end of file |
5 changes: 5 additions & 0 deletions
5
recipes/renode-cli/patches/update-unix-informational-version.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- a/tools/building/createAssemblyInfo.sh | ||
+++ b/tools/building/createAssemblyInfo.sh | ||
@@ -7 +7 @@ | ||
-CURRENT_INFORMATIONAL_VERSION="`git rev-parse --short=8 HEAD`" | ||
+CURRENT_INFORMATIONAL_VERSION="03756cb5" |
5 changes: 5 additions & 0 deletions
5
recipes/renode-cli/patches/update-win-informational-version.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- a/tools/building/createAssemblyInfo.ps1 | ||
+++ b/tools/building/createAssemblyInfo.ps1 | ||
@@ -4 +4 @@ | ||
-$CURRENT_INFORMATIONAL_VERSION = git rev-parse --short=8 HEAD | ||
+$CURRENT_INFORMATIONAL_VERSION = "03756cb5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
context: | ||
name: renode-cli | ||
version: "1.15.3" | ||
|
||
package: | ||
name: ${{ name|lower }} | ||
version: ${{ version }} | ||
|
||
source: | ||
- url: https://github.com/renode/renode/releases/download/v${{ version }}/renode_${{ version }}_source.tar.xz | ||
sha256: 40c50afe8db86a9c63f4a86b93116a6babd43bf241cfaac47b2c0d2cbc2b15a8 | ||
patches: | ||
- patches/update-cores.template_NET.csproj.patch | ||
- if: unix | ||
then: | ||
- patches/update-unix-informational-version.patch | ||
else: | ||
- patches/update-win-informational-version.patch | ||
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. See my previous commend about the other |
||
|
||
build: | ||
number: 0 | ||
|
||
requirements: | ||
build: | ||
- dotnet | ||
- nuget-license | ||
- if: unix | ||
then: | ||
- sed | ||
- bash | ||
else: | ||
- m2-bash | ||
- m2-coreutils | ||
- m2-findutils | ||
- m2-sed | ||
host: | ||
- dotnet | ||
- renode-cores ==${{ version }} | ||
run: | ||
- dotnet | ||
|
||
tests: | ||
- package_contents: | ||
bin: | ||
- renode | ||
- script: | ||
- renode --help | ||
- LOCAL_TEST_PREFIX=./test-bundle test-bundle/bin/renode-test test-bundle/share/renode-cli/tests/unit-tests | ||
requirements: | ||
run: | ||
- robotframework 6.1 | ||
- psutil 5.9.3 | ||
- python | ||
- pyyaml 6.0 | ||
files: | ||
source: | ||
- test-bundle/ | ||
|
||
about: | ||
homepage: https://github.com/renode/renode | ||
summary: "Antmicro's open source simulation and virtual development framework for complex embedded systems" | ||
description: | | ||
Renode was created by Antmicro as a virtual development tool for multi-node | ||
embedded networks (both wired and wireless) and is intended to enable a scalable | ||
workflow for creating effective, tested and secure IoT systems. | ||
|
||
With Renode, developing, testing, debugging and simulating unmodified software | ||
for IoT devices is fast, cost-effective and reliable. | ||
license: MIT | ||
license_file: | ||
- LICENSE | ||
- license-files/ | ||
documentation: https://renode.io/ | ||
repository: https://github.com/renode/renode | ||
|
||
extra: | ||
recipe-maintainers: | ||
- MementoRC | ||
- danielnachun |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@echo on | ||
:: powershell -NoLogo -NonInteractive -ExecutionPolicy Bypass -File "%RECIPE_DIR%\helpers\renode_build_with_cmake.ps1" | ||
powershell -NoLogo -NonInteractive -ExecutionPolicy Bypass -Command "& { try { . '%RECIPE_DIR%\helpers\renode_build_with_cmake.ps1'; exit $LASTEXITCODE } catch { Write-Error $_; exit 1 } }" | ||
if %errorlevel% neq 0 exit /b %errorlevel% |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is the script this is patching still used in the build process? Usually
.csproj
files don't call shell scripts.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.
We do, there is an <Exec ...> into one of the .csproj that calls this, it assumes that it is a git repo and uses
git ...
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.
In that case as this needs to be a long-term fix, I think
sed
replacement would be better here (we can just use a dummy revision) so that we don't need to update so many patches.