Skip to content

Set extractNativeLibs=true and enableUncompressedNativeLibs=false #1465

Set extractNativeLibs=true and enableUncompressedNativeLibs=false

Set extractNativeLibs=true and enableUncompressedNativeLibs=false #1465

Workflow file for this run

name: Code Analysis
on:
push:
branches: [ master, submission-v* ]
pull_request:
types: [ opened, synchronize, reopened ]
jobs:
sonar:
name: SonarScanner
runs-on: ubuntu-20.04
timeout-minutes: 120
permissions:
contents: read
packages: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCKER_IMAGE_TAG: ghcr.io/mlcommons/mobile_app_open-scanner:${{ github.run_number }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_OUT_DIR: sonar_build_wrapper_output
REPO_NAME: ${{ github.event.repository.name }}
PR_NUMBER: ${{ github.event.number }}
PR_BRANCH: ${{ github.HEAD_REF }}
PR_BASE: ${{ github.BASE_REF }}
CONNECT_TTY_TO_DOCKER: 0
WITH_TFLITE: 1
WITH_PIXEL: 1
FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Free up disk space
run: |
echo BEFORE:
df -h
rm -rf /opt/hostedtoolcache/*
echo AFTER:
df -h
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for base image
id: meta-base
uses: docker/metadata-action@v5
with:
images: ghcr.io/mlcommons/mobile_app_open-base
flavor: latest=true
tags: type=raw,value=${{ github.run_number }}
- name: Build and push base image
uses: docker/build-push-action@v5
with:
context: flutter/android/docker
file: flutter/android/docker/Dockerfile
push: true
tags: ${{ steps.meta-base.outputs.tags }}
labels: ${{ steps.meta-base.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Extract metadata for scanner image
id: meta-scanner
uses: docker/metadata-action@v5
with:
images: ghcr.io/mlcommons/mobile_app_open-scanner
flavor: latest=true
tags: type=raw,value=${{ github.run_number }}
- name: Build and push scanner image
uses: docker/build-push-action@v5
with:
context: tools/scanner
file: tools/scanner/Dockerfile
build-args: BASE_DOCKER_IMAGE_TAG=ghcr.io/mlcommons/mobile_app_open-base:${{ github.run_number }}
push: true
tags: ${{ steps.meta-scanner.outputs.tags }}
labels: ${{ steps.meta-scanner.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Scan code
run: make docker/scanner/scan