| name: CI |
| |
| on: |
| push: |
| branches: [ main ] |
| pull_request: |
| |
| jobs: |
| |
| build_on_linux: |
| runs-on: ubuntu-latest |
| steps: |
| - name: Check out repository code |
| uses: actions/checkout@v2 |
| with: |
| persist-credentials: false |
| submodules: recursive |
| - name: Install FoundationDB |
| env: |
| FDB_VERSION: '6.2.30' |
| run: | |
| wget https://www.foundationdb.org/downloads/${FDB_VERSION}/ubuntu/installers/foundationdb-clients_${FDB_VERSION}-1_amd64.deb |
| wget https://www.foundationdb.org/downloads/${FDB_VERSION}/ubuntu/installers/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: Setup Erlang |
| uses: ./.github/actions/setup-beam |
| with: |
| otp-version: '24' |
| rebar3-version: '3.17' |
| - name: Enforce coding style |
| run: rebar3 fmt --check |
| - 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 |
| |
| build_on_windows: |
| runs-on: windows-latest |
| env: |
| # 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@v2 |
| with: |
| persist-credentials: false |
| submodules: recursive |
| - name: Install FoundationDB |
| env: |
| FDB_VERSION: '6.2.30' |
| # Download FDB .msi, install it, and add FDB to the $env:Path for all future steps |
| run: | |
| Set-PSDebug -Trace 1 |
| Invoke-WebRequest -Uri https://www.foundationdb.org/downloads/$env:FDB_VERSION/windows/installers/foundationdb-$env:FDB_VERSION-x64.msi -OutFile foundationdb-$env:FDB_VERSION-x64.msi |
| msiexec /i foundationdb-$env:FDB_VERSION-x64.msi /passive |
| echo "c:/Program Files/foundationdb/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append |
| - name: Setup Erlang |
| uses: ./.github/actions/setup-beam |
| with: |
| otp-version: '24' |
| rebar3-version: '3.17' |
| - name: Setup MSVC toolchain |
| uses: ./.github/actions/msvc-dev-cmd |
| - name: Compile |
| run: rebar3 compile |
| - name: EUnit tests |
| env: |
| # 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: win32_external_fdbserver |
| run: rebar3 eunit |
| - name: Setup tmate session on job failure |
| uses: ./.github/actions/tmate |
| if: ${{ failure() }} |
| with: |
| limit-access-to-actor: true |