From bad4e9c02272655d271f7f30174bc231df590ee4 Mon Sep 17 00:00:00 2001 From: Santtu Date: Fri, 6 Dec 2024 09:07:57 +0700 Subject: [PATCH] Android release check --- .github/workflows/androidrelease.yml | 20 +++++++++ .../reusable/android-install/action.yml | 44 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 .github/workflows/androidrelease.yml create mode 100644 .github/workflows/reusable/android-install/action.yml diff --git a/.github/workflows/androidrelease.yml b/.github/workflows/androidrelease.yml new file mode 100644 index 00000000..24da5dbe --- /dev/null +++ b/.github/workflows/androidrelease.yml @@ -0,0 +1,20 @@ +name: Android Release StreamrProxyClient + +on: + release: + types: [published] + +env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + +jobs: + build-android: + runs-on: macos-15 + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + fetch-depth: 0 + + - name: Install Dependencies + uses: ./.github/workflows/reusable/android-install diff --git a/.github/workflows/reusable/android-install/action.yml b/.github/workflows/reusable/android-install/action.yml new file mode 100644 index 00000000..9aa532be --- /dev/null +++ b/.github/workflows/reusable/android-install/action.yml @@ -0,0 +1,44 @@ +name: "cached install" +description: "install dependencies, build and cache result, or restore from cache if present" + +runs: + using: "composite" + steps: + - name: cache homedir + id: cache-homedir + uses: actions/cache/restore@v4 + with: + key: ${{ runner.arch }}-${{ runner.os }}-cache-homedir1-${{ hashFiles('./vcpkg.json') }} + path: | + ~/.cache/vcpkg/archives + - name: cache vcpkg installed + id: cache-vcpkg-installed + uses: actions/cache/restore@v4 + with: + key: ${{ runner.arch }}-${{ runner.os }}-cache-vcpkg-installed1-${{ hashFiles('./vcpkg.json') }} + path: | + ./build/vcpkg_installed + - name: install-prerequisities + run: + source install-prerequisities.sh + shell: bash + - name: install + run: | + ./install.sh --prod ${ARCHFLAGS:-} || (echo heippa && cat /Users/runner/work/native-sdk/native-sdk/vcpkg/buildtrees/libdatachannel/config-arm64-android-out.log && exit 1) + shell: bash + - name: cache homedir save + id: cache-homedir-save + if: always() + uses: actions/cache/save@v4 + with: + key: ${{ runner.arch }}-${{ runner.os }}-cache-homedir1-${{ hashFiles('./vcpkg.json') }} + path: | + ~/.cache/vcpkg/archives + - name: cache vcpkg installed save + id: cache-vcpkg-installed-save + if: always() + uses: actions/cache/save@v4 + with: + key: ${{ runner.arch }}-${{ runner.os }}-cache-vcpkg-installed1-${{ hashFiles('./vcpkg.json') }} + path: | + ./build/vcpkg_installed