@@ -26,20 +26,47 @@ jobs:
26
26
ifconfig
27
27
- name : Install build dependencies of VDE
28
28
run : brew install autoconf automake
29
- - name : Install VDE
29
+ - name : Make and Install VDE
30
30
run : |
31
31
git clone https://github.com/virtualsquare/vde-2.git /tmp/vde-2
32
32
cd /tmp/vde-2
33
33
# Dec 12, 2021
34
34
git checkout 74278b9b7cf816f0356181f387012fdeb6d65b52
35
35
autoreconf -fis
36
+ # compile for x86_64
36
37
./configure --prefix=/opt/vde
37
- make
38
- sudo make install
39
- - name : Make
40
- run : make PREFIX=/opt/vde
41
- - name : Install
42
- run : sudo make PREFIX=/opt/vde install
38
+ make PREFIX=/opt/vde
39
+ sudo make PREFIX=/opt/vde install
40
+ # cleanup
41
+ make distclean
42
+ # cross-compile for arm64
43
+ export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
44
+ export CC=$(xcrun --sdk macosx --find clang)
45
+ export CXX=$(xcrun --sdk macosx --find clang++)
46
+ export CFLAGS="-arch arm64e -isysroot $SDKROOT -Wno-error=implicit-function-declaration"
47
+ export CXXFLAGS=$CFLAGS
48
+ ./configure --prefix=/opt/vde.arm64 --host=arm-apple-darwin --target=arm-apple-darwin --build=x86_64-apple-darwin
49
+ make PREFIX=/opt/vde.arm64
50
+ sudo make PREFIX=/opt/vde.arm64 install
51
+ unset SDKROOT CC CXX CFLAGS CXXFLAGS
52
+ - name : Make and Install vde_vmnet (x86_64)
53
+ run : |
54
+ git clone https://github.com/lima-vm/vde_vmnet.git /tmp/vde_vmnet
55
+ cd /tmp/vde_vmnet
56
+ make PREFIX=/opt/vde
57
+ sudo make PREFIX=/opt/vde install
58
+ - name : Cleanup
59
+ run : |
60
+ make clean
61
+ - name : Make and Install vde_vmnet (arm64)
62
+ run : |
63
+ export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
64
+ export CC=$(xcrun --sdk macosx --find clang)
65
+ export CXX=$(xcrun --sdk macosx --find clang++)
66
+ export CFLAGS="-arch arm64e -isysroot $SDKROOT -Wno-error=implicit-function-declaration"
67
+ export CXXFLAGS=$CFLAGS
68
+ make PREFIX=/opt/vde.arm64
69
+ sudo make PREFIX=/opt/vde.arm64 install
43
70
- name : Print launchd status (shared mode)
44
71
run : launchctl print system/io.github.lima-vm.vde_vmnet.plist
45
72
- name : Install test dependencies
0 commit comments