Add OSC52 support #2190
Workflow file for this run
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
| name: Continuous Integration | |
| on: | |
| push: | |
| branches: [ main ] | |
| tags: | |
| - "v*.*.*" | |
| pull_request: | |
| branches: [ main ] | |
| schedule: | |
| - cron: "0 7 */3 * *" | |
| merge_group: | |
| types: [ checks_requested ] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Build and test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout (with history) | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Validate Gradle Wrapper | |
| uses: gradle/actions/wrapper-validation@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0 | |
| - name: Set up JDK | |
| uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '17' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0 | |
| with: | |
| dependency-graph: generate-and-submit | |
| cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }} | |
| - name: Delete old Android SDK cmdline-tools | |
| run: | | |
| rm -rf $ANDROID_HOME/cmdline-tools/latest | |
| - name: Setup Android SDK | |
| uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3.2.2 | |
| with: | |
| cmdline-tools-version: '13114758' | |
| packages: 'cmdline-tools;latest tools platform-tools' | |
| - name: Build ConnectBot | |
| run: ./gradlew build bundle | |
| - name: Enable KVM for emulator and clear up space | |
| 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 | |
| echo "Available disk space before cleanup:" | |
| df -h | |
| sudo rm -rf \ | |
| /opt/ghc \ | |
| /opt/google/chrome \ | |
| /opt/hostedtoolcache/CodeQL \ | |
| /opt/hostedtoolcache/Python \ | |
| /opt/hostedtoolcache/Ruby \ | |
| /opt/hostedtoolcache/go \ | |
| /opt/hostedtoolcache/node \ | |
| /opt/microsoft/msedge \ | |
| /opt/microsoft/powershell \ | |
| /opt/pipx \ | |
| /usr/lib/mono \ | |
| /usr/lib/node_modules \ | |
| /usr/local/graalvm/ \ | |
| /usr/local/julia* \ | |
| /usr/local/share/boost \ | |
| /usr/local/share/chromium \ | |
| /usr/local/share/powershell \ | |
| /usr/share/dotnet \ | |
| /usr/share/swift | |
| sudo apt-get clean | |
| sudo swapoff -a || true | |
| sudo rm -f /swapfile || true | |
| echo "Available disk space after cleanup:" | |
| df -h | |
| - name: Run instrument tests | |
| uses: reactivecircus/android-emulator-runner@b530d96654c385303d652368551fb075bc2f0b6b # v2.35.0 | |
| with: | |
| api-level: 29 | |
| target: default | |
| arch: x86_64 | |
| disk-size: 2G | |
| script: ./gradlew connectedCheck --continue | |
| - name: Prepare release | |
| if: ${{ github.event_name == 'push' }} | |
| run: | | |
| if git describe --exact-match; then \ | |
| TAGGED=yes | |
| fi | |
| if [[ -n $TAGGED ]]; then | |
| GITHUB_TAG="$(git describe)" | |
| echo "${GITHUB_TAG}" > tag.txt | |
| echo "Release ${GITHUB_TAG}" > release-title.txt | |
| else \ | |
| GITHUB_TAG="git-$(git describe)" | |
| GITHUB_TITLE="$(git log -1 --pretty=%B | head -1)" | |
| echo "${GITHUB_TAG}" > tag.txt | |
| echo "${GITHUB_TAG}: ${GITHUB_TITLE}" > release-title.txt | |
| fi | |
| cp ./app/build/outputs/apk/oss/release/app-oss-release-unsigned.apk ConnectBot-${GITHUB_TAG}-oss-unsigned.apk | |
| cp ./app/build/outputs/apk/google/release/app-google-release-unsigned.apk ConnectBot-${GITHUB_TAG}-google-unsigned.apk | |
| cp ./app/build/outputs/bundle/googleRelease/app-google-release.aab ConnectBot-${GITHUB_TAG}-google-unsigned.aab | |
| cp ./app/build/outputs/bundle/ossRelease/app-oss-release.aab ConnectBot-${GITHUB_TAG}-oss-unsigned.aab | |
| cp ./app/build/outputs/native-debug-symbols/googleRelease/native-debug-symbols.zip ConnectBot-${GITHUB_TAG}-google.native-debug-symbols.zip | |
| cp ./app/build/outputs/native-debug-symbols/ossRelease/native-debug-symbols.zip ConnectBot-${GITHUB_TAG}-oss.native-debug-symbols.zip | |
| cp ./app/build/outputs/mapping/googleRelease/mapping.txt ConnectBot-${GITHUB_TAG}-google.mapping.txt | |
| cp ./app/build/outputs/mapping/ossRelease/mapping.txt ConnectBot-${GITHUB_TAG}-oss.mapping.txt | |
| zstd *.mapping.txt | |
| - name: Store artifacts for upload | |
| if: ${{ github.event_name == 'push' }} | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: apk | |
| path: | | |
| release-title.txt | |
| tag.txt | |
| ConnectBot-*-unsigned.apk | |
| ConnectBot-*-unsigned.aab | |
| ConnectBot-*.native-debug-symbols.zip | |
| ConnectBot-*.mapping.txt.zst | |
| upload: | |
| name: Upload to GitHub releases | |
| needs: build | |
| if: ${{ (github.event_name == 'push') && (github.repository == 'connectbot/connectbot') && ((github.ref == 'refs/heads/main') || startsWith(github.ref, 'refs/tags/v')) }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download artifacts from previous job | |
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 | |
| with: | |
| name: apk | |
| - name: Set release name | |
| id: name | |
| run: | | |
| echo "RELEASE_TITLE=$(cat release-title.txt)" >> "$GITHUB_OUTPUT" | |
| echo "GITHUB_TAG=$(cat tag.txt)" >> "$GITHUB_OUTPUT" | |
| - name: Upload release | |
| uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0 | |
| with: | |
| body: "Untested build" | |
| draft: true | |
| tag_name: ${{ steps.name.outputs.GITHUB_TAG }} | |
| name: ${{ steps.name.outputs.RELEASE_TITLE }} | |
| generate_release_notes: true | |
| files: | | |
| ConnectBot-*-unsigned.apk | |
| ConnectBot-*-unsigned.aab | |
| ConnectBot-*.native-debug-symbols.zip | |
| ConnectBot-*.mapping.txt.zst | |
| signing: | |
| name: Trigger remote signing | |
| needs: upload | |
| if: ${{ (github.event_name == 'push') && (github.repository == 'connectbot/connectbot') && ((github.ref == 'refs/heads/main') || startsWith(github.ref, 'refs/tags/v')) }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download artifacts from previous job | |
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 | |
| with: | |
| name: apk | |
| - name: Set release name | |
| id: name | |
| run: | | |
| echo "GITHUB_TAG=$(cat tag.txt)" >> "$GITHUB_OUTPUT" | |
| - name: Call remote signer | |
| uses: distributhor/workflow-webhook@2381f0e9c7b6bf061fb1405bd0804b8706116369 # v3.0.8 | |
| with: | |
| webhook_url: ${{ secrets.SIGNER_WEBHOOK_URL }} | |
| data: '{"tag_id": "${{ steps.name.outputs.GITHUB_TAG }}"}' |