Skip to content

Commit 105c2c9

Browse files
Update build.yml
1 parent f166628 commit 105c2c9

File tree

1 file changed

+9
-24
lines changed

1 file changed

+9
-24
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -57,33 +57,18 @@ jobs:
5757
run: |
5858
echo -e "2\ny\ny\ny\ny\ny" | ./build_adventurecoin_ubuntu.sh
5959
60-
- name: Run macOS Build
60+
- name: Install Protobuf (macOS)
6161
if: inputs.os_target == 'macos'
6262
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
8568
86-
# Run the macOS build script
69+
- name: Run macOS Build
70+
if: inputs.os_target == 'macos'
71+
run: |
8772
echo -e "2\ny\ny" | ./build_adventurecoin_mac.sh
8873
8974
- name: Upload to GitHub Release

0 commit comments

Comments
 (0)