Build riscv64 from aosp-main #66
Workflow file for this run
This file contains 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: build | |
on: | |
push: | |
branches: | |
- '**' | |
tags: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
archive: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- type: aosp_aarch64 | |
link: https://dl.google.com/developers/android/udc/images/gsi/aosp_arm64-exp-UP1A.231005.007-10754064-68dd726a.zip | |
- type: aosp_x86_64 | |
link: https://dl.google.com/developers/android/udc/images/gsi/aosp_x86_64-exp-UP1A.231005.007-10754064-84570261.zip | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download Image | |
run: | | |
curl -fsSLo ${{ matrix.type }}.zip ${{ matrix.link }} | |
- name: Mount Image | |
run: | | |
unzip ${{ matrix.type }}.zip system.img | |
mkdir sysroot | |
sudo mount -o loop,ro system.img sysroot | |
- name: List Image Contents | |
run: | | |
cd sysroot | |
sudo find . -print0 | xargs -0 sudo ls -dl | |
- name: Archive | |
run: | | |
cd sysroot | |
sudo ../libexec/ls-files | sudo tar -cvzf ../${{ matrix.type }}.tar.gz -T- | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.type }} | |
path: ${{ matrix.type }}.tar.gz | |
if-no-files-found: error | |
compression-level: 0 | |
build: | |
needs: [archive] | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: aosp_aarch64 | |
- name: Download Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: aosp_x86_64 | |
- name: Docker Metadata | |
id: docker-metadata | |
uses: docker/metadata-action@v5 | |
with: | |
images: | | |
ghcr.io/${{ github.repository }} | |
tags: | | |
type=edge | |
type=ref,event=branch | |
type=ref,event=pr | |
type=ref,event=tag | |
type=schedule | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ startsWith(github.ref, 'refs/tags/') }} | |
tags: ${{ steps.docker-metadata.outputs.tags }} | |
labels: ${{ steps.docker-metadata.outputs.labels }} |