-
Notifications
You must be signed in to change notification settings - Fork 61
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
Conversation
6234917
to
a1a5466
Compare
80bc206
to
4423635
Compare
# Conflicts: # buildSrc/src/main/kotlin/Config.kt # gradle/wrapper/gradle-wrapper.jar
Squashed commits: [5cc823b] Remember to checkout windows code [fd14df3] Windows cache management [83fbabc] Remove cache dir [281d41f] Better flow control [ba7e617] Cleanup [1089f4e] More path [b52078c] More path [08dd96a] Windows [52a2a81] use script root [37602fc] Windows [fde1daa] Setup vcpkg [2eb5733] More windows [a9eafc3] More windows [a4e9d40] Attempt to fix windows cmake [224b683] Use vcpkg toolchain from Realm Core [fe89a9b] No need to delete folder as runner is clean [6728a61] Powershell syntax [eb953b3] Attempt to fix windows cmake [a37e15e] jni libs should be built even if jni stub is skipped [642be64] More cache attempts [379b512] Fix jni-swig-stub cache [eb7683b] More cache fixes [ff58582] Attempt to fix caching [ef51caa] JNI caching and windows cmdline [278d06d] Use proper line split [8d83809] bat fixes [81c1249] Attempt to build windows jvm [7bb5f81] Attempt to fix docker build [2ddf50c] swig also depends on cache [99cbc9f] Proper stub task [bd05668] Fix path [39d73f0] Fix path [4e5bb0d] Syntax [e703dca] Syntax [eff7755] Preliminary support for JVM [cd6c060] Make sure that simulator builds work for both x64 and arm64 independently. [51fa175] Fix ios arm64 build [d81da94] Attempt to test ios [f43eb95] Disable arm builds completely [40db240] Add more documentation [66aa337] Don't publish arm simulator for sync [675c883] Fix target [cf4806b] Proper dependency for ios tests [dad3caf] First attempt at iOS build [217e592] More fixes [1cd0dac] Disable macos arm tests because we lack the Android SDK on the runner for now [e1b4ee4] Matrix macOs builds [ef78e1f] Fix macos caching [b62fdfd] Run macos tests on macos, not android tests [7537d71] Add support for building only macOS arm64 [a0aeb8b] Add macos testing [87d1513] Re-enable builds [0b401c9] Working version of delete file [9be0848] Rework caching logic to work around issues with paths and split builds [43fdaf3] Play around with paths [bd55aab] Attempt to download to other cache path
5646fd5
to
6feb356
Compare
# Conflicts: # CHANGELOG.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huge effort 🎉 left some minor comments. Also didn't went thoroughly against the KTS script (still in progress?)
MAVEN_CENTRAL_USER: ${{ secrets.MAVEN_CENTRAL_USER }} | ||
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} | ||
working-directory: tools | ||
run: kotlin ./publish_snapshots.main.kts "../" "${{ inputs.version-label }}" "$GPG_SIGNING_KEY" "$GPG_PASS_PHRASE" "$MAVEN_CENTRAL_USER" "$MAVEN_CENTRAL_PASSWORD" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this pass the secret in plain text as arguments? maybe publish_snapshots.main.kts
can read directly the arguments as environment variable inside the script?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, GHA detects this and hides it in the log output:
Run kotlin ./publish_snapshots.main.kts "../" "1.13.0-gha-SNAPSHOT" "$GPG_SIGNING_KEY" "$GPG_PASS_PHRASE" "$MAVEN_CENTRAL_USER" "$MAVEN_CENTRAL_PASSWORD"
kotlin ./publish_snapshots.main.kts "../" "1.13.0-gha-SNAPSHOT" "$GPG_SIGNING_KEY" "$GPG_PASS_PHRASE" "$MAVEN_CENTRAL_USER" "$MAVEN_CENTRAL_PASSWORD"
shell: /usr/bin/bash -e {0}
env:
JAVA_HOME: /opt/hostedtoolcache/Java_Zulu_jdk/11.0.[2](https://github.com/realm/realm-kotlin/actions/runs/7035340087/job/19147261366#step:7:2)1-9/x6[4](https://github.com/realm/realm-kotlin/actions/runs/7035340087/job/19147261366#step:7:4)
JAVA_HOME_11_X[6](https://github.com/realm/realm-kotlin/actions/runs/7035340087/job/19147261366#step:7:6)4: /opt/hostedtoolcache/Java_Zulu_jdk/11.0.21-9/x64
GPG_SIGNING_KEY: ***
GPG_PASS_PHRASE: ***
MAVEN_CENTRAL_USER: ***
MAVEN_CENTRAL_PASSWORD: ***
Setup signing key
os: [macos-latest, ubuntu-latest, windows-latest] # TODO Should we also test om MacOS arm64? | ||
include: | ||
- os: macos-latest | ||
test-title: Unit Test Results - Base JVM MacOS x64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was referring to these Junit file reports that should be displayed in the summary
# Conflicts: # packages/cinterop/build.gradle.kts
Enable sync tests on GHA
Closes #878
This PR adds support for building the library on Github Actions, which is a step in us migrating off Jenkins.
TODO:
compile*
tasks for some reason. So only publish metadata from Linux which avoids Gradle attempting to build all macos binaries in Core .Future tasks:
Dev notes