Skip to content

Commit

Permalink
Merge pull request #24 from emqx/0610-fix-build-on-arm64
Browse files Browse the repository at this point in the history
fix: build on arm64
  • Loading branch information
id authored Jun 10, 2024
2 parents ee88501 + f0e0617 commit f87cd7d
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,38 @@ jobs:
"status": "done"
}
}'
macos:
strategy:
matrix:
otp-version: ['25', '26']
fdb-version: ['7.3.27']
runs-on: macos-14
env:
FDB_VERSION: ${{ matrix.fdb-version }}
# Set to 1 for verbose rebar3 logging
DEBUG: 0
# Set to 1 for even more verbose rebar3 logging
DIAGNOSTIC: 0
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Erlang
run: |
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
brew install erlang@${{ matrix.otp-version }}
echo "$(brew --prefix erlang@${{ matrix.otp-version }})/bin" >> $GITHUB_PATH
wget https://s3.amazonaws.com/rebar3/rebar3
sudo mv rebar3 /usr/local/bin/ && sudo chmod +x /usr/local/bin/rebar3
export "PATH=$(brew --prefix erlang@${{ matrix.otp-version }})/bin:$PATH"
erl -eval 'erlang:display(erlang:system_info(system_version)),halt()'
- name: Install FoundationDB
run: |
wget -q https://github.com/apple/foundationdb/releases/download/${FDB_VERSION}/FoundationDB-${FDB_VERSION}_arm64.pkg
sudo installer -pkg FoundationDB-${FDB_VERSION}_arm64.pkg -target /
- name: Initialize FDB database
run: fdbcli --exec "configure tenant_mode=optional_experimental; status" --timeout 60
- name: Compile
run: rebar3 compile
2 changes: 1 addition & 1 deletion c_src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,7 @@ erlfdb_transaction_get_range_split_points(
ErlFDBTransaction* t;
ErlNifBinary begin;
ErlNifBinary end;
int64_t chunkSize;
ErlNifSInt64 chunkSize;
FDBFuture* future;
void* res;

Expand Down

0 comments on commit f87cd7d

Please sign in to comment.