Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(fix): include protobuf during build #6077

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 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 @@ -156,9 +156,11 @@ jobs:
choco upgrade openssl -y
# Should already be installed
# choco upgrade strawberryperl -y
choco upgrade protoc -y

- 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 +171,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 +201,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
5 changes: 4 additions & 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 Expand Up @@ -168,6 +168,9 @@ First you'll need to make sure you have a full development environment set up:
- OpenSSL is compiled and statically linked by the included [rust-openssl](https://github.com/sfackler/rust-openssl) crate
- Perl is required to compile this source on Windows, please download and install [StrawberryPerl](https://strawberryperl.com/)

- [Protocol Buffers](https://protobuf.dev/)
- Install from https://github.com/protocolbuffers/protobuf#protobuf-compiler-installation or if you using [The Package Manager for Windows](https://chocolatey.org/), run ```choco upgrade protoc -y```

leet4tari marked this conversation as resolved.
Show resolved Hide resolved
- Tor
- Download [Tor Windows Expert Bundle](https://www.torproject.org/download/tor/)
- Extract to local path, e.g. `C:\Program Files (x86)\Tor Services`
Expand Down
Loading