Skip to content

Commit

Permalink
Update github CI (#1888)
Browse files Browse the repository at this point in the history
This change updates github CI actions to match Google Cloud Build.

Required for #1819 in order to disable GCB CI and completely move to github CI.
  • Loading branch information
ipetr0v authored Feb 23, 2021
1 parent 390a954 commit f5ed5d6
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
jobs:
runner:
runs-on: ubuntu-latest
timeout-minutes: 120
# We use the same job template, but parametrize the actual command to be passed to the runner
# binary using the matrix strategy, so that we get the commands running in parallel.
strategy:
Expand Down Expand Up @@ -51,5 +52,47 @@ jobs:
docker pull gcr.io/oak-ci/oak:latest
docker build --pull --cache-from=gcr.io/oak-ci/oak:latest --tag=gcr.io/oak-ci/oak:latest .
- name: Cargo crev
run: ./scripts/docker_run ./scripts/run_cargo_crev

- name: Run command
run: ./scripts/docker_run ./scripts/runner ${{ matrix.cmd }}

- name: Generate root CA certs
run: ./scripts/docker_run ./scripts/generate_root_ca_certs

# Check whether any of the previous steps resulted in file diffs that were not checked in or
# ignored by git.
- name: Git check diff
run: ./scripts/docker_run ./scripts/git_check_diff

android-runner:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout branch
uses: actions/checkout@v2

# Copied from https://github.com/jens-maus/RaspberryMatic/blob/ea6b8ce0dd2d53ea88b2766ba8d7f8e1d667281f/.github/workflows/ci.yml#L34-L40
# and https://github.com/actions/virtual-environments/issues/709#issuecomment-612569242
- name: Free disk space
run: |
df --human-readable
sudo apt clean
docker rmi $(docker image ls --all --quiet)
rm --recursive --force "$AGENT_TOOLSDIRECTORY"
df --human-readable
# Build Docker image based for Android SDK.
- name: Android Docker build
timeout-minutes: 30
run: |
docker pull gcr.io/oak-ci/oak-android:latest
docker build --pull --cache-from=gcr.io/oak-ci/oak-android:latest --tag=gcr.io/oak-ci/oak-android:latest --file=android.Dockerfile .
# Build Android Hello-World application.
- name: Build Android Hello-World
run:
docker run --volume=$PWD:/opt/my-project --workdir=/opt/my-project
gcr.io/oak-ci/oak-android:latest ./scripts/build_examples_android

0 comments on commit f5ed5d6

Please sign in to comment.