Skip to content

Commit d49f89e

Browse files
committed
wip: gh action debug
1 parent 3b33a51 commit d49f89e

File tree

3 files changed

+38
-16
lines changed

3 files changed

+38
-16
lines changed

.github/workflows/test.yml

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
matrix:
2424
os:
25-
- ubuntu-22.04
25+
# - ubuntu-22.04
2626
- windows-2025
2727
runs-on: ${{ matrix.os }}
2828
steps:
@@ -75,7 +75,7 @@ jobs:
7575
strategy:
7676
matrix:
7777
os:
78-
- ubuntu-22.04
78+
# - ubuntu-22.04
7979
- windows-2025
8080
runs-on: ${{ matrix.os }}
8181
steps:
@@ -128,7 +128,7 @@ jobs:
128128
strategy:
129129
matrix:
130130
os:
131-
- ubuntu-22.04
131+
# - ubuntu-22.04
132132
- windows-2025
133133
runs-on: ${{ matrix.os }}
134134
steps:
@@ -212,7 +212,7 @@ jobs:
212212
library_name="$(basename $example | tr '-' '_').dll"
213213
fi
214214
215-
cp build/examples-native/$example_name/$bin_path/$library_name artifacts/shared_libs/lib$(basename $example | tr '-' '_').so
215+
cp build/examples-native/$example_name/$bin_path/$library_name artifacts/shared_libs
216216
done
217217
218218
- name: Upload Example Binaries
@@ -239,7 +239,7 @@ jobs:
239239
strategy:
240240
matrix:
241241
os:
242-
- ubuntu-22.04
242+
# - ubuntu-22.04
243243
- windows-2025
244244
runs-on: ${{ matrix.os }}
245245
steps:
@@ -285,14 +285,18 @@ jobs:
285285
cp $test tests/$test_name/bin/$test_name
286286
done
287287
288-
if [ "${{ runner.os }}" = "Linux" ]; then
289-
export LD_LIBRARY_PATH="$(realpath artifacts/shared_libs):$LD_LIBRARY_PATH"
290-
elif [ "${{ runner.os }}" = "Windows" ]; then
291-
export PATH="$(realpath artifacts/shared_libs):$PATH"
292-
else
293-
echo "Unknown runner!"
294-
exit 1
295-
fi
288+
for example in artifacts/shared_libs/*; do
289+
example_name="$(basename $example | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/^lib//' | tr '_' '-')"
290+
if [ "${{ runner.os }}" = "Linux" ]; then
291+
bin_path="."
292+
elif [ "${{ runner.os }}" = "Windows" ]; then
293+
bin_path="Debug"
294+
fi
295+
mkdir -p examples-native/$example_name/build/$bin_path
296+
cp -v $example examples-native/$example_name/build/$bin_path
297+
298+
ls -lh examples-native/$example_name/build/Debug
299+
done
296300
297301
pushd examples-native
298302
renode-test -t all_examples.yaml
@@ -305,3 +309,15 @@ jobs:
305309
pushd tests
306310
renode-test -t all_tests.yaml
307311
popd
312+
313+
- name: Upload logs on failure
314+
uses: actions/upload-artifact@v4
315+
if: failure()
316+
with:
317+
name: failure-artifacts
318+
path: |
319+
examples-native/logs
320+
examples-native/robot_output.xml
321+
examples-native/log.html
322+
examples-native/report.html
323+
if-no-files-found: ignore

cmake/msvc.cmake

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
if (MSVC)
22
target_compile_options(${EXAMPLE_NAME} PRIVATE "/vmg")
3-
target_link_options(${EXAMPLE_NAME} PRIVATE "/ignore:4099")
3+
target_link_options(${EXAMPLE_NAME} PRIVATE
4+
"/ignore:4099"
5+
"/OPT:NOREF"
6+
"/OPT:NOICF"
7+
"/INCREMENTAL:no"
8+
"/SECTION:.edata,R"
9+
"/merge:.rdata=.edata"
10+
)
411
endif()

examples-native/timesync-native/renode/timesync.resc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ showAnalyzer usart1 Antmicro.Renode.Analyzers.LoggingUartAnalyzer
1010

1111
sysbus LoadELF $bin
1212
sysbus LogPeripheralAccess systemc true
13-
sysbus.systemc SimulationFilePathLinux $ORIGIN/../build/libtimesync_native.so
14-
sysbus.systemc SimulationFilePathWindows @ORIGIN/../build/Debug/timesync_native.dll
13+
sysbus.systemc SimulationFilePath @/d/a/renode-systemc-examples/renode-systemc-examples/examples-native/timesync-native/build/Debug/timesync_native.dll

0 commit comments

Comments
 (0)