-
Notifications
You must be signed in to change notification settings - Fork 240
74 lines (66 loc) · 2.56 KB
/
main.yml
File metadata and controls
74 lines (66 loc) · 2.56 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
66
67
68
69
70
71
72
73
74
name: main
on:
push:
branches:
- master
- feature/linux
paths:
- 'src/**'
- .github/workflows/main.yml
workflow_dispatch:
jobs:
run:
runs-on: ${{ matrix.runs-on }}
strategy:
matrix:
runs-on: [windows-2022, ubuntu-22.04, ubuntu-22.04-arm, macos-13]
steps:
- uses: actions/checkout@v4
- name: Setup NuGet Source
run: |
dotnet nuget add source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" --name github --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text
dotnet nuget list source
- name: Build code
run: dotnet build -c Release
- name: ldd debug(linux only)
if: matrix.runs-on == 'ubuntu-22.04'
run: |
cd ./tests/Sdcb.PaddleOCR.Tests/bin/Release/net8.0/runtimes/linux-x64/native
ls -lR
for so in $(find . -type f -name '*.so*'); do
echo "================ $so ================"
ldd "$so"
echo
done
- name: rpath debug(linux only)
if: matrix.runs-on == 'ubuntu-22.04'
run: |
cd ./tests/Sdcb.PaddleOCR.Tests/bin/Release/net8.0/runtimes/linux-x64/native
for so in $(find . -type f -name '*.so*'); do
echo "================ $so ================"
patchelf --print-rpath "$so" || true
echo
done
# - name: Match rpath(linux only)
# if: matrix.runs-on == 'ubuntu-22.04'
# run: |
# cd ./tests/Sdcb.PaddleOCR.Tests/bin/Release/net8.0/runtimes/linux-x64
# if find . -type f -name 'libmklml_intel.so' -print -quit | grep -q .; then
# echo "libmklml_intel.so found, patching elf..."
# patchelf --add-needed libmklml_intel.so native/libpaddle_inference_c.so
# else
# echo "libmklml_intel.so not found, skip patchelf."
# fi
- name: Test
shell: bash
run: |
# export FLAGS_mklml_dir=${{ github.workspace }}/tests/Sdcb.PaddleOCR.Tests/bin/Release/net8.0/runtimes/linux-x64/native
# export GLOG_v=4
# if [[ "${{ matrix.runs-on }}" == "macos-15" ]]; then
# export FLAGS_use_system_allocator=1
# fi
if [[ "${{ runner.os }}" != "Windows" ]]; then
dotnet test ./tests/Sdcb.PaddleOCR.Tests/Sdcb.PaddleOCR.Tests.csproj -c Release --no-build --verbosity normal --filter 'Category!=WindowsOnly'
else
dotnet test ./tests/Sdcb.PaddleOCR.Tests/Sdcb.PaddleOCR.Tests.csproj -c Release --no-build --verbosity normal
fi