-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (58 loc) · 2.62 KB
/
linux-musl-riscv64-aot.yml
File metadata and controls
65 lines (58 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: linux-musl-riscv64 dotnet-runtime aot
on:
workflow_dispatch:
inputs:
runtimeForkName:
description: fork
required: true
default: dotnet
runtimeBranchName:
description: branch
required: true
default: main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Maximize build space
uses: AdityaGarg8/remove-unwanted-software@v4.1
with:
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-cached-tools: 'true'
- name: runtime, libs and nativeaot smoke tests build
run: |
git clone https://github.com/${{ github.event.inputs.runtimeForkName }}/runtime --branch ${{ github.event.inputs.runtimeBranchName }} --single-branch --depth 1
echo "git HEAD is at: $(git -C runtime rev-parse HEAD)"
docker run --rm -v$(pwd)/runtime:/runtime -e ROOTFS_DIR=/crossrootfs/riscv64 \
mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net11.0-cross-riscv64-musl \
sh -c '
/runtime/build.sh -ci -arch riscv64 -cross -s clr+libs+host+packs -c Debug -rc Checked --keepnativesymbols true --bootstrap &&
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
'
- name: run tests in qemu
run: |
docker run --privileged --rm tonistiigi/binfmt --install all
docker run --rm -v$(pwd)/runtime:/runtime -e ROOTFS_DIR=/crossrootfs/riscv64 \
-e CORE_ROOT=/runtime/artifacts/tests/coreclr/linux.riscv64.Checked/Tests/Core_Root \
--platform linux/riscv64 alpine \
sh -c '
apk add file llvm icu-libs libatomic &&
mkdir -p $CORE_ROOT/SuperFileCheck/runtimes/linux-riscv64/native &&
ln -s /usr/bin/llvm-dwarfdump $CORE_ROOT/SuperFileCheck/runtimes/linux-riscv64/native;
fail=0;
find /runtime/artifacts/tests/coreclr/linux.riscv64.Checked/nativeaot/SmokeTests -path "*/native/*" -type f -exec file {} \; |
grep ELF.*executable | while IFS=: read -r test _; do
echo "Running $test...";
cd "$(dirname "$test")/.."
"$test"
exitcode=$?
if [ "$exitcode" -ne 100 ]; then
echo "$test failed with exit code $exitcode"
fail=1
fi
done
if [ "$fail" -eq 1 ]; then exit 1; fi
'