Skip to content

Moved new Debian host image project from codelinaro to Cuttlefish github #1242

Moved new Debian host image project from codelinaro to Cuttlefish github

Moved new Debian host image project from codelinaro to Cuttlefish github #1242

Workflow file for this run

name: Presubmit
on: [pull_request, push, workflow_call]
jobs:
build-orchestrator:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2
- name: Install dependencies
uses: actions/setup-go@v3
with:
go-version: '1.13.15'
- run: go version
- name: Vet Test Build
run: cd frontend/src/host_orchestrator && go vet ./... && go test ./... && go build ./...
build-debian-package:
runs-on: ubuntu-20.04
if: ${{ always() && needs.build-orchestrator.result == 'success' }}
needs: [build-orchestrator]
container:
# debian:bullseye
image: debian@sha256:3b6053ca925336c804e2d3f080af177efcdc9f51198a627569bfc7c7e730ef7e
steps:
- name: Check for dockerenv file
run: (ls /.dockerenv && echo 'Found dockerenv') || (echo 'No dockerenv')
- name: setup apt
run: apt update -y && apt upgrade -y
- name: install debuild dependencies
run: apt install -y git devscripts config-package-dev debhelper-compat golang protobuf-compiler
- name: go version
run: go version
- name: checkout repository
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2
with:
path: "android-cuttlefish"
- name: Install bazel
run: bash android-cuttlefish/tools/buildutils/installbazel.sh
- name: install package build dependencies
run: cd android-cuttlefish/base && mk-build-deps -i -t 'apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'
- name: build base debian package
run: cd android-cuttlefish/base && debuild -i -us -uc -b
- name: install base debian package
run: dpkg -i android-cuttlefish/cuttlefish-base_*_*64.deb || apt-get install -f -y
- name: build frontend debian packages
run: cd android-cuttlefish/frontend && debuild -i -us -uc -b
- name: install user debian package
run: dpkg -i android-cuttlefish/cuttlefish-user_*_*64.deb || apt-get install -f -y
build-cvd:
runs-on: ubuntu-latest
container:
image: debian@sha256:3b6053ca925336c804e2d3f080af177efcdc9f51198a627569bfc7c7e730ef7e
steps:
- name: Checkout repository
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2
- name: Setup apt
run: apt update -y && apt upgrade -y
- name: Install dependencies
run: apt install -y clang libcurl4-openssl-dev
- name: Install bazel
run: bash tools/buildutils/installbazel.sh
- name: Build cvd
run: cd base/cvd && bazel build ...
- name: Test cvd
run: cd base/cvd && bazel test --sandbox_writable_path=$HOME --test_output=errors ...
- name: Upload test logs
uses: actions/upload-artifact@v3
with:
name: testlogs
path: bazel-testlogs
e2e-tests-orchestration:
runs-on: ubuntu-22.04
steps:
- name: Check kvm
run: |
ls /dev/kvm
- name: checkout repository
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2
- name: Install bazel
run: sudo bash tools/buildutils/installbazel.sh
- name: bazel version
run: bazel version
- name: Run orchestration e2e tests
run: |
cd e2etests
bazel test --sandbox_writable_path=$HOME --test_output=errors orchestration/...
- name: Upload test logs
uses: actions/upload-artifact@v3
with:
name: testlogs
path: e2etests/bazel-testlogs
build-arm64-cuttlefish-deb-job:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 # aka v2
- name: Prepare building environment
run: sudo apt update && sudo apt-get install -y ubuntu-dev-tools qemu-user-static binfmt-support fakeroot equivs
- name: Pbuilder arm64 create
run: pbuilder-dist stable arm64 create
- name: Pbuilder arm64 update
run: pbuilder-dist stable arm64 update
- name: Building package
run: cd tools/cuttlefish-host-image-installer && ./build_cf_packages.sh
- name: Create artifact
run: cd tools/cuttlefish-host-image-installer && cp -f cuttlefish-common-buildplace/*.deb . && 7z a -mx=9 cuttlefish_packages.7z *.deb
- name: Publish cuttlefish_packages.7z
uses: actions/upload-artifact@v3
with:
name: cuttlefish_packages_arm64
path: tools/cuttlefish-host-image-installer/cuttlefish_packages.7z