@@ -2,6 +2,15 @@ name: linux-riscv64 dotnet-runtime aot
22
33on :
44 workflow_dispatch :
5+ inputs :
6+ runtimeForkName :
7+ description : fork
8+ required : true
9+ default : dotnet
10+ runtimeBranchName :
11+ description : branch
12+ required : true
13+ default : main
514
615jobs :
716 build :
@@ -29,12 +38,10 @@ jobs:
2938
3039 - name : runtime, libs and nativeaot smoke tests build
3140 run : |
32- git clone https://github.com/dotnet/runtime --single-branch --depth 1
33- curl -sSL https://github.com/dotnet/runtime/pull/113243.patch | git -C runtime apply -
41+ git clone https://github.com/${{ github.event.inputs.runtimeForkName }}/runtime --branch ${{ github.event.inputs.runtimeBranchName }} --single-branch --depth 1
3442 docker run --rm -v$(pwd)/runtime:/runtime -e ROOTFS_DIR=/crossrootfs/riscv64 \
35- mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-riscv64@sha256:d64f90c040c32f36ba4e90be5a276afb6adbd2daa92528906fed90140ea17137 \
43+ mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net10.0-cross-riscv64 \
3644 sh -c '
37- echo "Building for target..." &&
3845 /runtime/build.sh -ci -arch riscv64 -cross -s clr+libs+host -c Debug -rc Checked --keepnativesymbols true -p:StageOneBuild=true &&
3946 /runtime/build.sh -ci -arch riscv64 -cross -s tools+clr.tools+tools.illink -c Debug -rc Checked --keepnativesymbols true -p:StageTwoBuild=true &&
4047 SysRoot=$ROOTFS_DIR LinkerFlavor=lld /runtime/src/tests/build.sh -ci -riscv64 -cross -nativeaot -tree:nativeaot -Checked -p:TasksConfiguration=Debug -p:LibrariesConfiguration=Debug -keepnativesymbols -p:UseLocalAppHostPack=true -p:UseNativeAotForComponents=true -p:TestNativeAot=true
@@ -46,23 +53,24 @@ jobs:
4653 docker run --rm -v$(pwd)/runtime:/runtime -e ROOTFS_DIR=/crossrootfs/riscv64 \
4754 -e CORE_ROOT=/runtime/artifacts/tests/coreclr/linux.riscv64.Checked/Tests/Core_Root \
4855 --platform linux/riscv64 ubuntu \
49- bash -c '
56+ sh -c '
5057 apt update && apt install -y file llvm &&
5158 mkdir -p $CORE_ROOT/SuperFileCheck/runtimes/linux-riscv64/native &&
5259 ln -s /usr/bin/llvm-dwarfdump $CORE_ROOT/SuperFileCheck/runtimes/linux-riscv64/native;
5360
5461 fail=0;
55- while IFS=: read -r test _; do
62+ find /runtime/artifacts/tests/coreclr/linux.riscv64.Checked/nativeaot/SmokeTests -path "*/native/*" -type f -exec file {} \; |
63+ grep ELF.*executable | while IFS=: read -r test _; do
5664 echo "Running $test...";
57- pushd " $(dirname $test)/..";
58- "$test";
59- exitcode=$?;
60- popd;
65+ test_dir= $(dirname " $test" )/..
66+ cd "$test_dir" || exit
67+ "$test"
68+ exitcode=$?
6169 if [ "$exitcode" -ne 100 ]; then
62- echo "$test failed with exit code $exitcode";
63- fail=1;
64- fi;
65- done < <(find /runtime/artifacts/tests/coreclr/linux.riscv64.Checked/nativeaot/SmokeTests -path "*/native/*" -type f -exec file {} \; | grep ELF.*executable);
70+ echo "$test failed with exit code $exitcode"
71+ fail=1
72+ fi
73+ done
6674
6775 if [ "$fail" -eq 1 ]; then exit 1; fi
6876 '
0 commit comments