feat: upgrade to fdb 7.1.43 #18
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, dev ] | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
otp_fdb_matrix: | |
strategy: | |
matrix: | |
otp-version: ['24', '25'] | |
fdb-version: ['7.1.43'] | |
runs-on: ubuntu-latest | |
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 | |
ImageOS: ubuntu20 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
submodules: recursive | |
- name: Setup Erlang | |
uses: ./.github/actions/setup-beam | |
with: | |
otp-version: ${{ matrix.otp-version }} | |
rebar3-version: '3.17' | |
ImageOS: ubuntu20 | |
- 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 | |
- name: Compile | |
run: rebar3 compile | |
- name: EUnit tests | |
run: rebar3 eunit | |
- name: Setup tmate session on job failure | |
uses: ./.github/actions/tmate | |
if: ${{ failure() }} | |
with: | |
limit-access-to-actor: true | |
os_fdb_matrix: | |
strategy: | |
matrix: | |
# erlef/setup-beam action does not support macos yet | |
os: [ubuntu-latest] | |
fdb-version: ['7.1.43'] | |
runs-on: ${{ matrix.os }} | |
env: | |
FDB_VERSION: ${{ matrix.fdb-version }} | |
# This profile uses the FDB server started in the "Install FoundationDB" step | |
# instead of starting another one (the code that manages the "local" FDB in the | |
# test suite is not designed with x-platform compatibility in mind) | |
REBAR_PROFILE: devcontainer | |
# Set to 1 for verbose rebar3 logging | |
DEBUG: 0 | |
# Set to 1 for even more verbose rebar3 logging | |
DIAGNOSTIC: 0 | |
ImageOS: ubuntu20 | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
submodules: recursive | |
- name: Setup Erlang | |
uses: ./.github/actions/setup-beam | |
with: | |
otp-version: '24' | |
rebar3-version: '3.17' | |
ImageOS: ubuntu20 | |
- name: Install FoundationDB (Ubuntu) | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
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 | |
- name: Install FoundationDB (Windows) | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
Set-PSDebug -Trace 1 | |
Invoke-WebRequest -Uri https://github.com/apple/foundationdb/releases/download/$env:FDB_VERSION/foundationdb-$env:FDB_VERSION-x64.msi -OutFile foundationdb-$env:FDB_VERSION-x64.msi | |
Start-Process -Wait -FilePath msiexec -ArgumentList /i, foundationdb-$env:FDB_VERSION-x64.msi, /passive | |
echo "C:\Program Files\foundationdb\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
- name: Compile | |
run: rebar3 compile | |
- name: EUnit tests | |
run: rebar3 eunit | |
- name: Setup tmate session on job failure | |
uses: ./.github/actions/tmate | |
if: ${{ failure() }} | |
with: | |
limit-access-to-actor: true | |
binding_tester: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
#test-name: [api, directory, directory_hca, tuple] | |
test-name: [api] | |
api-version: [710] | |
include: | |
# The `scripted` test only supports the latest API version | |
- test-name: scripted | |
api-version: 710 | |
container: | |
image: debian:testing-slim | |
env: | |
# This profile just ensures we use the FDB server in the service container | |
REBAR_PROFILE: devcontainer | |
FDB_VERSION: 7.1.43 | |
steps: | |
- name: Initialize Container | |
run: | | |
mkdir -p /opt/fdb | |
cd /opt/fdb | |
mkdir test | |
apt -y update | |
apt -y install python3 | |
apt -y install python3.11-venv | |
apt -y install wget | |
apt -y install adduser | |
apt -y --no-install-recommends install erlang | |
apt -y --no-install-recommends install rebar3 | |
apt -y --no-install-recommends install gcc | |
apt -y --no-install-recommends install libc6-dev | |
python3 -m venv py | |
./py/bin/pip install -Iv foundationdb==7.1.43 | |
- 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 | |
dpkg -i foundationdb-clients_${FDB_VERSION}-1_amd64.deb | |
dpkg -i foundationdb-server_${FDB_VERSION}-1_amd64.deb | |
- name: Initialize FDB database | |
run: | | |
fdbcli --exec "configure storage_migration_type=aggressive" | |
fdbcli --exec "configure ssd" | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- name: Compile erlfdb | |
run: rebar3 compile | |
- name: Execute unit tests | |
run: rebar3 eunit | |
- name: Execute binding test | |
env: | |
TEST_NAME: ${{ matrix.test-name }} | |
API_VERSION: ${{ matrix.api-version }} | |
COVER_ENABLED: true | |
ERL_LIBS: _build/devcontainer+test/lib/erlfdb/ | |
run: | | |
cp $GITHUB_WORKSPACE/test/tester.es /opt/fdb/test/tester.es | |
/opt/fdb/py/bin/python $GITHUB_WORKSPACE/.ci/bindingtester/bindingtester.py erlang \ | |
--test-name $TEST_NAME \ | |
--api-version $API_VERSION \ | |
--instruction-prefix $TEST_NAME \ | |
--num-ops 10000 | |
- name: Upload results to Coveralls | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_FLAG_NAME: bindingtest-${{ matrix.test-name }}-${{ matrix.api-version }} | |
run: rebar3 as test coveralls send | |
finalize_coverage_report: | |
needs: [binding_tester] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Finalize Coveralls report | |
run: | | |
curl https://coveralls.io/webhook \ | |
--header 'Content-Type: application/json' \ | |
--data '{ | |
"repo_name": "${{ github.repository }}", | |
"repo_token": "${{ secrets.GITHUB_TOKEN }}", | |
"payload": { | |
"build_num": ${{ github.run_number }}, | |
"status": "done" | |
} | |
}' |