File tree Expand file tree Collapse file tree 1 file changed +21
-6
lines changed Expand file tree Collapse file tree 1 file changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -43,26 +43,41 @@ jobs:
43
43
- os : ubuntu-latest
44
44
rid : linux-arm64
45
45
binary-extension : ' .so'
46
+ use-docker : true
46
47
47
48
env :
48
49
RUNTIME_IDENTIFIER : ${{ matrix.rid }}
49
50
50
51
steps :
51
- - name : Install Linux Dependencies
52
- if : matrix.os == 'ubuntu-latest'
53
- run : sudo apt-get update && sudo apt-get install -y clang zlib1g-dev
52
+ - name : Checkout code
53
+ uses : actions/checkout@v4
54
54
55
55
- name : Setup .NET SDK
56
56
uses : actions/setup-dotnet@v4
57
57
with :
58
58
dotnet-version : ' 9.0.x'
59
59
60
- - name : Checkout code
61
- uses : actions/checkout@v4
60
+ - name : Install Linux Dependencies
61
+ if : matrix.os == 'ubuntu-latest' && matrix.use-docker != true
62
+ run : |
63
+ sudo apt-get update
64
+ sudo apt-get install -y clang zlib1g-dev
62
65
63
- - name : Publish with Native AOT
66
+ - name : Setup Docker
67
+ if : matrix.use-docker == true
68
+ uses : docker/setup-qemu-action@v3
69
+
70
+ - name : Publish with Native AOT (non-Docker)
71
+ if : matrix.use-docker != true
64
72
run : dotnet publish Lagrange.Core.NativeAPI -c Release -r ${{ matrix.rid }}
65
73
74
+ - name : Publish with Native AOT (Docker for ARM64)
75
+ if : matrix.use-docker == true
76
+ run : |
77
+ docker run --rm --platform linux/arm64 -v $(pwd):/source -w /source \
78
+ mcr.microsoft.com/dotnet/sdk:9.0 \
79
+ bash -c "apt-get update && apt-get install -y clang zlib1g-dev && dotnet publish Lagrange.Core.NativeAPI -c Release -r linux-arm64"
80
+
66
81
- name : Upload artifacts
67
82
if : github.event_name != 'pull_request'
68
83
uses : actions/upload-artifact@v4
You can’t perform that action at this time.
0 commit comments