env, ci: add better CI diagnosis via is_manageable/0 for when `sdkm…
#583
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: Emulator Run CI | |
| on: | |
| push: | |
| paths-ignore: | |
| - "**.md" | |
| pull_request: | |
| paths-ignore: | |
| - "**.md" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| ubuntu-latest-test-all: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 35 | |
| env: | |
| VAB_FLAGS: -cg -f '-d no_load_styles' -v 3 --api 30 --build-tools 33.0.2 | |
| VFLAGS: -no-parallel | |
| steps: | |
| - uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'adopt' | |
| java-version: 17 | |
| - name: Checkout V | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: vlang/v | |
| path: v | |
| - name: Build and install v | |
| run: cd ./v && make -j4 && sudo ./v symlink | |
| - name: Checkout vab | |
| uses: actions/checkout@v4 | |
| with: | |
| path: vab | |
| - name: Simulate "v install vab" | |
| run: mv vab ~/.vmodules | |
| - name: Build vab | |
| run: v -g ~/.vmodules/vab | |
| - name: Symlink vab | |
| run: sudo ln -s ~/.vmodules/vab/vab /usr/local/bin/vab | |
| - name: Run vab --help | |
| run: vab --help | |
| - name: Run vab doctor *before* | |
| run: vab doctor | |
| - name: Install dependencies | |
| run: | | |
| v retry -- sudo apt update | |
| v retry -- sudo apt install --quiet -y qemu-kvm | |
| sudo chown $USER /dev/kvm | |
| - name: Install SDK dependencies | |
| run: | | |
| vab install "platform-tools" | |
| vab install "build-tools;33.0.2" | |
| vab install "platforms;android-30" | |
| vab install emulator | |
| vab install bundletool | |
| vab install aapt2 | |
| - name: Run vab doctor *after* | |
| run: vab doctor | |
| - name: Cache emulator | |
| id: cache-emulator | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| /usr/local/lib/android/sdk/system-images/android-30 | |
| key: ${{ runner.os }}-android-emulator-${{ hashFiles('/usr/local/lib/android/sdk/system-images') }} | |
| - name: Prepare emulator | |
| if: steps.cache-emulator.outputs.cache-hit != 'true' | |
| run: | | |
| vab install 'system-images;android-30;aosp_atd;x86_64' | |
| - name: Run `vab test-all` | |
| run: | | |
| vab test-all |