Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Github Actions #881

Merged
merged 306 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
306 commits
Select commit Hold shift + click to select a range
9220ec5
debug cache keys
Aug 24, 2022
140157f
Add submodule because it is part of the build
Aug 24, 2022
076029e
Attempt to debug cache path
Aug 25, 2022
6036315
Merge branch 'master' into feature/github-actions
Aug 25, 2022
6feb356
Support for JVM package caching (+56 squashed commits)
Aug 25, 2022
f493925
Run JVM base tests
Aug 29, 2022
cca1831
Fix jvm artifact
Aug 29, 2022
c23783a
Conditional mac os tests
Aug 30, 2022
e547cb3
Attempt to fix macos detection
Aug 30, 2022
1f967db
Merge branch 'master' into feature/github-actions
Aug 30, 2022
2625b6a
Gradle fix
Aug 30, 2022
24abf36
Attempt to fix vcpkg
Aug 30, 2022
64268fd
Attempt to fix vcpkg
Aug 30, 2022
e7404ed
Fix sync test module
Aug 31, 2022
c705ac5
More sync module fixes
Aug 31, 2022
27b9258
Publish all platforms in the jvm package
Aug 31, 2022
26f84c3
Always build jvm packages
Aug 31, 2022
e4916df
Attempt to control when native libs are being built
Aug 31, 2022
5342110
Syntax
Aug 31, 2022
55b952e
Fix lib packaging
Aug 31, 2022
00ad1a2
Fix windows cache name
Aug 31, 2022
aa05bbf
Syntax
Aug 31, 2022
e7294e8
Disable cache check
Aug 31, 2022
385b99d
Fix windows unit tests
Sep 1, 2022
fe9adee
More fixes
Sep 1, 2022
7f04291
Attempt to debug why matrix jvm tests do not seem to run
Sep 1, 2022
ffdfcb6
Syntax
Sep 1, 2022
826225f
Back to matrix tests
Sep 1, 2022
deca317
More test fixes
Sep 1, 2022
8798a15
Attempt unit test fix
Sep 1, 2022
bb09f22
More Windows fixes
Sep 1, 2022
f10fc71
Fix windows
Sep 2, 2022
228e4a6
Attempt to fix build not using ccache compiler
Sep 2, 2022
ed2452e
Use Core with proper CCache support.
Sep 2, 2022
b526676
Use Realm Core with ccache support when used as a submodule
Sep 4, 2022
3f102e7
Android tests also need JVM packages
Sep 5, 2022
e0a618a
More test output
Sep 5, 2022
bf2afcd
Attempt to package all the things
Sep 5, 2022
15bae61
Merge branch 'master' into feature/github-actions
Sep 20, 2022
639c8f9
Build gradle plugin before running detekt/ktlint
Sep 20, 2022
7905f44
Build sample apps in parallel
Sep 20, 2022
84ef1e1
Trigger building test samples
Sep 20, 2022
e8e4d14
Building benchmarks depends on all packages
Sep 20, 2022
1a50834
Fix building kmm sample
Sep 20, 2022
d11f909
Fix path to unit test results.
Sep 20, 2022
55c7f15
Disable monkey test + add job timeout for tests
Sep 20, 2022
14c6b9d
Set disk size and ram for emulators.
Sep 22, 2022
ec1d00d
Re-enable monkey
Sep 22, 2022
d600842
throttle monkey, disable gathering unit test results from compatibili…
Sep 22, 2022
3f076b4
Merge branch 'master' into feature/github-actions
Sep 22, 2022
356dfe9
Retarget test jobs to packages
Sep 22, 2022
6da55d0
fix simulator ref
Sep 22, 2022
34ba14a
publish targets
Sep 22, 2022
d85ae5e
Fix targets
Sep 22, 2022
ff474b9
More targets
Sep 22, 2022
1fe03e5
target
Sep 22, 2022
beb1fb9
Use m2 artifacts for tests. Enable Gradle Plugin integration project
Sep 22, 2022
c851a17
Fix android integration tests
Sep 22, 2022
f8e5051
More test fixes
Sep 23, 2022
8d95d05
Gradle integration tests need an emulator
Sep 23, 2022
9b0bd35
Extract integration tests into reusable workflow.
Sep 23, 2022
ef4c052
Better hashing of input files. Deploy snapshot release
Sep 23, 2022
c0191e2
releases require all tests to pass as well
Sep 23, 2022
c901985
More build info
Sep 23, 2022
728ed17
improved debugging for jvm tests. branch detection for snapshots
Sep 23, 2022
d0857b1
Env naming
Sep 23, 2022
d691169
if syntax
Sep 23, 2022
2ff7f45
Fix startup failure
Sep 23, 2022
1d56e0c
Disable jvm gradle cache
Sep 23, 2022
9cea102
Attempt to figure out why build fails all the time
Sep 23, 2022
4977f57
Increase timeout
Sep 23, 2022
4b002aa
Try not setting java version
Sep 23, 2022
4e65fa0
Try Java 17
Sep 23, 2022
a8ce642
Debug failing test. Back to Java 11
Sep 23, 2022
be5c6fc
Debug deleting files
Sep 23, 2022
cab0c8e
Re-enable cache
Sep 23, 2022
a390fd4
Adding device farm test (#1066)
nhachicha Nov 2, 2022
a259795
Merge branch 'master' into feature/github-actions
Nov 28, 2022
63a0aa3
Fix GHA build (#1152)
cmelchior Nov 29, 2022
d10ed2f
Github Action fixing JVM Tests (#1121)
nhachicha Dec 1, 2022
e2fec96
Add README
Dec 1, 2022
29ea621
Merge branch 'master' into feature/github-actions
Dec 6, 2022
04626bd
Merge branch 'main' into feature/github-actions
Jan 13, 2023
b44b7fb
Merge branch 'main' into feature/github-actions
Jan 16, 2023
a14c1a4
Merge branch 'main' into feature/github-actions
Jan 20, 2023
bab71e3
GHA: Remove Android debug builds (#1216)
cmelchior Jan 22, 2023
b31977a
Merge branch 'main' into feature/github-actions
Jan 22, 2023
5a15637
Merge branch 'main' into feature/github-actions
Jan 30, 2023
b32779d
Deploy snapshots (#1156)
cmelchior Feb 1, 2023
3a771ba
Fix some warnings for Node 12 and not using GITHUB_OUTPUT (#1253)
cmelchior Feb 2, 2023
8425f5d
Merge branch 'main' into feature/github-actions
Feb 2, 2023
fae2fec
Merge branch 'main' into feature/github-actions
Feb 10, 2023
fac6225
Merge branch 'main' into feature/github-actions
Feb 21, 2023
d6d49d4
Merge branch 'main' into feature/github-actions
Mar 21, 2023
6a760d6
Fix imports
Mar 21, 2023
c0d255d
Fix unit test on Windows
Mar 21, 2023
5a94410
Merge branch 'main' into feature/github-actions
Mar 31, 2023
82571d7
Merge branch 'main' into feature/github-actions
Apr 12, 2023
b2a5cd3
Merge branch 'main' into feature/github-actions
Apr 28, 2023
a50f81e
Merge branch 'main' into feature/github-actions
Jun 15, 2023
99d6bda
Improve thread tests
Jun 15, 2023
bf12a9d
More thread changes
Jun 16, 2023
548bead
More debug information in test
Jun 16, 2023
f6eb3db
Make test more relaxed
Jun 16, 2023
f8a8838
Only delete after the Realm is closed.
Jun 16, 2023
ccf46d6
Merge branch 'main' into feature/github-actions
Sep 5, 2023
bbc78aa
Optimise deleting existing caches from the commandline
Sep 5, 2023
68c704a
Fix default schedulers on Linux and Windows
Sep 6, 2023
aa19b3c
Merge branch 'main' into feature/github-actions
Sep 8, 2023
78de68d
Merge branch 'main' into feature/github-actions
Sep 22, 2023
b354adc
Windows path seperator
Sep 22, 2023
d4af054
Merge branch 'main' into feature/github-actions
Nov 16, 2023
9e434c7
Refactor if statements to match .NET
Nov 16, 2023
6bfc8a4
Syntax
Nov 16, 2023
c4eaee6
More syntax
Nov 16, 2023
94a8347
Merge branch 'main' into feature/github-actions
Nov 21, 2023
0dfc0bc
Run new Gradle integration tests
Nov 23, 2023
fabeedb
Add Gradle 8 test
Nov 23, 2023
24fd254
Use default image for Android emulator
Nov 23, 2023
1be68f5
Improve emulator performance
Nov 23, 2023
a202f07
Attempt to cache Android Emulator AVD
Nov 24, 2023
3e86707
Syntax
Nov 24, 2023
39ad713
Using just github.job also appended a timestamp resulting in no cache…
Nov 24, 2023
70d837f
Attempt to get emulator to run
Nov 24, 2023
17a1413
Add canery channel
Nov 24, 2023
4b7a9a6
Set API level to 30 for emulators for atd to work
Nov 24, 2023
f057e4c
More emulator fixes
Nov 24, 2023
4f0641e
Go back to non-atd emulator image + disable caching on android tests …
Nov 24, 2023
f51841e
Use 64 bit architecture
Nov 24, 2023
aa021cc
Revert emulator back
Nov 27, 2023
a4b071b
Re-enable caching
Nov 27, 2023
21b7eee
Improve error logging for Realm-level Coroutine tests
Nov 27, 2023
7d2e88b
Disable AVD caching (again)
Nov 27, 2023
4d78d2b
Attempt to fix race conditions in RealmNotificationsTests
Nov 27, 2023
f46d705
More race condition fixes
Nov 27, 2023
a32f2f6
Add logging to tests
Nov 27, 2023
abaefc4
More debugging
Nov 28, 2023
9a36956
Attempt to use unlimited buffer and crash if we do not consume all el…
Nov 28, 2023
87cc784
Formatting
Nov 28, 2023
5b5f857
Make sure consume elements from the TestChannel
Nov 28, 2023
dc3970b
Print errors to System.out instead of using RealmLog
Nov 28, 2023
2ad894d
Throw proper TimeoutCancellationException
Nov 28, 2023
187f6d8
Attempt to add more debugging
Nov 28, 2023
a2ec427
More debugging tests
Nov 29, 2023
4d75947
Cleanup
Nov 29, 2023
3e81030
Merge branch 'main' into feature/github-actions
Nov 29, 2023
18f56f9
Add logging to asFlow() test
Nov 29, 2023
1f623a7
Test 1
Nov 29, 2023
52f1548
Test 2
Nov 29, 2023
5b50585
Test 3
Nov 29, 2023
5eedcfd
Test 4
Nov 29, 2023
97cb18a
Test 5
Nov 29, 2023
ccabad8
Attempt to debug our notification system
Nov 29, 2023
562fe3c
Test 1
Nov 29, 2023
351d53f
Test 2
Nov 29, 2023
36ec14c
Test 3
Nov 29, 2023
b311c00
Test 4
Nov 29, 2023
8092d87
Test 5
Nov 29, 2023
82541d7
Test 6
Nov 29, 2023
fb50232
Add logging to core
Nov 30, 2023
23d7cb4
More core logging
Nov 30, 2023
941c76c
Ignore test
Nov 30, 2023
ebfb69d
Merge branch 'main' into feature/github-actions
Dec 6, 2023
255dede
Split out Gradle Plugin and Compiler Plugin builds as seperate target…
Dec 6, 2023
d91bf00
Fix target naming
Dec 6, 2023
0a484ad
More naming fixes
Dec 6, 2023
9044baf
MacOS JNI can now be built independently
Dec 7, 2023
8110210
Fix paths for JNI builds
Dec 7, 2023
38f7d1d
Also build JVM target
Dec 7, 2023
0941a71
Fix macos native lib path.
Dec 7, 2023
392f805
Merge branch 'main' into feature/github-actions
Dec 7, 2023
e0b6714
Merge branch 'main' into feature/github-actions
Dec 7, 2023
6b33288
Split out building Kotlin metadata into its own job
Dec 7, 2023
9fb6642
Detect metadata cache correctly
Dec 7, 2023
c6812dd
Merge branch 'main' into feature/github-actions
Dec 7, 2023
88b63c3
We also need to build plugins first
Dec 7, 2023
e448b54
Fix JNI cache paths
Dec 7, 2023
28ff1a6
Fix tests depending on metadata
Dec 7, 2023
d4ca625
Fix using the wrong Realm instance to create KeyPath arrays
Dec 8, 2023
6e3e157
Formatting
Dec 8, 2023
28a407d
Merge branch 'main' into feature/github-actions
Dec 8, 2023
6a6812d
More debugging of Realm flows
Dec 8, 2023
8352e27
Test 1
Dec 8, 2023
174f146
Test 2
Dec 8, 2023
2edc588
Test 3
Dec 8, 2023
0ca889d
Test 4
Dec 8, 2023
cf4a6af
Test 5
Dec 8, 2023
ec92bfe
Add debug output to Device Farm action
Dec 8, 2023
6edd9f7
Reduce log output and fix variable usage
Dec 8, 2023
70e4114
More debug output
Dec 8, 2023
7b3bc77
More logging
Dec 8, 2023
fccea1a
Use onSubscription to avoid loosing events
Dec 8, 2023
f5ed1e3
Increase timeout to accommodate CI
Dec 8, 2023
1468319
InitialRealm event must flow from the Notifier to ensure everything i…
Dec 9, 2023
859485a
Fix tests
Dec 9, 2023
94f4eb1
Increase delay to avoid problems with slow IO on GHA
Dec 10, 2023
696caa5
More accurate reporting
Dec 10, 2023
1ac7434
More testing
Dec 11, 2023
0166024
More debug output
Dec 11, 2023
f3cb60a
More logging
Dec 12, 2023
135eca8
More version debug
Dec 12, 2023
c0293f3
Merge branch 'main' into feature/github-actions
Dec 15, 2023
745fdff
Cleanup logging
Dec 15, 2023
afe7300
More cleanup
Dec 15, 2023
6b081ac
Install CMake for static analysis
Dec 15, 2023
2638e35
Update CMake
Dec 15, 2023
b4f5e32
Add missing cmake
Dec 15, 2023
758bf8f
Merge branch 'main' into feature/github-actions
Jan 8, 2024
e0a8f04
Readd Dokka tasks
Jan 8, 2024
cd05a23
Fix gradle properties
Jan 8, 2024
e14265c
Build metadata on JVM to avoid issues with building macos packages
Jan 9, 2024
df89229
Merge branch 'main' into feature/github-actions
Jan 9, 2024
6fb74b0
Fix formatting
Jan 9, 2024
5f60806
Package the final binary correctly
Jan 9, 2024
3f08a47
Remove duplicated step
Jan 9, 2024
5f71a43
Fix copying native libs
Jan 10, 2024
b47f9e7
Re-enable JenkinsFile. Disable releases from anything but main and re…
Jan 10, 2024
1648b9f
Use same version as main branch
Jan 10, 2024
c2e0810
[CI] Sync tests with Device farm (#1605)
nhachicha Jan 10, 2024
8271b37
Revert "[CI] Sync tests with Device farm (#1605)"
Jan 10, 2024
ed39df3
Add concurrency support + check for release branch at top of script
Jan 11, 2024
b9b2894
Syntax
Jan 11, 2024
dafb51a
Test syntax
Jan 11, 2024
edb1c73
Remove concurrency section
Jan 11, 2024
6373289
Change SNAPSHOT release syntax
Jan 11, 2024
413ee25
Re-add branch check
Jan 11, 2024
37a0ca4
Add root cause for why using env doesn't work.
Jan 11, 2024
8b057f3
Move setting Java version to central location
Jan 12, 2024
98057df
Move more configuration to env
Jan 12, 2024
152d758
Merge branch 'main' into feature/github-actions
Jan 15, 2024
7baa045
Fix copyNativeRealmLibs arguments
Jan 15, 2024
5f83c6d
Test environment variables
Jan 15, 2024
bbd48a4
PR feedback and consolidate variables in Environment
Jan 15, 2024
4f7b13a
Fix JAVA distribution
Jan 15, 2024
e202ff3
Print vars to console
Jan 15, 2024
e92f43d
More debug
Jan 15, 2024
837c966
Remove debug output
Jan 15, 2024
570d337
Pin version of SWIG to 4.1.1
Jan 15, 2024
302ebb8
Try to use apt-get to install swig
Jan 16, 2024
8a36dba
Not swigt
Jan 16, 2024
34d1d8c
Print swig versions available on apt-get
Jan 16, 2024
27d832a
Pin version of SWIG to 4.1.1
Jan 16, 2024
bd6f210
Reorder SWIG install statements
Jan 16, 2024
460d819
Do not upgrade dependencies
Jan 16, 2024
a48d2cf
Clean yaml files
Jan 16, 2024
17f8161
Update README
Jan 16, 2024
10a282c
Cleanup
Jan 16, 2024
cb0c1a5
Merge branch 'main' into feature/github-actions
Jan 29, 2024
f5121d7
GHA: Enable Sync Tests (#1272)
Jan 30, 2024
5307484
Enable platform networking + fix cache check for building android
Jan 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .github/actions/run-android-device-farm-test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: 'Run Android tests on Device Farm'
inputs:
apk-path:
required: true
apk-auxiliary-path:
description: 'Install additional APKs needed for the tests'
default: ''
required: false
app-id:
description: 'The test runner class to use'
required: true
project-arn:
required: true
device-pool-arn:
required: true
arguments:
default: _
outputs:
test-results-path:
value: ${{ steps.get-test-results.outputs.results-path }}
runs:
using: "composite"
steps:
- name: Run the tests
uses: nhachicha/aws-devicefarm/test-application@master

id: run-tests
with:
project_arn: ${{ inputs.project-arn }}
device_pool_arn: ${{ inputs.device-pool-arn }}
app_file: ${{ inputs.apk-path }}
app_auxiliary_files: ${{ inputs.apk-auxiliary-path }}
app_type: ANDROID_APP
test_type: APPIUM_PYTHON
test_package_file: https://github.com/realm/aws-devicefarm-sample-data/releases/download/0.3/sample_env_python3.zip
test_package_type: APPIUM_PYTHON_TEST_PACKAGE
test_spec_file: test_spec-${{ inputs.app-id }}.yaml
test_spec_type: APPIUM_PYTHON_TEST_SPEC
remote_src: true
test_spec: |
version: 0.1
phases:
install:
commands:
- export PYTHON_VERSION=3
test:
commands:
- adb shell pm list packages | grep realm
- adb shell am instrument -w -r ${{ inputs.app-id }}/androidx.test.runner.AndroidJUnitRunner | egrep 'OK \([0-9]+ test[s]?\)'

- run: |
Install-Module -Name AWSPowerShell -Force
echo "::group::Data"
echo (ConvertFrom-Json '${{ steps.run-tests.outputs.data }}' | ConvertTo-Json)
echo "::endgroup::"
Import-Module AWSPowerShell
$runs = Get-DFRunList -Arn ${{ inputs.project-arn }}
$jobs = Get-DFJobList -Arn $runs[0].Arn
$suites = Get-DFSuiteList -Arn $jobs[0].Arn
$fileArtifacts = Get-DFArtifactList -Arn $suites[1].Arn -Type File
echo "All File Artifacts:"
echo $fileArtifacts
$logCatArtifacts = $fileArtifacts | Where-Object { $_.Name -EQ "Logcat" }
if ($logCatArtifacts) {
echo "LogCat Artifacts:"
echo $logCatArtifacts
echo "::group::Logcat"
Invoke-WebRequest -Uri $logCatArtifacts[0].Url | Select-Object -Expand RawContent
echo "::endgroup::"
} else {
Write-Warning "No logCatArtifacts found."
}

shell: pwsh
if: always()
name: Device Farm Output
16 changes: 16 additions & 0 deletions .github/actions/setup-build-dependencies/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Setup build dependencies"
description: "Setup dependencies required for building the Realm Kotlin SDK"
inputs:
native-support:
required: false
description: "Whether or not to install dependencies required to build native code. Default is 'true'."
default: 'true'
cmelchior marked this conversation as resolved.
Show resolved Hide resolved

runs:
using: "composite"
steps:

# TODO Is it worth doing this?
- name: Validate Gradle wrapper
uses: gradle/[email protected]

4 changes: 2 additions & 2 deletions .github/workflows/auto-merge-branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
id: find-target-branch
shell: sh
run: |
if [ "${GITHUB_REF#refs/heads/}" = "main" ]; then echo '::set-output name=branch::releases/ktor2-support'; fi
if [ "${GITHUB_REF#refs/heads/}" = "releases" ]; then echo '::set-output name=branch::${{ github.event.repository.default_branch }}'; fi
if [ "${GITHUB_REF#refs/heads/}" = "main" ]; then echo 'branch=releases/ktor2-support' >> $GITHUB_OUTPUT; fi
cmelchior marked this conversation as resolved.
Show resolved Hide resolved
if [ "${GITHUB_REF#refs/heads/}" = "releases" ]; then echo 'branch=${{ github.event.repository.default_branch }}' >> $GITHUB_OUTPUT; fi

# Unconditionally create a PR with the changes that needs to be manually reviewed.
# https://cli.github.com/manual/gh_pr_create
Expand Down
Loading
Loading