Skip to content

Commit fb33c87

Browse files
committed
build(ci): hacks and workarounds for mac and windows
1 parent 3441667 commit fb33c87

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

.github/workflows/desktop-release.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ jobs:
1919
matrix:
2020
# Changed 'ubuntu-latest' to 'ubuntu-22.04'
2121
os: [ubuntu-22.04, windows-latest, macos-latest]
22+
23+
env:
24+
# Set RUSTFLAGS to increase the stack size to 8MB
25+
# This flag is *only* set on Windows and is empty on other OSes
26+
RUSTFLAGS: ${{ matrix.os == 'windows-latest' && '-C link-arg=/STACK:8388608' || '' }}
2227

2328
steps:
2429
- name: Checkout code
@@ -51,8 +56,19 @@ jobs:
5156
- name: Install macOS Dependencies
5257
if: matrix.os == 'macos-latest'
5358
run: |
54-
brew install leveldb
55-
brew install snappy
59+
brew install leveldb snappy
60+
61+
# This is the critical part.
62+
# We are telling Cargo's build scripts where to find the libraries
63+
# we just installed via Homebrew.
64+
echo "SNAPPY_LIB_DIR=/opt/homebrew/lib" >> $GITHUB_ENV
65+
echo "SNAPPY_INCLUDE_DIR=/opt/homebrew/include" >> $GITHUB_ENV
66+
echo "LEVELDB_LIB_DIR=/opt/homebrew/lib" >> $GITHUB_ENV
67+
echo "LEVELDB_INCLUDE_DIR=/opt/homebrew/include" >> $GITHUB_ENV
68+
69+
# This is the generic way for pkg-config to find them
70+
echo "PKG_CONFIG_PATH=/opt/homebrew/lib/pkgconfig" >> $GITHUB_ENV
71+
5672
5773
# Install cargo-tree (for debugging)
5874
- name: Install cargo-tree

0 commit comments

Comments
 (0)