Skip to content

Commit

Permalink
chore(fix): include protobuf during build
Browse files Browse the repository at this point in the history
  • Loading branch information
leet4tari committed Jan 15, 2024
1 parent 3ab7d5d commit c62063d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 10 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/base_node_binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ jobs:
- name: Install macOS dependencies
if: startsWith(runner.os,'macOS')
run: |
brew install cmake coreutils automake autoconf
brew install openssl cmake coreutils automake autoconf protobuf
rustup target add ${{ matrix.builds.target }}
- name: Install Windows dependencies
Expand All @@ -159,6 +159,7 @@ jobs:
- name: Set environment variables - Nix
if: ${{ ! startsWith(runner.os,'Windows') }}
shell: bash
run: |
echo "SHARUN=shasum --algorithm 256" >> $GITHUB_ENV
echo "CC=gcc" >> $GITHUB_ENV
Expand All @@ -169,12 +170,14 @@ jobs:
- name: Set environment variables - macOS
if: startsWith(runner.os,'macOS')
shell: bash
run: |
echo "PLATFORM_SPECIFIC_DIR=osx" >> $GITHUB_ENV
echo "LIB_EXT=.dylib" >> $GITHUB_ENV
- name: Set environment variables - Ubuntu
if: startsWith(runner.os,'Linux')
shell: bash
run: |
echo "LIB_EXT=.so" >> $GITHUB_ENV
Expand All @@ -197,10 +200,11 @@ jobs:
echo "LIBCLANG_PATH=C:\Program Files\LLVM\bin" >> $GITHUB_ENV
echo "C:\Strawberry\perl\bin" >> $GITHUB_PATH
# Don't use caches for binary builds. Start from a clean slate - on release
- name: Cache cargo files and outputs
if: ${{ ! startsWith(github.ref, 'refs/tags/v') }}
if: ${{ ( ! startsWith(github.ref, 'refs/tags/v') ) && ( ! matrix.builds.cross ) }}
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.builds.target }}

- name: Install and setup cargo cross
if: ${{ matrix.builds.cross }}
Expand Down
28 changes: 22 additions & 6 deletions .github/workflows/build_libffis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ name: Build ffi libraries
- 'build-ffis-*'
schedule:
- cron: '05 00 * * *'
workflow_dispatch:

env:
CARGO_UNSTABLE_SPARSE_REGISTRY: true
Expand Down Expand Up @@ -129,6 +130,18 @@ jobs:
tempEnv=${tempEnv#*_}
echo "TARGET_NAME=${tempEnv%_*}" >> $GITHUB_ENV
- name: Install Linux dependencies - Ubuntu
if: ${{ startsWith(runner.os,'Linux') && ( ! matrix.builds.cross ) }}
run: |
sudo apt-get update
sudo bash scripts/install_ubuntu_dependencies.sh
- name: Install macOS dependencies
if: startsWith(runner.os,'macOS')
run: |
brew install openssl cmake coreutils automake autoconf protobuf
rustup target add ${{ matrix.builds.target }}
- name: Setup Rust toolchain
if: ${{ ! matrix.builds.cross }}
uses: dtolnay/rust-toolchain@master
Expand All @@ -140,6 +153,8 @@ jobs:
- name: Cache cargo files and outputs
if: ${{ ( ! startsWith(github.ref, 'refs/tags/v') ) && ( ! matrix.builds.cross ) }}
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.builds.target }}

- name: Install and setup cargo cross
if: ${{ matrix.builds.cross }}
Expand All @@ -165,12 +180,13 @@ jobs:
echo "cross flag: ${{ matrix.builds.cross }}"
- name: Build ${{ matrix.libffis }} libraries
shell: bash
run: |
${{ env.CARGO }} build --lib ${{ env.CARGO_OPTIONS }} \
--package ${{ matrix.libffis }} \
--target=${{ matrix.builds.target }} \
--locked
# can't use bash for windows build, perl not supported (openssl)
# don't mess with indentation - breaks inline multiline (readiblity)
run: >
${{ env.CARGO }} build --lib ${{ env.CARGO_OPTIONS }}
--package ${{ matrix.libffis }}
--target ${{ matrix.builds.target }}
--locked
- name: Prepare ${{ matrix.libffis }} libraries
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ First you'll need to make sure you have a full development environment set up:

```
brew update
brew install cmake openssl tor coreutils automake
brew install openssl cmake coreutils automake autoconf protobuf tor
brew install --cask powershell
```

Expand Down

0 comments on commit c62063d

Please sign in to comment.