-
Notifications
You must be signed in to change notification settings - Fork 23
ci: release please support #241
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
2b3e411
ci: release please support
tanderson-ld 86dbc72
adding newlines to files missing it
tanderson-ld 539e327
fixing review comments and fixing emulator TODO
tanderson-ld d95387c
removing Circle CI and LD releaser files
tanderson-ld 1e353c1
ci: adds hardware acceleration for linux runners
tanderson-ld d298164
ci: pinning reactivecircus action to hash instead of tag
tanderson-ld File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ assignees: '' | |
| --- | ||
|
|
||
| **Is this a support request?** | ||
| This issue tracker is maintained by LaunchDarkly SDK developers and is intended for feedback on the SDK code. If you're not sure whether the problem you are having is specifically related to the SDK, or to the LaunchDarkly service overall, it may be more appropriate to contact the LaunchDarkly support team; they can help to investigate the problem and will consult the SDK team if necessary. You can submit a support request by going [here](https://support.launchdarkly.com/hc/en-us/requests/new) or by emailing [email protected]. | ||
| This issue tracker is maintained by LaunchDarkly SDK developers and is intended for feedback on the code in this library. If you're not sure whether the problem you are having is specifically related to this library, or to the LaunchDarkly service overall, it may be more appropriate to contact the LaunchDarkly support team; they can help to investigate the problem and will consult the SDK team if necessary. You can submit a support request by going [here](https://support.launchdarkly.com/) and clicking "submit a request", or by emailing [email protected]. | ||
|
|
||
| Note that issues filed on this issue tracker are publicly accessible. Do not provide any private account information on your issues. If your problem is specific to your account, you should submit a support request as described above. | ||
|
|
||
|
|
||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| name: Build Documentation | ||
| description: 'Build Documentation.' | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Build Documentation | ||
| shell: bash | ||
| run: ./gradlew javadoc |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| name: CI Workflow | ||
| description: 'Shared CI workflow.' | ||
| inputs: | ||
| run_tests: | ||
| description: 'If true, run unit tests, otherwise skip them.' | ||
| required: false | ||
| default: 'true' | ||
| android_api_level: | ||
| description: 'The Android API level to use.' | ||
| required: true | ||
| java_version: | ||
| description: 'The Java version to use.' | ||
| required: true | ||
| java_distribution: | ||
| description: 'The Java distribution to use.' | ||
| required: false | ||
| default: 'temurin' | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Setup Java | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: ${{ inputs.java_distribution }} | ||
| java-version: ${{ inputs.java_version }} | ||
|
|
||
| - name: Setup Android SDK | ||
| uses: android-actions/setup-android@v3 | ||
|
|
||
| - name: Build | ||
| shell: bash | ||
| id: build | ||
| run: ./gradlew build jar | ||
|
|
||
| - name: Run Unit Tests | ||
| if: inputs.run_tests == 'true' | ||
| shell: bash | ||
| run: ./gradlew test | ||
|
|
||
| - name: Build contract tests | ||
| shell: bash | ||
| run: make build-contract-tests | ||
|
|
||
| - name: Perform Instrumented Tests | ||
| uses: reactivecircus/android-emulator-runner@6b0df4b0efb23bb0ec63d881db79aefbc976e4b2 #2.30.1 | ||
| with: | ||
| api-level: ${{ inputs.android_api_level }} | ||
| target: google_apis | ||
| emulator-boot-timeout: 900 | ||
| emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | ||
| disable-animations: true | ||
| script: | | ||
| make start-contract-test-service | ||
| make run-contract-tests | ||
| ./gradlew connectedDebugAndroidTest | ||
|
|
||
| - name: Build documentation | ||
| uses: ./.github/actions/build-docs |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| name: Publish Documentation | ||
| description: 'Publish the documentation to Github pages' | ||
| inputs: | ||
| token: | ||
| description: 'Token to use for publishing.' | ||
| required: true | ||
| dry_run: | ||
| description: 'Is this a dry run. If so no docs will be published.' | ||
| required: true | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - uses: launchdarkly/gh-actions/actions/[email protected] | ||
| name: 'Publish to Github pages' | ||
| if: ${{ inputs.dry_run == 'false' }} | ||
| with: | ||
| docs_path: launchdarkly-android-client-sdk/build/docs/javadoc | ||
| github_token: ${{ inputs.token }} # For the shared action the token should be a GITHUB_TOKEN | ||
|
|
||
| - name: Dry Run Publish Docs | ||
| shell: bash | ||
| if: ${{ inputs.dry_run == 'true' }} | ||
| run: echo "Dry run. Not publishing docs." |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| name: Publish Package | ||
| description: 'Publish the package to Sonatype' | ||
| inputs: | ||
| code_signing_keyring: | ||
| description: 'The path of the code signing keyring.' | ||
| required: true | ||
| prerelease: | ||
| description: 'Is this a prerelease. If so then it will be published to the staging repository only.' | ||
| required: true | ||
| dry_run: | ||
| description: 'Is this a dry run. If so no package will be published.' | ||
| required: true | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Publish Library | ||
| shell: bash | ||
| if: ${{ inputs.dry_run == 'false' }} | ||
| env: | ||
| LD_RELEASE_IS_PRERELEASE: ${{ inputs.prerelease }} | ||
| SIGNING_SECRET_KEY_RING_FILE: ${{ inputs.code_signing_keyring }} | ||
| run: source $GITHUB_ACTION_PATH/publish.sh | ||
|
|
||
| - name: Dry Run Publish Library | ||
| shell: bash | ||
| if: ${{ inputs.dry_run == 'true' }} | ||
| run: echo "Dry run. Not publishing." |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -ue | ||
|
|
||
| echo "Publishing to Sonatype" | ||
| if [ "${LD_RELEASE_IS_PRERELEASE}" == "true" ]; then | ||
| echo "PRERELEASE" | ||
| ./gradlew publishToSonatype -Psigning.keyId="${SIGNING_KEY_ID}" -Psigning.password="${SIGNING_KEY_PASSPHRASE}" -Psigning.secretKeyRingFile="${SIGNING_SECRET_KEY_RING_FILE}" -PsonatypeUsername="${SONATYPE_USER_NAME}" -PsonatypePassword="${SONATYPE_PASSWORD}" || { | ||
| echo "Gradle publish/release failed" >&2 | ||
| exit 1 | ||
| } | ||
| else | ||
| echo "RELEASE" | ||
| ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -Psigning.keyId="${SIGNING_KEY_ID}" -Psigning.password="${SIGNING_KEY_PASSPHRASE}" -Psigning.secretKeyRingFile="${SIGNING_SECRET_KEY_RING_FILE}" -PsonatypeUsername="${SONATYPE_USER_NAME}" -PsonatypePassword="${SONATYPE_PASSWORD}" || { | ||
| echo "Gradle publish/release failed" >&2 | ||
| exit 1 | ||
| } | ||
| fi |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| name: Build and Test | ||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: ['main'] | ||
| paths-ignore: | ||
| - '**.md' # Do not need to run CI for markdown changes. | ||
| pull_request: | ||
| branches: [ 'main' ] | ||
| paths-ignore: | ||
| - '**.md' | ||
|
|
||
| jobs: | ||
| ci-build: | ||
| strategy: | ||
| matrix: | ||
| # TODO: Use full matrices | ||
| # android_api_level: ['21','25','30','34'] | ||
| # java_version: ['11', '17'] | ||
| android_api_level: ['25'] | ||
| java_version: ['17'] | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would like to address this TODO in a subsequent PR. |
||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| # This enables hardware acceleration on large linux runners | ||
| - name: Enable KVM group perms | ||
| run: | | ||
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | ||
| sudo udevadm control --reload-rules | ||
| sudo udevadm trigger --name-match=kvm | ||
|
|
||
| - uses: actions/checkout@v4 | ||
| - uses: ./.github/actions/ci | ||
| with: | ||
| android_api_level: ${{ matrix.android_api_level }} | ||
| java_version: ${{ matrix.java_version }} | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| name: Lint PR title | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| types: | ||
| - opened | ||
| - edited | ||
| - synchronize | ||
|
|
||
| jobs: | ||
| lint-pr-title: | ||
| uses: launchdarkly/gh-actions/.github/workflows/lint-pr-title.yml@main |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| name: Publish Docs | ||
| jobs: | ||
| build-publish: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| id-token: write # Needed if using OIDC to get release secrets. | ||
| contents: write # Needed in this case to write github pages. | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: launchdarkly/gh-actions/actions/[email protected] | ||
| name: Assume aws role | ||
| with: | ||
| aws_assume_role: ${{ vars.AWS_ROLE_ARN }} | ||
|
|
||
| - name: Build and Test | ||
| uses: ./.github/actions/ci | ||
|
|
||
| - name: Publish Documentation | ||
| uses: ./.github/actions/publish-docs | ||
| with: | ||
| token: ${{secrets.GITHUB_TOKEN}} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.