@@ -57,33 +57,18 @@ jobs:
57
57
run : |
58
58
echo -e "2\ny\ny\ny\ny\ny" | ./build_adventurecoin_ubuntu.sh
59
59
60
- - name : Run macOS Build
60
+ - name : Install Protobuf (macOS)
61
61
if : inputs.os_target == 'macos'
62
62
run : |
63
- # Set up and build Protobuf 3.6.1
64
- export PROTOBUF_DIR="$HOME/local/protobuf-3.6.1"
65
- mkdir -p "$PROTOBUF_DIR"
66
- curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.6.1/protobuf-cpp-3.6.1.tar.gz
67
- tar -xzf protobuf-cpp-3.6.1.tar.gz
68
- cd protobuf-3.6.1
69
- ./configure --prefix="$PROTOBUF_DIR"
70
- make -j$(sysctl -n hw.logicalcpu)
71
- make install
72
- cd ..
73
-
74
- # Export environment variables
75
- export PKG_CONFIG_PATH="$PROTOBUF_DIR/lib/pkgconfig:$PKG_CONFIG_PATH"
76
- export LDFLAGS="-L$PROTOBUF_DIR/lib $LDFLAGS"
77
- export CPPFLAGS="-I$PROTOBUF_DIR/include $CPPFLAGS"
78
- export LD_LIBRARY_PATH="$PROTOBUF_DIR/lib:$LD_LIBRARY_PATH"
79
- export PATH="$PROTOBUF_DIR/bin:$PATH"
80
- export PROTOC="$PROTOBUF_DIR/bin/protoc"
81
-
82
- # Confirm protobuf installed
83
- $PROTOC --version
84
- pkg-config --modversion protobuf || echo "pkg-config failed"
63
+ brew install protobuf@3
64
+ echo 'PATH="/opt/homebrew/opt/protobuf@3/bin:$PATH"' >> $GITHUB_ENV
65
+ echo 'LDFLAGS="-L/opt/homebrew/opt/protobuf@3/lib $LDFLAGS"' >> $GITHUB_ENV
66
+ echo 'CPPFLAGS="-I/opt/homebrew/opt/protobuf@3/include $CPPFLAGS"' >> $GITHUB_ENV
67
+ echo 'PKG_CONFIG_PATH="/opt/homebrew/opt/protobuf@3/lib/pkgconfig:$PKG_CONFIG_PATH"' >> $GITHUB_ENV
85
68
86
- # Run the macOS build script
69
+ - name : Run macOS Build
70
+ if : inputs.os_target == 'macos'
71
+ run : |
87
72
echo -e "2\ny\ny" | ./build_adventurecoin_mac.sh
88
73
89
74
- name : Upload to GitHub Release
0 commit comments