Fix FDB CI vsn #98
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
linux: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
include: | |
- otp: "25" | |
fdb: "7.2.2" | |
eunit: true | |
- otp: "25" | |
fdb: "7.3.42" | |
eunit: true | |
- otp: "27.0.1" | |
fdb: "7.2.2" | |
eunit: true | |
- otp: "27.0.1" | |
fdb: "7.3.42" | |
eunit: true | |
bindingtester: true | |
dialyzer: true | |
fmt: true | |
name: "linux / OTP ${{ matrix.otp }} / FDB ${{ matrix.fdb }} (${{ matrix.eunit && 'eunit' || '' }}${{ matrix.bindingtester && ' bindingtester' || '' }}${{ matrix.dialyzer && ' dialyzer' || '' }}${{ matrix.fmt && ' fmt' || '' }})" | |
env: | |
FDB_VERSION: ${{ matrix.fdb }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{matrix.otp}} | |
- name: Run rebar3 fmt check for Erlang files | |
run: ERLFDB_ASSERT_FDBCLI=0 rebar3 fmt --check | |
if: ${{ matrix.fmt }} | |
- name: Run clang-format check for C files | |
uses: jidicula/[email protected] | |
with: | |
clang-format-version: "18" | |
check-path: c_src | |
if: ${{ matrix.fmt }} | |
- name: Install FoundationDB | |
run: | | |
wget https://github.com/apple/foundationdb/releases/download/${FDB_VERSION}/foundationdb-clients_${FDB_VERSION}-1_amd64.deb | |
wget https://github.com/apple/foundationdb/releases/download/${FDB_VERSION}/foundationdb-server_${FDB_VERSION}-1_amd64.deb | |
sudo dpkg -i foundationdb-clients_${FDB_VERSION}-1_amd64.deb | |
sudo dpkg -i foundationdb-server_${FDB_VERSION}-1_amd64.deb | |
fdbcli --exec 'configure tenant_mode=optional_experimental' | |
if: ${{ matrix.dialyzer || matrix.eunit || matrix.bindingtester }} | |
- name: Run dialyzer | |
run: rebar3 dialyzer | |
if: ${{ matrix.dialyzer }} | |
- name: EUnit tests | |
run: rebar3 eunit | |
if: ${{ matrix.eunit }} | |
- name: Binding Tester | |
env: | |
ERL_LIBS: _build/test/lib/erlfdb/ | |
run: | | |
curl -L "https://github.com/apple/foundationdb/archive/${{ env.FDB_VERSION }}.tar.gz" > foundation.tar.gz | |
tar -xf foundation.tar.gz | |
rm foundation.tar.gz | |
mv foundationdb-$FDB_VERSION foundationdb | |
cd foundationdb | |
sed "s:USER_SITE_PATH:$(python3 -m site --user-site):g" ../test/bindingtester/foundationdb.patch | patch -p1 | |
cd .. | |
pip3 install --user -Iv foundationdb==${{ env.FDB_VERSION }} | |
pip3 show foundationdb | |
./test/bindingtester/loop.sh | |
if: ${{ matrix.bindingtester }} | |
macos: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
include: | |
- fdb: "7.3.42" | |
eunit: true | |
name: "macOS / FDB ${{ matrix.fdb }} (${{ matrix.eunit && 'eunit' || '' }})" | |
env: | |
FDB_VERSION: ${{ matrix.fdb }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install | |
run: | | |
brew update | |
brew install erlang rebar3 | |
curl -L "https://github.com/apple/foundationdb/releases/download/${{ env.FDB_VERSION }}/FoundationDB-${{ env.FDB_VERSION }}_arm64.pkg" > "FoundationDB-${{ env.FDB_VERSION }}.pkg" | |
sudo installer -allowUntrusted -verboseR -pkg "FoundationDB-${{ env.FDB_VERSION }}.pkg" -target / | |
- name: EUnit tests | |
run: rebar3 eunit | |
if: ${{ matrix.eunit }} |