Add support for Frozen Objects / Realm's #585
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: CMake Build | |
env: | |
REALM_ATLAS_ENDPOINT: ${{ secrets.ATLAS_QA_BASE_URL }} | |
REALM_BAAS_ENDPOINT: ${{ secrets.APPSERVICES_QA_BASE_URL }} | |
REALM_ATLAS_API_KEY: ${{ secrets.ATLAS_QA_API_KEY }} | |
REALM_ATLAS_PRIVATE_API_KEY: ${{ secrets.ATLAS_QA_PRIVATE_API_KEY }} | |
REALM_ATLAS_PROJECT_ID: ${{ secrets.ATLAS_QA_PROJECT_ID}} | |
REALM_CI: true | |
REALM_DISABLE_ANALYTICS: true | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
deploy-cluster: | |
runs-on: ubuntu-latest | |
name: Deploy Cluster | |
outputs: | |
clusterName: ${{ steps.deploy-cluster.outputs.clusterName }} | |
steps: | |
- uses: realm/ci-actions/mdb-realm/deploy@30bd9ead57756016f2e2ac7630433cf0883d1bae | |
id: deploy-cluster | |
with: | |
atlasUrl: ${{ env.REALM_ATLAS_ENDPOINT }} | |
realmUrl: ${{ env.REALM_BAAS_ENDPOINT }} | |
projectId: ${{ env.REALM_ATLAS_PROJECT_ID }} | |
apiKey: ${{ env.REALM_ATLAS_API_KEY }} | |
privateApiKey: ${{ env.REALM_ATLAS_PRIVATE_API_KEY }} | |
delete-cluster: | |
runs-on: ubuntu-latest | |
name: Delete Cluster | |
if: always() | |
needs: | |
- build-linux-sync | |
steps: | |
- uses: realm/ci-actions/mdb-realm/cleanup@30bd9ead57756016f2e2ac7630433cf0883d1bae | |
with: | |
atlasUrl: ${{ env.REALM_ATLAS_ENDPOINT }} | |
realmUrl: ${{ env.REALM_BAAS_ENDPOINT }} | |
projectId: ${{ env.REALM_ATLAS_PROJECT_ID }} | |
apiKey: ${{ env.REALM_ATLAS_API_KEY }} | |
privateApiKey: ${{ env.REALM_ATLAS_PRIVATE_API_KEY }} | |
build-linux-sync: | |
runs-on: ubuntu-20.04 | |
name: Linux Sync ${{ matrix.configuration }} (${{ matrix.compiler.name }} ${{ matrix.compiler.version }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
compiler: | |
- name: gcc | |
version: 8 | |
configuration: | |
- Debug | |
- Release | |
needs: | |
- deploy-cluster | |
env: | |
REALM_ATLAS_CLUSTER_NAME: ${{ needs.deploy-cluster.outputs.clusterName }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Setup Ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: ccache-linux-${{ matrix.compiler.name }}-${{ matrix.compiler.version }} | |
- name: Install Linux Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
libcurl4-openssl-dev \ | |
libssl-dev \ | |
libuv1-dev \ | |
ninja-build \ | |
zlib1g-dev \ | |
${{ matrix.compiler.name }}-${{ matrix.compiler.version }} | |
- name: Setup GCC ${{ matrix.compiler.version }} | |
if: matrix.compiler.name == 'gcc' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y g++-${{ matrix.compiler.version }} | |
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-${{ matrix.compiler.version }} 100 | |
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-${{ matrix.compiler.version }} 100 | |
- uses: ammaraskar/gcc-problem-matcher@master | |
- name: Configure | |
run: cmake --preset linux -DCMAKE_VERBOSE_MAKEFILE=${RUNNER_DEBUG:-OFF} | |
- name: Compile | |
run: cmake --build --preset linux --config ${{ matrix.configuration }} | |
- name: Test | |
working-directory: .build/cmake-preset-linux/tests/${{ matrix.configuration }}/ | |
run: ./cpprealm_sync_tests | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v3 | |
if: always() | |
with: | |
report_paths: '.build/**/TestResults.xml' | |
annotate_only: true | |
require_tests: true | |
- name: Open a tmate debug session | |
if: ${{ failure() && runner.debug }} | |
uses: mxschmitt/action-tmate@v3 | |
with: | |
timeout-minutes: 15 | |
# build-windows-sync: | |
# runs-on: windows-2022 | |
# name: Windows Sync ${{ matrix.configuration }} | |
# strategy: | |
# fail-fast: false | |
# matrix: | |
# configuration: | |
# - Debug | |
# - Release | |
# needs: | |
# - deploy-cluster | |
# env: | |
# REALM_ATLAS_CLUSTER_NAME: ${{ needs.deploy-cluster.outputs.clusterName }} | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v2 | |
# with: | |
# submodules: 'recursive' | |
# | |
# - uses: ammaraskar/msvc-problem-matcher@master | |
# | |
# - name: Configure | |
# run: cmake --preset windows-x64 | |
# | |
# - name: Compile | |
# run: cmake --build --preset windows-x64 --config ${{ matrix.configuration }} | |
# | |
# - name: Open a tmate debug session | |
# if: ${{ failure() && runner.debug }} | |
# uses: mxschmitt/action-tmate@v3 | |
# with: | |
# timeout-minutes: 15 | |
# | |
# - name: Test | |
# working-directory: .build/cmake-preset-windows-x64/tests/${{ matrix.configuration }}/ | |
# run: ./cpprealm_sync_tests | |
# | |
# - name: Publish Test Report | |
# uses: mikepenz/action-junit-report@v3 | |
# if: always() | |
# with: | |
# report_paths: '.build/**/TestResults.xml' | |
# annotate_only: true | |
# require_tests: true | |
build-windows: | |
runs-on: windows-2022 | |
name: Windows ${{ matrix.configuration }} | |
strategy: | |
fail-fast: false | |
matrix: | |
configuration: | |
- Debug | |
- Release | |
needs: | |
- deploy-cluster | |
env: | |
REALM_ATLAS_CLUSTER_NAME: ${{ needs.deploy-cluster.outputs.clusterName }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- uses: ammaraskar/msvc-problem-matcher@master | |
- name: Configure | |
run: cmake --preset windows-x64 | |
- name: Compile | |
run: cmake --build --preset windows-x64 --config ${{ matrix.configuration }} | |
- name: Open a tmate debug session | |
if: ${{ failure() && runner.debug }} | |
uses: mxschmitt/action-tmate@v3 | |
with: | |
timeout-minutes: 15 | |
- name: Test | |
working-directory: .build/cmake-preset-windows-x64/tests/${{ matrix.configuration }}/ | |
run: ./cpprealm_db_tests | |
- name: Publish Test Report | |
uses: mikepenz/action-junit-report@v3 | |
if: always() | |
with: | |
report_paths: '.build/**/TestResults.xml' | |
annotate_only: true | |
require_tests: true |