Skip to content

Commit

Permalink
0.2.0 Preview (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
leemaguire committed Jun 22, 2023
1 parent 5dab867 commit f5da2dc
Show file tree
Hide file tree
Showing 166 changed files with 10,869 additions and 1,296 deletions.
319 changes: 307 additions & 12 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
name: Delete Cluster
if: always()
needs:
- build-macos
- build-linux
- build-macos-sync
- build-linux-sync
steps:
- uses: realm/ci-actions/mdb-realm/cleanup@30bd9ead57756016f2e2ac7630433cf0883d1bae
with:
Expand All @@ -46,6 +46,71 @@ jobs:
apiKey: ${{ env.REALM_ATLAS_API_KEY }}
privateApiKey: ${{ env.REALM_ATLAS_PRIVATE_API_KEY }}

build-macos-alpha:
runs-on: macos-12
name: macOS ${{ matrix.configuration }} (preset ${{ matrix.preset }}, Xcode ${{ matrix.xcode }})
strategy:
fail-fast: false
matrix:
preset:
- default
- macos
xcode:
- '14.0'
configuration:
- Debug
- Release
exclude:
- configuration: ${{ (github.event_name == 'pull_request' && 'Release') || 'none' }}
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/ccache-action@v1.1
with:
key: ccache-macos-${{ matrix.preset }}-${{ matrix.xcode }}

- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@master

- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.xcode }}

- uses: ammaraskar/gcc-problem-matcher@master

- name: Configure
run: cmake --preset ${{ matrix.preset }} -DCMAKE_VERBOSE_MAKEFILE=${RUNNER_DEBUG:-OFF}

- name: Compile
run: cmake --build --preset ${{ matrix.preset }} --config ${{ matrix.configuration }}

- name: Test
working-directory: .build/cmake-preset-${{ matrix.preset }}/tests/${{ matrix.configuration }}/
run: ./cpprealm_alpha_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-macos:
runs-on: macos-12
name: macOS ${{ matrix.configuration }} (preset ${{ matrix.preset }}, Xcode ${{ matrix.xcode }})
Expand All @@ -56,7 +121,6 @@ jobs:
- default
- macos
xcode:
- '13.2.1'
- '14.0'
configuration:
- Debug
Expand Down Expand Up @@ -95,8 +159,8 @@ jobs:
run: cmake --build --preset ${{ matrix.preset }} --config ${{ matrix.configuration }}

- name: Test
working-directory: .build/cmake-preset-${{ matrix.preset }}
run: ./${{ matrix.configuration }}/cpprealm_exe_tests
working-directory: .build/cmake-preset-${{ matrix.preset }}/tests/${{ matrix.configuration }}/
run: ./cpprealm_db_tests

- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
Expand All @@ -112,9 +176,74 @@ jobs:
with:
timeout-minutes: 15

build-linux-arm:
runs-on: ubuntu-latest
name: Linux ARM ${{ matrix.configuration }} (${{ matrix.compiler.name }} ${{ matrix.compiler.version }})
build-macos-sync:
runs-on: macos-12
name: macOS Sync ${{ matrix.configuration }} (preset ${{ matrix.preset }}, Xcode ${{ matrix.xcode }})
strategy:
fail-fast: false
matrix:
preset:
- default
- macos
xcode:
- '14.0'
configuration:
- Debug
- Release
exclude:
- configuration: ${{ (github.event_name == 'pull_request' && 'Release') || 'none' }}
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/ccache-action@v1.1
with:
key: ccache-macos-${{ matrix.preset }}-${{ matrix.xcode }}

- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@master

- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.xcode }}

- uses: ammaraskar/gcc-problem-matcher@master

- name: Configure
run: cmake --preset ${{ matrix.preset }} -DCMAKE_VERBOSE_MAKEFILE=${RUNNER_DEBUG:-OFF}

- name: Compile
run: cmake --build --preset ${{ matrix.preset }} --config ${{ matrix.configuration }}

- name: Test
working-directory: .build/cmake-preset-${{ matrix.preset }}/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-linux-alpha:
runs-on: ubuntu-22.04
name: Linux Alpha ${{ matrix.configuration }} (${{ matrix.compiler.name }} ${{ matrix.compiler.version }})
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -169,8 +298,8 @@ jobs:
run: cmake --build --preset linux --config ${{ matrix.configuration }}

- name: Test
working-directory: .build/cmake-preset-linux
run: ./${{ matrix.configuration }}/cpprealm_exe_tests
working-directory: .build/cmake-preset-linux/tests/${{ matrix.configuration }}/
run: ./cpprealm_alpha_tests

- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
Expand Down Expand Up @@ -243,8 +372,82 @@ jobs:
run: cmake --build --preset linux --config ${{ matrix.configuration }}

- name: Test
working-directory: .build/cmake-preset-linux
run: ./${{ matrix.configuration }}/cpprealm_exe_tests
working-directory: .build/cmake-preset-linux/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

- name: Open a tmate debug session
if: ${{ failure() && runner.debug }}
uses: mxschmitt/action-tmate@v3
with:
timeout-minutes: 15

build-linux-sync:
runs-on: ubuntu-22.04
name: Linux Sync ${{ matrix.configuration }} (${{ matrix.compiler.name }} ${{ matrix.compiler.version }})
strategy:
fail-fast: false
matrix:
compiler:
- name: gcc
version: 11
- name: gcc
version: 12
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/ccache-action@v1.1
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
Expand All @@ -260,3 +463,95 @@ jobs:
with:
timeout-minutes: 15

build-windows:
runs-on: windows-2022
name: Windows ${{ matrix.configuration }}
strategy:
fail-fast: false
matrix:
configuration:
- Debug
- Release
exclude:
- configuration: ${{ (github.event_name == 'pull_request' && 'Release') || 'none' }}
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
# build-windows-sync:
# runs-on: windows-2022
# name: Windows Sync ${{ matrix.configuration }}
# strategy:
# fail-fast: false
# matrix:
# configuration:
# - Debug
# - Release
# exclude:
# - configuration: ${{ (github.event_name == 'pull_request' && 'Release') || 'none' }}
# 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
# run: ./${{ matrix.configuration }}/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
3 changes: 1 addition & 2 deletions .github/workflows/swiftpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
- tvOS
- tvOS Simulator
xcode:
- '13.2.1'
- '14.0'
configuration:
- Debug
Expand Down Expand Up @@ -75,7 +74,7 @@ jobs:
# Xcode 13 can't build executable targets for non-macOS platforms
scheme=realm-cpp-sdk
if [[ "${{ matrix.platform }}" == macOS* ]] || [[ "${{ matrix.xcode }}" != 13.* ]]; then
scheme=realm-cpp-sdkTests
scheme=realm-beta-tests
fi
xcodebuild -scheme $scheme -destination "generic/platform=${{ matrix.platform }}" -configuration ${{ matrix.configuration }} -derivedDataPath .build/derivedData
Expand Down

0 comments on commit f5da2dc

Please sign in to comment.